Function at 0x40ab50
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x65c
mov eax, dword [0x422060]
xor eax, esp
mov dword [esp + 0x654], eax
push ebx
push ebp
mov ebp, dword [esp + 0x668]
push esi
or esi, 0xffffffff
cmp dword [ebp + 4], esi
push edi
mov ebx, ecx
je 0x40ab81
mov edi, dword [ebp]
call fcn.0040a220
mov edi, dword [esp + 0x674]
mov dword [ebp + 4], esi
mov esi, dword [ebp]
cmp edi, dword [esi + 4]
jl 0x40ab9d
mov eax, 0x10000
jmp 0x40ae6a
cmp edi, dword [esi + 0x10]
jge 0x40aba7
call fcn.00409be0
mov eax, dword [ebp]
cmp dword [eax + 0x10], edi
jge 0x40ac03
nop
mov esi, dword [ebp]
test esi, esi
je 0x40abfb
cmp dword [esi + 0x18], 0
je 0x40abfb
mov eax, dword [esi + 0x10]
add eax, 1
cmp eax, dword [esi + 4]
je 0x40abfb
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
lea ecx, [ecx + edx + 0x2e]
add dword [esi + 0x14], ecx
mov dword [esi + 0x10], eax
push 0
lea edx, [esi + 0x78]
push edx
lea eax, [esi + 0x28]
push eax
xor eax, eax
mov ecx, esi
call fcn.00409950
add esp, 0xc
neg eax
sbb eax, eax
add eax, 1
mov dword [esi + 0x18], eax
mov ecx, dword [ebp]
cmp dword [ecx + 0x10], edi
jl 0x40abb0
lea edx, [esp + 0x20]
push edx
push edi
mov ecx, ebp
call fcn.0040a3f0
test byte [esp + 0x22c], 0x10
movzx eax, word [ebx]
je 0x40ac5e
cmp ax, 0x2f
je 0x40ac35
cmp ax, 0x5c
je 0x40ac35
test ax, ax
je 0x40ac47
cmp word [ebx + 2], 0x3a
jne 0x40ac47
push ebx
push 0
call fcn.0040aa00
add esp, 8
xor eax, eax
jmp 0x40ae6a
push ebx
add ebp, 0x244
push ebp
call fcn.0040aa00
add esp, 8
xor eax, eax
jmp 0x40ae6a
xor edi, edi
cmp ax, di
mov esi, ebx
mov ecx, ebx
je 0x40ac8b
movzx eax, ax
lea esp, [esp]
cmp ax, 0x2f
je 0x40ac7c
cmp ax, 0x5c
jne 0x40ac7f
lea esi, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
cmp ax, di
jne 0x40ac70
push 0x103
push ebx
lea eax, [esp + 0x258]
push 0x104
push eax
call fcn.0040cf9d
add esp, 0x10
cmp esi, ebx
jne 0x40ad1f
mov word [esp + 0x250], di
push esi
lea edx, [esp + 0x254]
push edx
lea edi, [ebp + 0x244]
push edi
push str._s_s_s
lea eax, [esp + 0x468]
push 0x103
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
lea ecx, [esp + 0x268]
push ecx
push edi
call fcn.0040aa00
add esp, 0x20
mov edx, dword [esp + 0x22c]
push 0
push edx
push 2
push 0
push 0
push 0x40000000
lea eax, [esp + 0x470]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40ad93
mov eax, 0x200
jmp 0x40ae6a
mov ecx, esi
sub ecx, ebx
sar ecx, 1
mov word [esp + ecx*2 + 0x250], di
mov ax, word [esp + 0x250]
cmp ax, 0x2f
je 0x40ad59
cmp ax, 0x5c
je 0x40ad59
cmp ax, di
je 0x40acb2
cmp word [esp + 0x252], 0x3a
jne 0x40acb2
push esi
lea edx, [esp + 0x254]
push edx
push str._s_s
lea eax, [esp + 0x464]
push 0x103
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x14
lea ecx, [esp + 0x250]
push ecx
push edi
call fcn.0040aa00
add esp, 8
jmp 0x40aceb
mov ecx, dword [ebp + 0x23c]
mov eax, dword [ebp]
push ecx
call fcn.00409e20
add esp, 4
cmp dword [ebp + 0x240], 0
jne 0x40adc1
push 0x4000
call fcn.0040b59e
add esp, 4
mov dword [ebp + 0x240], eax
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x18], 0
nop
mov eax, dword [ebp + 0x240]
lea edx, [esp + 0x17]
push edx
push eax
mov eax, dword [ebp]
mov ecx, 0x4000
call fcn.00409fa0
mov esi, eax
add esp, 8
cmp esi, 0xffffff96
je 0x40ae24
test esi, esi
jl 0x40ae1a
jle 0x40ae0f
mov edx, dword [ebp + 0x240]
push 0
lea ecx, [esp + 0x20]
push ecx
push esi
push edx
push edi
call ebx
test eax, eax
je 0x40ae2e
cmp byte [esp + 0x17], 0
jne 0x40ae38
test esi, esi
jne 0x40add0
mov dword [esp + 0x18], 0x5000000
jmp 0x40ae57
mov dword [esp + 0x18], 0x1000
jmp 0x40ae57
mov dword [esp + 0x18], 0x400
jmp 0x40ae57
lea eax, [esp + 0x240]
push eax
lea ecx, [esp + 0x234]
push ecx
lea edx, [esp + 0x240]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp]
call fcn.0040a220
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x664]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040b949
add esp, 0x65c
ret 8