Function at 0x401733
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
push esi
push edi
xor esi, esi
mov edi, ecx
cmp dword [ebp + 8], esi
mov dword [ebp - 0x18], edi
jne 0x40174d
cmp word [edi + 0x20], si
je 0x40179c
cmp byte [edi + 0x234], 0
mov dword [ebp - 0xc], esi
je 0x40177c
mov ecx, edi
call fcn.00401689
cmp eax, esi
mov dword [ebp - 0xc], eax
jge 0x40177c
mov ecx, edi
call fcn.00401a07
mov ecx, edi
call fcn.00401689
cmp eax, esi
mov dword [ebp - 0xc], eax
jl 0x40179c
cmp dword [ebp + 8], esi
lea eax, [edi + 0x20]
je 0x401787
mov eax, dword [ebp + 8]
push 0x40912c
push eax
call dword [sym.imp.MSVCRT.dll__wfopen]
pop ecx
cmp eax, esi
pop ecx
mov dword [ebp - 4], eax
jne 0x4017a3
xor al, al
jmp 0x4019cb
push ebx
mov ebx, dword [sym.imp.MSVCRT.dll_fwrite]
mov dword [ebp + 8], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], esi
mov ecx, dword [edi + 4]
cmp ecx, esi
mov dword [ebp - 0x20], ecx
je 0x401851
mov eax, dword [edi + 8]
push 0x24
sub eax, ecx
pop ecx
cdq
idiv ecx
cmp dword [ebp - 8], eax
jae 0x401851
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
cmp byte [ecx + eax + 0x20], 0
lea edi, [ecx + eax]
jne 0x401842
inc dword [ebp - 0x1c]
lea eax, [ebp - 0x68]
push eax
mov ecx, edi
call fcn.00401160
mov eax, dword [ebp + 8]
push dword [ebp - 4]
mov dword [edi], eax
lea eax, [ebp - 0x68]
push 0x1e
push 1
push eax
call ebx
add dword [ebp + 8], eax
mov ax, word [edi + 6]
add esp, 0x10
cmp ax, si
jbe 0x40182a
push dword [ebp - 4]
movzx eax, ax
push eax
push 1
push dword [edi + 0x18]
call ebx
add esp, 0x10
add dword [ebp + 8], eax
mov eax, dword [edi + 0x10]
cmp eax, esi
jbe 0x401842
push dword [ebp - 4]
push eax
push 1
push dword [edi + 0x1c]
call ebx
add esp, 0x10
add dword [ebp + 8], eax
inc dword [ebp - 8]
add dword [ebp - 0x14], 0x24
mov edi, dword [ebp - 0x18]
jmp 0x4017b9
cmp byte [edi + 0x234], 0
je 0x401902
mov eax, dword [ebp - 0xc]
lea ecx, [eax - 0x22]
cmp ecx, esi
mov dword [ebp - 0x20], ecx
jl 0x401902
push eax
lea ecx, [edi + 0x228]
call fcn.004019d1
mov ecx, dword [ebp - 0xc]
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [ebp - 0x14], edi
push edx
push dword [ebp - 0x14]
mov dword [ebp - 0x68], 0x4034b50
rep stosd dword es:[edi], eax
mov ecx, edx
push esi
and ecx, 3
mov word [ebp - 0x64], 0x14
rep stosb byte es:[edi], al
mov word [ebp - 0x62], si
mov word [ebp - 0x60], si
mov word [ebp - 0x5e], si
mov word [ebp - 0x5c], si
call fcn.004035a8
mov dword [ebp - 0x5a], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x56], eax
mov dword [ebp - 0x52], eax
xor eax, eax
lea edi, [ebp - 0x42]
mov word [ebp - 0x4e], 4
mov word [ebp - 0x4c], si
mov dword [ebp - 0x4a], 0x5f5f5f5f
push 8
stosd dword es:[edi], eax
mov edi, dword [ebp - 0x14]
pop ecx
push dword [ebp - 4]
lea esi, [ebp - 0x68]
rep movsd dword es:[edi], dword [esi]
push dword [ebp - 0xc]
movsw word es:[edi], word [esi]
push 1
push dword [ebp - 0x14]
call ebx
add dword [ebp + 8], eax
mov edi, dword [ebp - 0x18]
add esp, 0x1c
xor esi, esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], esi
mov ecx, dword [edi + 4]
cmp ecx, esi
je 0x401985
mov eax, dword [edi + 8]
push 0x24
sub eax, ecx
pop edi
cdq
idiv edi
cmp dword [ebp - 8], eax
jae 0x401985
mov eax, dword [ebp - 0x14]
cmp byte [eax + ecx + 0x20], 0
lea esi, [eax + ecx]
jne 0x401977
and dword [ebp - 0x78], 0
push 0xd
pop ecx
xor eax, eax
lea edi, [ebp - 0x74]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x78]
mov ecx, esi
push eax
call fcn.004011af
push dword [ebp - 4]
lea eax, [ebp - 0x78]
push 0x2e
push 1
push eax
call ebx
add dword [ebp - 0x10], eax
mov ax, word [esi + 6]
add esp, 0x10
test ax, ax
jbe 0x401977
push dword [ebp - 4]
movzx eax, ax
push eax
push 1
push dword [esi + 0x18]
call ebx
add esp, 0x10
add dword [ebp - 0x10], eax
inc dword [ebp - 8]
add dword [ebp - 0x14], 0x24
mov edi, dword [ebp - 0x18]
xor esi, esi
jmp 0x401908
mov eax, dword [ebp - 0x1c]
push dword [ebp - 4]
mov word [ebp - 0x34], ax
mov word [ebp - 0x32], ax
mov eax, dword [ebp - 0x10]
push 0x16
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x3c]
push 1
push eax
mov dword [ebp - 0x3c], 0x6054b50
mov word [ebp - 0x38], si
mov word [ebp - 0x36], si
mov word [ebp - 0x28], si
call ebx
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
mov al, 1
pop ebx
pop edi
pop esi
leave
ret 4