Function at 0x402b80
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x405b2b
mov eax, dword fs:[0]
push eax
sub esp, 0x514
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x510], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [section..data]
xor eax, esp
push eax
lea eax, [esp + 0x528]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, edx
mov ebp, dword [edi]
test ebp, ebp
je 0x402c1f
test ebx, ebx
je 0x402c1f
cmp ebx, 2
je 0x402c1f
cmp ebx, 0xa
je 0x402c1f
lea esi, [esp + 0x1c]
call fcn.00404fb0
cmp ebx, 1
mov dword [esp + 0x530], 0
je 0x402c76
cmp ebx, 0xb
jne 0x402c49
mov eax, esi
push eax
push 0x80343434
mov eax, edi
call fcn.004021e0
add esp, 8
test eax, eax
jne 0x402c62
lea eax, [esp + 0x1c]
mov dword [esp + 0x530], 0xffffffff
call fcn.00404ff0
xor eax, eax
mov ecx, dword [esp + 0x528]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x510]
xor ecx, esp
call fcn.00405321
add esp, 0x520
ret
cmp ebx, 0xc
jne 0x402c0b
mov edx, dword [edi + 4]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, ebp
call fcn.00401e10
add esp, 4
jmp 0x402c07
lea edx, [esp + 0x1c]
push edx
call fcn.00402010
add esp, 4
cmp eax, 1
je 0x402c92
jmp 0x402c0b
push ebp
lea eax, [edi + 0x108]
push eax
mov eax, dword [edi + 4]
lea ecx, [esp + 0x24]
call fcn.00405100
test eax, eax
je 0x402c0b
push 0x4062bc
add edi, 0x108
push edi
call dword [sym.imp.MSVCR80.dll_fopen]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x402c0b
mov edx, dword [0x408854]
mov eax, dword [0x408850]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x20]
push edx
push eax
push ecx
call fcn.00401130
add esp, 0x10
test eax, eax
push ebx
je 0x402d29
mov esi, dword [esp + 0x1c]
mov ebp, dword [sym.imp.MSVCR80.dll_fwrite]
push eax
push 1
push esi
call ebp
push ebx
call dword [sym.imp.MSVCR80.dll_fflush]
add esp, 0x14
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
push 0x252
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
je 0x402d28
push 0x10101
push 0x4073f8
mov esi, eax
mov edi, 0x242
call fcn.00401670
mov esi, eax
add esp, 8
test esi, esi
jne 0x402d37
push ebx
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
jmp 0x402c0b
push ebx
push 0x252
push 1
push esi
call ebp
mov edi, dword [sym.imp.MSVCR80.dll_fflush]
push ebx
call edi
add esp, 0x14
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
mov eax, dword [0x40834c]
mov ecx, dword [0x408348]
add esp, 4
lea edx, [esp + 0x18]
push edx
push 0x80121212
push 0x408350
push eax
push ecx
mov dword [esp + 0x2c], 0
call fcn.004017b0
add esp, 0x14
mov esi, eax
test esi, esi
push ebx
je 0x402d29
mov edx, dword [esp + 0x1c]
push edx
push 1
push esi
call ebp
push ebx
call edi
add esp, 0x14
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
mov ecx, dword [0x408854]
mov edx, dword [0x408850]
add esp, 4
lea eax, [esp + 0x18]
push eax
push 0x80232323
push 0x408858
push ecx
push edx
mov dword [esp + 0x2c], 0
call fcn.004017b0
add esp, 0x14
mov esi, eax
test esi, esi
push ebx
je 0x402d29
mov eax, dword [esp + 0x1c]
push eax
push 1
push esi
call ebp
push ebx
call edi
add esp, 0x14
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x24]
add esp, 4
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x20]
push 0x80343434
lea edx, [esp + 0x2c]
push edx
push eax
push ecx
mov dword [esp + 0x2c], 0
call fcn.004017b0
add esp, 0x14
mov esi, eax
test esi, esi
push ebx
je 0x402d29
mov edx, dword [esp + 0x1c]
push edx
push 1
push esi
call ebp
push ebx
call edi
add esp, 0x14
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
push ebx
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
lea eax, [esp + 0x1c]
mov dword [esp + 0x530], 0xffffffff
call fcn.00404ff0
mov eax, 1
jmp 0x402c21