Function at 0x1020034
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x830
mov eax, dword [0x1030118]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov eax, dword [esi + 0x14]
xor ebx, ebx
mov dword [ebp - 0x828], eax
mov eax, dword [esi]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x830], edi
mov dword [ebp - 0x820], ebx
mov dword [ebp - 0x824], ebx
mov dword [ebp - 0x818], ebx
mov dword [ebp - 0x81c], ebx
cmp eax, ebx
je 0x10200b1
lea ecx, [ebp - 0x80c]
push ecx
lea ecx, [ebp - 0x820]
push ecx
push eax
call fcn.0101f4d6
mov dword [ebp - 0x808], eax
cmp eax, ebx
jne 0x10201a6
mov eax, dword [ebp - 0x820]
mov dword [ebp - 0x810], eax
jmp 0x10200c3
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x810], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x80c], eax
cmp dword [esi + 0x18], ebx
je 0x1020251
cmp dword [esi + 0x1c], ebx
jne 0x1020117
lea eax, [ebp - 0x814]
push eax
lea eax, [ebp - 0x824]
push eax
push dword [esi + 0x20]
push dword [ebp - 0x80c]
push dword [ebp - 0x810]
call fcn.0101f3f1
mov dword [ebp - 0x808], eax
cmp eax, ebx
jne 0x102015e
mov eax, dword [ebp - 0x824]
mov dword [ebp - 0x810], eax
mov eax, dword [ebp - 0x814]
add eax, eax
mov dword [ebp - 0x80c], eax
mov eax, dword [ebp - 0x80c]
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push ebx
push ebx
push ebx
shr eax, 1
push eax
push dword [ebp - 0x810]
mov dword [ebp - 0x80c], eax
push ebx
mov ebx, 0xfde9
push ebx
call edi
test eax, eax
ja 0x10201d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1020156
mov eax, 0x54f
mov dword [ebp - 0x808], eax
xor ebx, ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
cmp dword [ebp - 0x824], ebx
je 0x102017e
push dword [ebp - 0x824]
push ebx
call edi
push eax
call esi
cmp dword [ebp - 0x818], ebx
je 0x1020192
push dword [ebp - 0x818]
push ebx
call edi
push eax
call esi
cmp dword [ebp - 0x81c], ebx
je 0x10201a6
push dword [ebp - 0x81c]
push ebx
call edi
push eax
call esi
cmp dword [ebp - 0x820], ebx
pop edi
pop esi
pop ebx
je 0x10201bd
push dword [ebp - 0x820]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x808]
xor ecx, ebp
call fcn.0101bc5d
leave
ret 8
inc eax
push eax
mov dword [ebp - 0x814], eax
lea eax, [ebp - 0x818]
push eax
call fcn.0101cfa6
mov dword [ebp - 0x808], eax
xor eax, eax
cmp dword [ebp - 0x808], eax
jne 0x102015c
push eax
push eax
push dword [ebp - 0x814]
push dword [ebp - 0x818]
push dword [ebp - 0x80c]
push dword [ebp - 0x810]
push eax
push ebx
call edi
test eax, eax
jbe 0x1020147
mov eax, dword [ebp - 0x818]
mov dword [ebp - 0x810], eax
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x102022e
mov edi, dword [ebp - 0x830]
sub eax, ecx
mov dword [ebp - 0x80c], eax
mov dword [ebp - 0x814], 0x1003a24
xor ebx, ebx
jmp 0x102025b
mov dword [ebp - 0x814], 0x1001a24
cmp dword [ebp - 0x828], ebx
je 0x10202b4
lea eax, [ebp - 0x828]
push eax
lea eax, [ebp - 0x81c]
push eax
push dword [ebp - 0x80c]
push dword [ebp - 0x810]
call fcn.0101f6b6
mov dword [ebp - 0x808], eax
cmp eax, ebx
jne 0x102015e
mov eax, dword [ebp - 0x828]
cmp eax, ebx
je 0x102029b
dec eax
mov ecx, dword [ebp - 0x81c]
mov dword [ebp - 0x80c], eax
mov dword [ebp - 0x810], ecx
mov eax, 0x1003a00
jmp 0x10202b9
mov eax, 0x1001a24
push dword [esi + 8]
push eax
push dword [ebp - 0x814]
lea eax, [edi + 4]
push dword [esi + 4]
push eax
push dword [0x1030144]
lea eax, [ebp - 0x804]
push 0x800
push eax
call fcn.0100c705
add esp, 0x20
cmp eax, ebx
jge 0x10202f3
mov dword [ebp - 0x808], eax
jmp 0x102015e
lea eax, [ebp - 0x804]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10202fc
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea ecx, [ebp - 0x82c]
push ecx
sub eax, edx
push eax
lea eax, [ebp - 0x804]
push eax
push dword [edi]
call esi
test eax, eax
jne 0x1020334
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jne 0x10202e8
mov eax, 0x54f
jmp 0x10202e8
push ebx
lea eax, [ebp - 0x82c]
push eax
push dword [ebp - 0x80c]
push dword [ebp - 0x810]
push dword [edi]
call esi
test eax, eax
je 0x1020323
mov dword [ebp - 0x808], ebx
jmp 0x102015e