Function at 0x440f60
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x650
mov eax, dword [0x4afe78]
xor eax, esp
mov dword [esp + 0x64c], eax
push ebx
mov ebx, dword [esp + 0x65c]
push ebp
mov ebp, dword [esp + 0x668]
push esi
push edi
mov esi, ecx
cmp ebp, 3
je 0x440fa9
cmp ebp, 2
je 0x441079
cmp ebp, 1
je 0x441079
mov eax, 0x10000
jmp 0x441347
mov eax, dword [esi + 4]
mov edi, dword [esp + 0x664]
cmp edi, eax
je 0x441017
cmp eax, 0xffffffff
je 0x440fc7
mov eax, dword [esi]
push eax
call fcn.0043ea50
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x440f9f
cmp edi, dword [eax + 0x10]
jge 0x440fe3
push eax
call fcn.0043e6b0
add esp, 4
mov ecx, dword [esi]
cmp dword [ecx + 0x10], edi
jge 0x441002
lea ebx, [ebx]
mov edx, dword [esi]
push edx
call fcn.0043e700
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jl 0x440ff0
mov ecx, dword [esi + 0x23c]
mov edx, dword [esi]
push ecx
push edx
call fcn.00440a90
add esp, 8
mov dword [esi + 4], edi
mov ecx, dword [esp + 0x66c]
mov edx, dword [esi]
lea eax, [esp + 0x13]
push eax
push ecx
push ebx
push edx
call fcn.00440c20
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x441048
mov eax, dword [esi]
push eax
call fcn.0043ea50
add esp, 4
mov dword [esi + 4], 0xffffffff
cmp byte [esp + 0x13], 0
jne 0x441121
test edi, edi
jle 0x441061
mov eax, 0x600
jmp 0x441347
mov eax, edi
sub eax, 0xffffff96
neg eax
sbb eax, eax
and eax, 0x4fff000
add eax, 0x1000
jmp 0x441347
or edi, 0xffffffff
cmp dword [esi + 4], edi
je 0x44108c
mov ecx, dword [esi]
push ecx
call fcn.0043ea50
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], edi
mov edi, dword [esp + 0x664]
cmp edi, dword [eax + 4]
jge 0x440f9f
cmp edi, dword [eax + 0x10]
jge 0x4410af
push eax
call fcn.0043e6b0
add esp, 4
mov edx, dword [esi]
cmp dword [edx + 0x10], edi
jge 0x4410c8
mov eax, dword [esi]
push eax
call fcn.0043e700
mov ecx, dword [esi]
add esp, 4
cmp dword [ecx + 0x10], edi
jl 0x4410b6
lea edx, [esp + 0x1c]
push edx
push edi
mov ecx, esi
call fcn.0043ebf0
test byte [esp + 0x228], 0x10
je 0x441128
cmp ebp, 1
je 0x441121
movzx eax, word [ebx]
cmp ax, 0x2f
je 0x4410ff
cmp ax, 0x5c
je 0x4410ff
test ax, ax
je 0x441111
cmp word [ebx + 2], 0x3a
jne 0x441111
push ebx
push 0
call fcn.0043f1f0
add esp, 8
xor eax, eax
jmp 0x441347
push ebx
add esi, 0x244
push esi
call fcn.0043f1f0
add esp, 8
xor eax, eax
jmp 0x441347
cmp ebp, 1
je 0x4411dc
movzx eax, word [ebx]
mov ebp, ebx
mov ecx, ebx
test ax, ax
je 0x44115b
movzx eax, ax
cmp ax, 0x2f
je 0x44114c
cmp ax, 0x5c
jne 0x44114f
lea ebp, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x441140
lea edx, [esp + 0x24c]
mov eax, ebx
sub edx, ebx
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x441166
cmp ebp, ebx
jne 0x4411eb
xor eax, eax
mov word [esp + 0x24c], ax
push ebp
lea eax, [esp + 0x250]
push eax
lea edi, [esi + 0x244]
push edi
lea ecx, [esp + 0x460]
push str._s_s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [esp + 0x260]
push edx
push edi
call fcn.0043f1f0
add esp, 0x1c
mov eax, dword [esp + 0x228]
push 0
push eax
push 2
push 0
push 0
push 0x40000000
lea ecx, [esp + 0x46c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x44125a
mov eax, 0x200
jmp 0x441347
mov ecx, ebp
sub ecx, ebx
sar ecx, 1
xor edx, edx
mov word [esp + ecx*2 + 0x24c], dx
mov ax, word [esp + 0x24c]
cmp ax, 0x2f
je 0x441227
cmp ax, 0x5c
je 0x441227
test ax, ax
je 0x441183
cmp word [esp + 0x24e], 0x3a
jne 0x441183
push ebp
lea eax, [esp + 0x250]
push eax
lea ecx, [esp + 0x45c]
push str._s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [esp + 0x25c]
push edx
push 0
call fcn.0043f1f0
add esp, 0x18
jmp 0x4411b7
mov edx, dword [esi + 0x23c]
mov eax, dword [esi]
push edx
push eax
call fcn.00440a90
add esp, 8
cmp dword [esi + 0x240], 0
jne 0x441288
push 0x4000
call fcn.00446b54
add esp, 4
mov dword [esi + 0x240], eax
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x14], 0
jmp 0x4412a0
mov edx, dword [esi + 0x240]
mov eax, dword [esi]
lea ecx, [esp + 0x13]
push ecx
push 0x4000
push edx
push eax
call fcn.00440c20
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x4412f4
test edi, edi
jl 0x4412ea
jle 0x4412df
mov edx, dword [esi + 0x240]
push 0
lea ecx, [esp + 0x1c]
push ecx
push edi
push edx
push ebx
call ebp
test eax, eax
je 0x4412fe
cmp byte [esp + 0x13], 0
jne 0x441308
test edi, edi
jne 0x4412a0
mov dword [esp + 0x14], 0x5000000
jmp 0x441327
mov dword [esp + 0x14], 0x1000
jmp 0x441327
mov dword [esp + 0x14], 0x400
jmp 0x441327
lea eax, [esp + 0x23c]
push eax
lea ecx, [esp + 0x230]
push ecx
lea edx, [esp + 0x23c]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [esp + 0x670], 1
je 0x441338
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi]
push eax
call fcn.0043ea50
mov eax, dword [esp + 0x18]
add esp, 4
mov ecx, dword [esp + 0x65c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0046dc02
add esp, 0x650
ret 0x10