Function at 0x409658
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004034b8
mov eax, dword [ebp - 8]
call fcn.004034b8
mov eax, dword [ebp - 0xc]
call fcn.004034b8
xor eax, eax
push ebp
push 0x409897
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0xd], 0
push 0xa
mov eax, dword [ebp - 8]
call fcn.004034c8
push eax
mov eax, dword [0x40f650]
push eax
call sub.kernel32.dll_FindResourceA
mov ebx, eax
test ebx, ebx
je 0x409853
push ebx
mov eax, dword [0x40f650]
push eax
call sub.kernel32.dll_LoadResource
mov esi, eax
test esi, esi
je 0x409853
push ebx
push 0
call sub.kernel32.dll_SizeofResource
mov ebx, eax
test ebx, ebx
je 0x409853
push esi
call sub.kernel32.dll_LockResource
mov esi, eax
test esi, esi
je 0x409853
mov eax, dword [ebp - 4]
mov edx, 0x4098b0
call fcn.00403414
jne 0x4097cc
push ebx
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x409618]
call fcn.00403bd8
add esp, 4
mov eax, dword [ebp - 0x14]
mov ecx, ebx
mov edx, esi
call fcn.00404194
push 0
push 0
lea eax, [ebp - 0x24]
mov edx, dword [0x40ecf4]
mov edx, dword [edx]
call fcn.00403280
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x14]
mov edx, ebx
call fcn.00409350
lea eax, [ebx + ebx*2]
push eax
lea eax, [ebp - 0x18]
mov ecx, 1
mov edx, dword [0x409638]
call fcn.00403bd8
add esp, 4
lea eax, [ebp - 0x1c]
push eax
push 0
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov edx, ebx
call fcn.00404274
push 0
push 0
push 2
push 0
push 1
push 0xc0000000
mov eax, dword [ebp - 0xc]
call fcn.004034c8
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
je 0x409853
push 0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
push esi
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x4097c1
mov byte [ebp - 0xd], 1
push esi
call sub.kernel32.dll_CloseHandle
jmp 0x409853
push ebx
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x409618]
call fcn.00403bd8
add esp, 4
mov eax, dword [ebp - 0x14]
mov ecx, ebx
mov edx, esi
call fcn.00404194
push 0
push 0
lea eax, [ebp - 0x28]
mov edx, dword [0x40ecf4]
mov edx, dword [edx]
call fcn.00403280
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x14]
mov edx, ebx
call fcn.00409350
push 0
push 0
push 2
push 0
push 1
push 0xc0000000
mov eax, dword [ebp - 0xc]
call fcn.004034c8
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
je 0x409853
push 0
lea eax, [ebp - 0x20]
push eax
push ebx
mov eax, dword [ebp - 0x14]
push eax
push esi
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x40984d
mov byte [ebp - 0xd], 1
push esi
call sub.kernel32.dll_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40989e
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.004031a0
lea eax, [ebp - 0x18]
mov edx, dword [0x409638]
call fcn.00403be4
lea eax, [ebp - 0x14]
mov edx, dword [0x409618]
call fcn.00403be4
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004031a0
ret