Function at 0x4094d0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x74
mov eax, dword [esp + 0x7c]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x84]
xor ebx, ebx
lea ecx, [esp + 0x30]
cmp esi, ebx
push edi
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ecx
je 0x40965a
cmp eax, ebx
je 0x40965a
push 0x64
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebp, eax
add esp, 4
cmp ebp, ebx
je 0x40965a
push ebx
push ebx
push ebx
mov dword [ebp + 0x20], ebx
mov dword [ebp + 0x24], ebx
mov dword [ebp + 0x28], ebx
mov dword [ebp + 0x44], ebx
mov dword [ebp], ebx
mov dword [ebp + 0x48], ebx
mov dword [ebp + 0xc], ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp + 4], ebx
mov dword [ebp + 0x40], ebx
mov dword [ebp + 0x38], ebx
mov dword [ebp + 0x3c], ebx
call fcn.0040ba20
mov dword [ebp + 0x4c], eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp + 0x50], ebx
mov dword [ebp + 0x58], ebx
repne scasb al, byte es:[edi]
not ecx
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
mov edx, eax
add esp, 0x10
cmp edx, ebx
mov dword [ebp + 0x54], edx
je 0x409651
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov dl, 0x72
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [ebp + 0x5c], bl
mov edi, 1
mov ecx, dword [esp + 0x18]
cmp byte [ecx], dl
jne 0x4095ac
mov byte [ebp + 0x5c], dl
mov al, byte [ecx]
cmp al, 0x77
je 0x4095b6
cmp al, 0x61
jne 0x4095ba
mov byte [ebp + 0x5c], 0x77
mov al, byte [ecx]
cmp al, 0x30
jl 0x4095d0
cmp al, 0x39
jg 0x4095d0
movsx esi, al
sub esi, 0x30
mov dword [esp + 0x1c], esi
jmp 0x4095f3
cmp al, 0x66
jne 0x4095da
mov dword [esp + 0x14], edi
jmp 0x4095f3
cmp al, 0x68
jne 0x4095e8
mov dword [esp + 0x14], 2
jmp 0x4095f3
mov esi, dword [esp + 0x10]
mov byte [esi], al
inc esi
mov dword [esp + 0x10], esi
inc ecx
cmp al, bl
mov dword [esp + 0x18], ecx
je 0x40960b
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x84]
cmp eax, ecx
jne 0x4095a1
mov al, byte [ebp + 0x5c]
cmp al, bl
je 0x409651
cmp al, 0x77
jne 0x409664
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
push 0x38
push str.1.1.3
push edx
push 8
push 0xfffffffffffffff1
push 8
push eax
push ebp
call fcn.0040a710
push 0x4000
mov esi, eax
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 0x24
cmp esi, ebx
mov dword [ebp + 0x48], eax
mov dword [ebp + 0xc], eax
jne 0x409651
cmp eax, ebx
jne 0x409690
push ebp
call fcn.004099d0
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x74
ret
push 0x4000
call dword [sym.imp.MSVCRT.dll_malloc]
push 0x38
push str.1.1.3
push 0xfffffffffffffff1
push ebp
mov dword [ebp + 0x44], eax
mov dword [ebp], eax
call fcn.0040a1d0
add esp, 0x14
test eax, eax
jne 0x409651
cmp dword [ebp + 0x44], ebx
je 0x409651
mov dword [ebp + 0x10], 0x4000
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], ebx
mov eax, dword [esp + 0x90]
lea ecx, [esp + 0x34]
cmp eax, ebx
push ecx
jge 0x4096bf
mov edx, dword [esp + 0x8c]
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
jmp 0x4096c6
push eax
call dword [sym.imp.MSVCRT.dll__fdopen]
add esp, 8
cmp eax, ebx
mov dword [ebp + 0x40], eax
je 0x409651
cmp byte [ebp + 0x5c], 0x77
jne 0x409740
mov edx, dword [0x416e3c]
mov eax, dword [0x416e38]
push 0xb
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 8
push edx
push eax
lea ecx, [esp + 0x48]
push str._c_c_c_c_c_c_c_c_c_c
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, dword [esp + 0xc4]
push esi
call fcn.00409470
push esi
lea edx, [esp + 0x58]
push 0xa
push edx
call fcn.00409a80
mov eax, dword [ebp + 0x40]
add esp, 0x40
lea ecx, [esp + 0x20]
push eax
push 0xa
push edi
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
mov dword [ebp + 0x60], 0xa
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret
mov edx, dword [esp + 0x94]
push edx
push ebp
call fcn.00409780
push ebp
call fcn.00409800
mov eax, dword [ebp + 0x40]
push eax
call dword [sym.imp.MSVCRT.dll_ftell]
mov ecx, dword [ebp + 4]
add esp, 0x10
sub eax, ecx
mov dword [ebp + 0x60], eax
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x74
ret