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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d8809
mov eax, dword fs:[0]
push eax
sub esp, 0x310
mov eax, dword [0x5176f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x2c8]
call fcn.004041c0
mov byte [ebp - 4], 1
push fcn.004afb0a
lea ecx, [ebp - 0x2e4]
push ecx
lea ecx, [ebp - 0x2c8]
call fcn.00402720
mov edx, dword [eax]
push edx
lea eax, [ebp - 0x2e8]
push eax
lea ecx, [ebp - 0x2c8]
call fcn.00402750
mov ecx, dword [eax]
push ecx
lea edx, [ebp - 0x2ec]
push edx
lea ecx, [ebp - 0x2c8]
call fcn.00402720
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x2f0]
push ecx
call fcn.00403090
add esp, 0x14
lea edx, [ebp - 0x2c8]
push edx
lea ecx, [ebp - 0x2ac]
call fcn.004041c0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2ac]
call fcn.004041a0
push eax
call fcn.00401240
add esp, 4
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x300], eax
mov ecx, dword [ebp - 0x300]
add ecx, 1
mov dword [ebp - 0x304], ecx
mov edx, dword [ebp - 0x300]
mov al, byte [edx]
mov byte [ebp - 0x305], al
add dword [ebp - 0x300], 1
cmp byte [ebp - 0x305], 0
jne 0x4021be
mov ecx, dword [ebp - 0x300]
sub ecx, dword [ebp - 0x304]
mov dword [ebp - 0x30c], ecx
mov edx, dword [ebp - 0x30c]
push edx
mov eax, dword [ebp - 0x68]
push eax
call fcn.00401260
add esp, 8
mov dword [ebp - 0x290], eax
xor ecx, ecx
mov word [ebp - 0x28c], cx
push 0x206
push 0
lea edx, [ebp - 0x28a]
push edx
call fcn.004b28e0
add esp, 0xc
mov eax, dword [ebp - 0x290]
push eax
push str.id__s
lea ecx, [ebp - 0x28c]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea edx, [ebp - 0x28c]
push edx
lea ecx, [ebp - 0x2c]
call fcn.00404aa0
mov dword [ebp - 0x310], eax
mov eax, dword [ebp - 0x310]
mov dword [ebp - 0x314], eax
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x314]
push ecx
lea ecx, [ebp - 0x2ac]
call fcn.00402670
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2c]
call fcn.00404250
cmp dword [ebp - 0x68], 0
je 0x4022a3
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x2f4], edx
mov eax, dword [ebp - 0x2f4]
push eax
call fcn.004aeb11
add esp, 4
cmp dword [ebp - 0x290], 0
je 0x4022c7
mov ecx, dword [ebp - 0x290]
mov dword [ebp - 0x2f8], ecx
mov edx, dword [ebp - 0x2f8]
push edx
call fcn.004aeb11
add esp, 4
lea ecx, [ebp - 0x2c8]
call fcn.004042b0
mov esi, eax
push 0xffffffffffffffff
push 0x2e
lea ecx, [ebp - 0x2c8]
call fcn.00420a30
sub esi, eax
sub esi, 1
push esi
push 0xffffffffffffffff
push 0x2e
lea ecx, [ebp - 0x2c8]
call fcn.00420a30
add eax, 1
push eax
lea eax, [ebp - 0x84]
push eax
lea ecx, [ebp - 0x2c8]
call fcn.00402800
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x84]
call fcn.004041a0
push eax
lea ecx, [ebp - 0x2ac]
call fcn.004041a0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x2dc], eax
cmp dword [ebp - 0x2dc], 0
jne 0x40238f
mov byte [ebp - 0x2f9], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x84]
call fcn.00404250
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2ac]
call fcn.00404250
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c8]
call fcn.00404250
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00404250
mov al, byte [ebp - 0x2f9]
jmp 0x402594
mov ecx, dword [ebp - 0x2dc]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x2d8], eax
mov edx, dword [ebp - 0x2d8]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x2d0], eax
mov eax, dword [ebp - 0x2dc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x2d4], eax
lea ecx, [ebp + 0xc]
push ecx
call fcn.00404bd0
add esp, 4
movzx edx, al
test edx, edx
jne 0x40242d
mov byte [ebp - 0x2fa], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x84]
call fcn.00404250
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2ac]
call fcn.00404250
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c8]
call fcn.00404250
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00404250
mov al, byte [ebp - 0x2fa]
jmp 0x402594
push 0x4fd978
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x48]
push ecx
call fcn.00402e60
add esp, 0xc
mov dword [ebp - 0x318], eax
mov edx, dword [ebp - 0x318]
mov dword [ebp - 0x31c], edx
mov byte [ebp - 4], 5
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x31c]
push ecx
lea edx, [ebp - 0x64]
push edx
call fcn.00403050
add esp, 0xc
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x48]
call fcn.00404250
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x64]
call fcn.004041a0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2cc], eax
cmp dword [ebp - 0x2cc], 0xffffffff
je 0x402543
push 0
lea eax, [ebp - 0x2e0]
push eax
mov ecx, dword [ebp - 0x2d4]
push ecx
mov edx, dword [ebp - 0x2d0]
push edx
mov eax, dword [ebp - 0x2cc]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x2cc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x2e0]
xor eax, eax
cmp edx, dword [ebp - 0x2d4]
sete al
mov byte [ebp - 0x2fb], al
lea ecx, [ebp - 0x64]
call fcn.00404250
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x84]
call fcn.00404250
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2ac]
call fcn.00404250
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c8]
call fcn.00404250
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00404250
mov al, byte [ebp - 0x2fb]
jmp 0x402594
mov byte [ebp - 0x2fc], 0
lea ecx, [ebp - 0x64]
call fcn.00404250
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x84]
call fcn.00404250
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2ac]
call fcn.00404250
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c8]
call fcn.00404250
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00404250
mov al, byte [ebp - 0x2fc]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004ae123
mov esp, ebp
pop ebp
ret