Function at 0x4caae0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x650
mov eax, dword [0x6c3afc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
test eax, eax
jne 0x4cab17
mov eax, 0x10000
mov dword [0x6c70e4], eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005dd8e2
mov esp, ebp
pop ebp
ret
cmp dword [eax], 1
je 0x4cab35
mov eax, 0x80000
mov dword [0x6c70e4], eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005dd8e2
mov esp, ebp
pop ebp
ret
push esi
push edi
mov edi, dword [eax + 4]
or esi, 0xffffffff
cmp dword [edi + 4], esi
je 0x4cab4d
mov eax, dword [edi]
push eax
call fcn.004c85f0
add esp, 4
mov eax, dword [edi]
mov dword [edi + 4], esi
mov esi, dword [ebp + 0xc]
cmp esi, dword [eax + 4]
jl 0x4cab64
mov eax, 0x10000
jmp 0x4cae4c
cmp esi, dword [eax + 0x10]
jge 0x4cab72
push eax
call fcn.004c8350
add esp, 4
mov ecx, dword [edi]
cmp dword [ecx + 0x10], esi
jge 0x4cabd9
lea esp, [esp]
mov esi, dword [edi]
test esi, esi
je 0x4cabcd
cmp dword [esi + 0x18], 0
je 0x4cabcd
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x4cabcd
mov edx, dword [esi + 0x50]
add edx, dword [esi + 0x4c]
mov ecx, dword [esi + 0x48]
push 0
push 0
push 0
push 0
push 0
mov dword [esi + 0x10], eax
push 0
lea edx, [edx + ecx + 0x2e]
add dword [esi + 0x14], edx
lea eax, [esi + 0x78]
push eax
lea ecx, [esi + 0x28]
push ecx
push esi
call fcn.004c7fb0
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov edx, dword [edi]
mov eax, dword [ebp + 0xc]
cmp dword [edx + 0x10], eax
jl 0x4cab80
mov esi, eax
lea ecx, [ebp - 0x644]
push ecx
push esi
mov ecx, edi
call fcn.004c8790
test byte [ebp - 0x438], 0x10
movzx eax, word [ebx]
je 0x4cac33
cmp eax, 0x2f
je 0x4cac0a
cmp eax, 0x5c
je 0x4cac0a
test ax, ax
je 0x4cac1c
cmp word [ebx + 2], 0x3a
jne 0x4cac1c
push ebx
push 0
call fcn.004c8d90
add esp, 8
xor eax, eax
jmp 0x4cae4c
push ebx
add edi, 0x244
push edi
call fcn.004c8d90
add esp, 8
xor eax, eax
jmp 0x4cae4c
mov esi, ebx
mov dword [ebp - 0x648], esi
mov ecx, ebx
test ax, ax
je 0x4cac65
cmp ax, 0x2f
je 0x4cac4e
cmp ax, 0x5c
jne 0x4cac59
lea edx, [ecx + 2]
mov dword [ebp - 0x648], edx
mov esi, edx
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x4cac42
lea edx, [ebp - 0x20c]
mov eax, ebx
sub edx, ebx
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4cac70
cmp esi, ebx
jne 0x4cacf5
xor eax, eax
mov word [ebp - 0x20c], ax
mov eax, dword [ebp - 0x648]
push eax
lea ecx, [ebp - 0x20c]
push ecx
lea esi, [edi + 0x244]
push esi
lea edx, [ebp - 0x414]
push 0x64f48c
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x20c]
push eax
push esi
call fcn.004c8d90
add esp, 0x1c
mov ecx, dword [ebp - 0x438]
push 0
push ecx
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x414]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4cad5f
mov eax, 0x200
jmp 0x4cae4c
mov ecx, esi
sub ecx, ebx
sar ecx, 1
xor edx, edx
mov word [ebp + ecx*2 - 0x20c], dx
mov ax, word [ebp - 0x20c]
cmp ax, 0x2f
je 0x4cad2f
cmp ax, 0x5c
je 0x4cad2f
test ax, ax
je 0x4cac8c
cmp word [ebp - 0x20a], 0x3a
jne 0x4cac8c
push esi
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x414]
push 0x64d6f0
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [ebp - 0x20c]
push edx
push 0
call fcn.004c8d90
add esp, 0x18
jmp 0x4cacc3
mov eax, dword [edi + 0x23c]
mov ecx, dword [edi]
push eax
push ecx
call fcn.004ca500
add esp, 8
cmp dword [edi + 0x240], 0
jne 0x4cad8d
push 0x4000
call fcn.004eff75
add esp, 4
mov dword [edi + 0x240], eax
mov dword [ebp - 0x648], 0
jmp 0x4cada0
mov eax, dword [edi + 0x240]
mov ecx, dword [edi]
lea edx, [ebp - 0x649]
push edx
push 0x4000
push eax
push ecx
call fcn.004ca680
mov esi, eax
add esp, 0x10
cmp esi, 0xffffff96
je 0x4cae00
test esi, esi
js 0x4cadf4
jle 0x4cade7
mov eax, dword [edi + 0x240]
push 0
lea edx, [ebp - 0x650]
push edx
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4cae0c
cmp byte [ebp - 0x649], 0
jne 0x4cae18
test esi, esi
jne 0x4cada0
mov dword [ebp - 0x648], 0x5000000
jmp 0x4cae34
mov dword [ebp - 0x648], 0x1000
jmp 0x4cae34
mov dword [ebp - 0x648], 0x400
jmp 0x4cae34
lea ecx, [ebp - 0x424]
push ecx
lea edx, [ebp - 0x434]
push edx
lea eax, [ebp - 0x42c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi]
push ecx
call fcn.004c85f0
mov eax, dword [ebp - 0x648]
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov dword [0x6c70e4], eax
pop ebx
call fcn.005dd8e2
mov esp, ebp
pop ebp
ret