Function at 0x402810
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41cd40
mov eax, dword fs:[0]
push eax
sub esp, 0x2e0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 0xc]
lea ecx, [edi + 0x23c]
mov edx, dword [ebp + 8]
mov dword [ebp - 0x2d8], eax
lea eax, [ebp - 0x2a0]
push eax
mov dword [ebp - 0x2a0], edx
call fcn.00404a80
mov ebx, dword [eax]
mov dword [ebp - 0x298], ebx
mov dword [ebp - 0x290], ebx
test ebx, ebx
jne 0x4028b4
mov eax, dword [ebp - 0x2a0]
lea ecx, [ebp - 0x290]
push ecx
push 0x423624
push eax
mov edx, dword [eax]
call dword [edx + 0x38]
lea eax, [ebp - 0x2a0]
push eax
lea ecx, [edi + 0x23c]
call fcn.00404a80
mov ecx, dword [ebp - 0x290]
mov dword [eax], ecx
mov ebx, dword [ebp - 0x290]
mov dword [ebp - 0x298], ebx
mov dword [ebp - 0x2a8], 0
mov dword [ebp - 0x2e8], 0
mov dword [ebp - 0x2e4], 0
mov dword [ebp - 0x2e0], 0
lea ecx, [ebp - 0x2a4]
mov dword [ebp - 4], 0
mov eax, dword [ebx]
push ecx
push 0x1e
lea ecx, [ebp - 0x28c]
push ecx
push dword [ebp + 0x10]
lea ecx, [ebp - 0x2a8]
push ecx
push ebx
call dword [eax + 0x58]
mov ecx, dword [edi + 0x18]
push 0
test eax, eax
jne 0x402ae9
mov eax, dword [ebp - 0x2a4]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x294], eax
lea eax, [ebp - 0x2b8]
push eax
push 4
lea eax, [ebp - 0x294]
push eax
push ecx
call esi
test eax, eax
je 0x402b29
xor ebx, ebx
cmp dword [ebp - 0x2a4], ebx
jbe 0x402ab4
nop dword [eax + eax]
mov ecx, dword [ebp - 0x298]
lea edx, [ebp - 0x2c0]
push edx
lea edx, [ebp - 0x2c4]
push edx
mov eax, dword [ecx]
lea edx, [ebp - 0x2b0]
push edx
lea edx, [ebp - 0x2c8]
push edx
lea edx, [ebp - 0x29c]
push edx
push 0xff
lea edx, [ebp - 0x214]
push edx
lea edx, [ebp - 0x2b4]
push edx
lea edx, [ebp - 0x2cc]
push edx
push dword [ebp + ebx*4 - 0x28c]
push ecx
call dword [eax + 0xec]
mov ecx, dword [edi + 0x18]
push 0
test eax, eax
jne 0x402a30
mov eax, dword [ebp - 0x29c]
add eax, eax
mov dword [ebp - 0x29c], eax
lea eax, [ebp - 0x2ac]
push eax
push 4
lea eax, [ebp - 0x29c]
push eax
push ecx
call esi
mov eax, dword [ebp - 0x29c]
test eax, eax
je 0x4029f1
push 0
lea ecx, [ebp - 0x2ac]
push ecx
push eax
lea eax, [ebp - 0x214]
push eax
push dword [edi + 0x18]
call esi
mov eax, dword [ebp - 0x2b0]
push 0
mov dword [ebp - 0x294], eax
lea eax, [ebp - 0x2b8]
push eax
push 4
lea eax, [ebp - 0x294]
push eax
push dword [edi + 0x18]
call esi
test eax, eax
je 0x402b29
mov eax, dword [ebp - 0x2b4]
mov dword [ebp - 0x294], eax
lea eax, [ebp - 0x2d0]
jmp 0x402a8e
lea eax, [ebp - 0x2d4]
mov dword [ebp - 0x294], 0
push eax
push 4
lea eax, [ebp - 0x294]
push eax
push ecx
call esi
test eax, eax
je 0x402b29
push 0
lea eax, [ebp - 0x2d8]
mov dword [ebp - 0x294], 0
push eax
push 4
lea eax, [ebp - 0x294]
push eax
push dword [edi + 0x18]
call esi
test eax, eax
je 0x402b29
mov dword [ebp - 0x294], 0xffffffff
lea eax, [ebp - 0x2bc]
push 0
push eax
push 4
lea eax, [ebp - 0x294]
push eax
push dword [edi + 0x18]
call esi
test eax, eax
je 0x402b29
inc ebx
cmp ebx, dword [ebp - 0x2a4]
jb 0x402950
mov ebx, dword [ebp - 0x298]
mov ecx, dword [ebp - 0x2a8]
test ecx, ecx
je 0x402acb
mov eax, dword [ebx]
push ecx
push ebx
call dword [eax + 0xc]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004050db
mov esp, ebp
pop ebp
ret 0xc
lea eax, [ebp - 0x2bc]
mov dword [ebp - 0x294], 0
push eax
push 4
lea eax, [ebp - 0x294]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x402aba
push 0x424880
lea eax, [ebp - 0x298]
mov dword [ebp - 0x298], str.Write_Error
push eax
call fcn.0040656e
push 0x424880
lea eax, [ebp - 0x290]
mov dword [ebp - 0x290], str.Write_Error
push eax
call fcn.0040656e
int3