Function at 0x404c0a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
xor eax, eax
mov dword [ebp - 8], ecx
push esi
push edi
mov dword [ebp - 0x10], eax
cmp dword [ebp + 8], eax
je 0x40502e
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x40502e
mov eax, 0x400
xor ebx, ebx
push eax
mov dword [ebp - 0x18], eax
call fcn.004188c5
mov edi, eax
mov dword [ebp - 0x1c], edi
pop ecx
test edi, edi
jne 0x404c50
push 0xe
jmp 0x405030
mov eax, dword [ebp - 8]
test byte [eax + 0x14], 1
jne 0x404c7f
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x404c7f
mov ebx, eax
mov ecx, edi
mov edx, eax
shl ebx, 2
mov eax, dword [0x438df8]
mov dword [ecx], eax
lea ecx, [ecx + 4]
mov al, byte [0x438dfc]
mov byte [ecx], al
sub edx, 1
jne 0x404c69
mov ecx, esi
call fcn.00403eb7
push eax
lea eax, [ebx + edi]
push 0x438e00
push eax
call fcn.004011e8
add ebx, eax
add esp, 0xc
xor eax, eax
mov dword [ebp - 4], eax
cmp dword [esi + 0x20], eax
jle 0x404e17
mov ecx, dword [esi + 0x1c]
mov ecx, dword [ecx + eax*4]
call fcn.00403f1a
push eax
call fcn.0040503a
mov dword [ebp - 0x14], eax
pop ecx
test eax, eax
je 0x404d3d
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404cc6
mov eax, dword [ebp - 4]
sub ecx, edx
mov dword [ebp - 0xc], ecx
mov ecx, dword [esi + 0x1c]
mov ecx, dword [ecx + eax*4]
call fcn.00403eb7
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404ce5
mov eax, dword [ebp - 0xc]
sub ecx, edx
add eax, 0x14
add eax, ecx
push eax
call fcn.004188c5
mov dword [ebp - 0xc], eax
pop ecx
push dword [ebp - 0x14]
test eax, eax
je 0x404e40
mov ecx, dword [esi + 0x1c]
mov eax, dword [ebp - 4]
mov ecx, dword [ecx + eax*4]
call fcn.00403eb7
push eax
push str.__s__s_
push dword [ebp - 0xc]
call fcn.004011e8
push dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
call fcn.004188c0
mov eax, dword [ebp - 0x24]
add esp, 0x14
jmp 0x404dc0
mov ecx, dword [esi + 0x1c]
mov eax, dword [ebp - 4]
mov ecx, dword [ecx + eax*4]
call fcn.00403f1a
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404d50
mov eax, dword [ebp - 4]
sub ecx, edx
mov dword [ebp - 0x24], ecx
mov ecx, dword [esi + 0x1c]
mov ecx, dword [ecx + eax*4]
call fcn.00403eb7
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404d6f
mov eax, dword [ebp - 0x24]
sub ecx, edx
add eax, 0x14
add eax, ecx
push eax
call fcn.004188c5
mov dword [ebp - 0xc], eax
pop ecx
test eax, eax
je 0x404fd0
mov esi, dword [esi + 0x1c]
mov eax, dword [ebp - 4]
mov ecx, dword [esi + eax*4]
call fcn.00403f1a
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [esi + eax*4]
call fcn.00403eb7
push eax
push str.__s__s_
push dword [ebp - 0xc]
call fcn.004011e8
mov esi, dword [ebp + 0xc]
add esp, 0x10
mov edx, dword [ebp - 0x18]
lea ecx, [eax + ebx]
mov dword [ebp - 0x24], ecx
cmp ecx, edx
jl 0x404dea
add edx, 0x104
add edx, eax
push edx
push edi
mov dword [ebp - 0x18], edx
call fcn.004188d0
pop ecx
pop ecx
test eax, eax
je 0x404e52
mov edi, eax
mov dword [ebp - 0x1c], edi
mov ecx, dword [ebp - 0xc]
sub ebx, ecx
mov edx, ecx
add ebx, edi
mov al, byte [edx]
mov byte [ebx + edx], al
inc edx
test al, al
jne 0x404df3
mov ebx, dword [ebp - 0x24]
push ecx
call fcn.004188c0
mov eax, dword [ebp - 4]
inc eax
pop ecx
mov dword [ebp - 4], eax
cmp eax, dword [esi + 0x20]
jl 0x404ca8
mov eax, dword [esi + 0x30]
mov dword [ebp - 4], eax
test eax, eax
jne 0x404e95
mov ecx, esi
call fcn.00403f1a
test eax, eax
jne 0x404e95
mov eax, dword [ebp - 8]
test byte [eax + 0x14], 2
je 0x404e57
mov dword [ebx + edi], 0x3e2f20
push 3
jmp 0x404e6c
call fcn.004188c0
push edi
call fcn.004188c0
pop ecx
pop ecx
jmp 0x404c49
push dword [ebp - 0xc]
jmp 0x404e40
mov eax, dword [str.____r_n]
mov dword [ebx + edi], eax
mov ax, word [0x438e14]
mov word [ebx + edi + 4], ax
push 5
pop eax
push 0
lea ecx, [ebp - 0x20]
add eax, ebx
push ecx
push eax
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40501c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x40501f
mov ecx, esi
call fcn.00403f1a
mov dword [ebp - 0xc], eax
test eax, eax
je 0x404fdb
mov byte [ebx + edi], 0x3e
inc ebx
push eax
call fcn.0040503a
mov esi, eax
pop ecx
test esi, esi
je 0x404ec0
mov edx, esi
mov dword [ebp - 0xc], edx
jmp 0x404ec3
mov edx, dword [ebp - 0xc]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x24], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404ecb
sub ecx, dword [ebp - 0x24]
lea eax, [ecx + ebx]
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
cmp eax, ecx
jle 0x404f01
lea eax, [ecx + 0x104]
push eax
push edi
call fcn.004188d0
pop ecx
pop ecx
test eax, eax
je 0x404fc5
mov edx, dword [ebp - 0xc]
mov edi, eax
mov dword [ebp - 0x1c], edi
add ebx, edi
mov ecx, edx
sub ebx, edx
mov al, byte [ecx]
mov byte [ebx + ecx], al
inc ecx
test al, al
jne 0x404f07
test esi, esi
je 0x404f1c
push esi
call fcn.004188c0
pop ecx
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp + 0xc]
push 0
lea eax, [ebp - 0x20]
push eax
push ebx
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x404f44
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x404f79
xor ebx, ebx
cmp dword [ebp - 4], ebx
jle 0x404f79
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp - 4]
inc ecx
mov dword [ebp + 0xc], ecx
mov eax, dword [esi + 0x2c]
push ecx
mov ecx, dword [ebp - 8]
push dword [eax + ebx*4]
push dword [ebp + 8]
call fcn.00404c0a
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x404f76
mov ecx, dword [ebp + 0xc]
inc ebx
cmp ebx, edi
jl 0x404f55
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 8]
xor ebx, ebx
cmp dword [ebp - 0xc], ebx
jne 0x404fb0
test byte [eax + 0x14], 1
jne 0x404fb0
mov edx, dword [ebp + 0x10]
test edx, edx
jle 0x404fb0
mov ebx, edx
mov ecx, edi
shl ebx, 2
mov eax, dword [0x438df8]
mov dword [ecx], eax
lea ecx, [ecx + 4]
mov al, byte [0x438dfc]
mov byte [ecx], al
sub edx, 1
jne 0x404f97
mov eax, dword [ebp - 8]
test byte [eax + 0x14], 2
mov ecx, esi
je 0x405000
call fcn.00403eb7
push eax
push str.___s_
jmp 0x40500b
test esi, esi
je 0x404fd0
push esi
call fcn.004188c0
pop ecx
push edi
call fcn.004188c0
jmp 0x404e4c
mov eax, dword [ebp - 8]
test byte [eax + 0x14], 2
je 0x404ff1
push 0x3e
pop eax
mov word [ebx + edi], ax
inc ebx
jmp 0x404f22
mov dword [ebx + edi], 0xa0d3e
add ebx, 3
jmp 0x404f22
call fcn.00403eb7
push eax
push str.___s__r_n
lea eax, [ebx + edi]
push eax
call fcn.004011e8
add esp, 0xc
jmp 0x404e6d
mov ebx, dword [ebp - 0x10]
test edi, edi
je 0x40502a
push edi
call fcn.004188c0
pop ecx
mov eax, ebx
jmp 0x405031
push 0x57
pop eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc