Function at 0x4025e0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x20
push ebx
push ebp
xor ebx, ebx
cmp dword [esp + 0x2c], ebx
mov ebp, ecx
push esi
mov dword [esp + 0x18], ebp
mov dword [esp + 0x10], ebx
je 0x402af4
mov esi, dword [esp + 0x34]
cmp esi, ebx
je 0x402af4
push edi
push 0x400
mov dword [esp + 0x1c], 0x400
call fcn.0040f141
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [esp + 0x10], edi
je 0x4028b5
test byte [ebp + 0x14], 1
mov ecx, dword [esp + 0x3c]
jne 0x40265a
test ecx, ecx
jle 0x40265a
lea ebx, [ecx*4]
mov edx, dword [0x423b94]
mov dword [eax], edx
mov dl, byte [0x423b98]
mov byte [eax + 4], dl
add eax, 4
sub ecx, 1
jne 0x402641
mov ecx, esi
call fcn.00401b70
push eax
lea eax, [ebx + edi]
push 0x423b90
push eax
call fcn.0041025a
add esp, 0xc
add ebx, eax
cmp dword [esi + 0x20], 0
mov dword [esp + 0x20], 0
jle 0x402829
jmp 0x402690
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x38]
mov eax, dword [esi + 0x1c]
add edi, edi
add edi, edi
mov ecx, dword [eax + edi]
add eax, edi
call fcn.00401af0
push eax
call fcn.00401f20
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x40272e
lea edx, [eax + 1]
jmp 0x4026c0
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4026c0
mov ecx, dword [esp + 0x38]
sub eax, edx
mov esi, eax
mov eax, dword [ecx + 0x1c]
mov ecx, dword [eax + edi]
add eax, edi
call fcn.00401b70
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4026e1
sub eax, edx
lea edx, [eax + esi + 0x14]
push edx
call fcn.0040f141
add esp, 4
mov esi, eax
test esi, esi
push ebp
je 0x402869
mov eax, dword [esp + 0x3c]
mov eax, dword [eax + 0x1c]
mov ecx, dword [eax + edi]
add eax, edi
call fcn.00401b70
push eax
push str.__s__s_
push esi
call fcn.0041025a
push ebp
mov edi, eax
call fcn.0040e862
add esp, 0x14
jmp 0x4027a9
mov eax, dword [esi + 0x1c]
mov ecx, dword [eax + edi]
add eax, edi
call fcn.00401af0
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402740
mov ebp, dword [esp + 0x38]
sub eax, edx
mov esi, eax
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax + edi]
add eax, edi
call fcn.00401b70
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402761
sub eax, edx
lea ecx, [eax + esi + 0x14]
push ecx
call fcn.0040f141
mov esi, eax
add esp, 4
test esi, esi
je 0x4028a8
mov edx, dword [ebp + 0x1c]
mov ecx, dword [edi + edx]
add edi, edx
call fcn.00401af0
mov ecx, dword [edi]
push eax
call fcn.00401b70
push eax
push str.__s__s_
push esi
call fcn.0041025a
add esp, 0x10
mov edi, eax
mov eax, dword [esp + 0x18]
lea ebp, [edi + ebx]
cmp ebp, eax
mov dword [esp + 0x28], ebp
jl 0x4027e1
mov ebp, dword [esp + 0x10]
lea edi, [edi + eax + 0x104]
push edi
push ebp
call fcn.0040e8f0
add esp, 8
test eax, eax
je 0x40288a
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
sub ebx, esi
mov eax, esi
lea edx, [ebx + ecx]
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x4027f0
push esi
mov ebx, ebp
call fcn.0040e862
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x3c]
add eax, 1
add esp, 4
cmp eax, dword [edx + 0x20]
mov dword [esp + 0x20], eax
jl 0x402690
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x1c]
mov esi, edx
mov eax, dword [esi + 0x30]
test eax, eax
mov dword [esp + 0x28], eax
jne 0x4028ee
mov ecx, esi
call fcn.00401af0
test eax, eax
jne 0x4028ee
test byte [ebp + 0x14], 2
je 0x4028c4
mov edx, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x30]
push ecx
mov dword [ebx + edi], 0x3e2f20
add ebx, 3
push ebx
push edi
push edx
jmp 0x402ac1
call fcn.0040e862
mov eax, dword [esp + 0x14]
push eax
call fcn.0040e862
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0xe
pop ebx
add esp, 0x20
ret 0xc
push esi
call fcn.0040e862
push ebp
call fcn.0040e862
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0xe
pop ebx
add esp, 0x20
ret 0xc
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0040e862
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0xe
pop ebx
add esp, 0x20
ret 0xc
mov edx, dword [str.____r_n]
mov dword [ebx + edi], edx
mov ax, word [0x423b80]
mov edx, dword [esp + 0x34]
push 0
lea ecx, [esp + 0x30]
push ecx
mov word [ebx + edi + 4], ax
add ebx, 5
push ebx
push edi
push edx
jmp 0x402ac1
mov ecx, esi
call fcn.00401af0
mov esi, eax
test esi, esi
mov dword [esp + 0x24], esi
je 0x40299b
mov byte [ebx + edi], 0x3e
push esi
add ebx, 1
call fcn.00401f20
add esp, 4
test eax, eax
mov dword [esp + 0x20], eax
je 0x402921
mov dword [esp + 0x24], eax
mov esi, eax
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x402926
sub eax, edx
lea ebp, [eax + ebx]
cmp ebp, dword [esp + 0x18]
jle 0x402957
mov eax, dword [esp + 0x18]
add eax, 0x104
push eax
push edi
call fcn.0040e8f0
add esp, 8
test eax, eax
je 0x402984
mov edi, eax
mov dword [esp + 0x10], edi
lea edx, [ebx + edi]
mov eax, esi
sub edx, esi
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x402960
cmp dword [esp + 0x20], 0
mov esi, ebp
je 0x4029be
mov ecx, dword [esp + 0x20]
push ecx
call fcn.0040e862
add esp, 4
jmp 0x4029be
mov eax, dword [esp + 0x20]
test eax, eax
je 0x402995
push eax
call fcn.0040e862
add esp, 4
push edi
jmp 0x4028ad
test byte [ebp + 0x14], 2
je 0x4029b0
mov edx, dword [esp + 0x10]
mov word [ebx + edx], 0x3e
lea esi, [ebx + 1]
jmp 0x4029be
mov eax, dword [esp + 0x10]
mov dword [ebx + eax], 0xa0d3e
lea esi, [ebx + 3]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x34]
push 0
lea ecx, [esp + 0x30]
push ecx
push esi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4029e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [esp + 0x14], eax
jne 0x402a2a
xor esi, esi
cmp dword [esp + 0x28], esi
jle 0x402a2a
mov edi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x38]
add edi, 1
nop
mov ecx, dword [ebp + 0x2c]
mov edx, dword [ecx + esi*4]
lea eax, [ecx + esi*4]
mov eax, dword [esp + 0x34]
push edi
push edx
push eax
mov ecx, ebx
call fcn.004025e0
test eax, eax
mov dword [esp + 0x14], eax
jne 0x402a32
add esi, 1
cmp esi, dword [esp + 0x28]
jl 0x402a00
jmp 0x402a32
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
xor esi, esi
cmp dword [esp + 0x24], esi
jne 0x402a79
test byte [ebx + 0x14], 1
jne 0x402a79
test ecx, ecx
jle 0x402a79
mov eax, dword [esp + 0x10]
lea esi, [ecx*4]
jmp 0x402a60
mov edx, dword [0x423b94]
mov dword [eax], edx
mov dl, byte [0x423b98]
mov byte [eax + 4], dl
add eax, 4
sub ecx, 1
jne 0x402a60
test byte [ebx + 0x14], 2
mov ecx, ebp
je 0x402a96
call fcn.00401b70
mov edi, dword [esp + 0x10]
push eax
push str.___s_
lea eax, [esi + edi]
push eax
jmp 0x402aa9
call fcn.00401b70
mov edi, dword [esp + 0x10]
push eax
push str.___s__r_n
lea ecx, [esi + edi]
push ecx
call fcn.0041025a
add esp, 0xc
push 0
lea edx, [esp + 0x30]
push edx
add eax, esi
push eax
mov eax, dword [esp + 0x40]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x402ad5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x402ae6
push eax
call fcn.0040e862
add esp, 4
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc
pop esi
pop ebp
mov eax, 0x57
pop ebx
add esp, 0x20
ret 0xc