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

Disassembly:
push 0xf4
mov eax, 0x447945
call fcn.00432375
xor ebx, ebx
mov esi, edx
mov edi, ecx
mov dword [ebp - 0xe0], esi
mov dword [ebp - 0x68], 7
mov dword [ebp - 0x6c], ebx
mov word [ebp - 0x7c], bx
lea ecx, [ebp - 0x80]
mov eax, esi
mov dword [ebp - 4], ebx
call fcn.004022e5
lea eax, [ebp - 0x80]
push eax
push edi
lea edi, [ebp - 0x2c]
call fcn.00406270
mov eax, edi
push eax
mov byte [ebp - 4], 1
call fcn.00406ea0
add esp, 0xc
test al, al
je 0x4020c2
mov eax, edi
push eax
call fcn.00409240
pop ecx
lea eax, [ebp - 0x2c]
push eax
call fcn.00406ea0
test al, al
pop ecx
je 0x4021aa
lea eax, [ebp - 0x2c]
lea esi, [ebp - 0x9c]
call fcn.00403618
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.004096d0
test al, al
je 0x402192
lea eax, [ebp - 0x2c]
push eax
call fcn.004090e0
pop ecx
mov dword [ebp - 0x4c], 7
mov dword [ebp - 0x50], ebx
mov word [ebp - 0x60], bx
mov eax, 0x44b1c0
lea ecx, [ebp - 0x100]
mov byte [ebp - 4], 3
call fcn.004015ff
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0xd8]
push eax
mov byte [ebp - 4], 4
call fcn.004068b0
push ebx
push 1
lea esi, [ebp - 0x100]
mov byte [ebp - 4], 6
call fcn.0040169d
lea eax, [ebp - 0xb8]
push eax
lea edx, [ebp - 0x64]
lea ecx, [ebp - 0xd8]
call fcn.00406a40
test al, al
je 0x402173
lea eax, [ebp - 0x9c]
push eax
lea esi, [ebp - 0x64]
call fcn.004090e0
pop ecx
lea eax, [ebp - 0xd8]
push eax
mov byte [ebp - 4], 3
call fcn.00406940
push ebx
push 1
lea esi, [ebp - 0x64]
mov byte [ebp - 4], 2
call fcn.0040169d
push ebx
push 1
lea esi, [ebp - 0x9c]
mov byte [ebp - 4], 1
call fcn.0040169d
mov esi, dword [ebp - 0xe0]
lea eax, [ebp - 0x2c]
push eax
call fcn.00406ea0
test al, al
pop ecx
je 0x4021e8
mov byte [ebp - 0xd9], 1
push ebx
push 1
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], bl
call fcn.0040169d
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea esi, [ebp - 0x80]
call fcn.0040169d
mov al, byte [ebp - 0xd9]
call fcn.004323bf
ret
mov eax, str.USER_FILE
lea ecx, [ebp - 0x48]
call fcn.004015ff
mov byte [ebp - 4], 7
cmp dword [ebp - 0x30], 8
mov eax, dword [ebp - 0x44]
jae 0x402205
lea eax, [ebp - 0x44]
push eax
movzx eax, word [esi]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
cmp esi, ebx
jne 0x40222e
push ebx
push 1
lea esi, [ebp - 0x48]
mov byte [ebp - 4], 1
call fcn.0040169d
mov byte [ebp - 0xd9], bl
jmp 0x4021bf
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp eax, ebx
mov dword [ebp - 0xe0], eax
je 0x402217
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [ebp - 0xe4], eax
je 0x402217
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
cmp edi, ebx
je 0x402217
cmp dword [ebp - 0x14], 8
mov eax, dword [ebp - 0x28]
mov byte [ebp - 0xd9], bl
jae 0x402271
lea eax, [ebp - 0x28]
push 0x44b1dc
push eax
call fcn.00430207
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x4022ac
push esi
push dword [ebp - 0xe0]
push 1
push edi
call fcn.004304eb
add esp, 0x10
cmp dword [ebp - 0xe0], eax
jne 0x4022a5
mov byte [ebp - 0xd9], 1
push esi
call fcn.004300c5
pop ecx
push dword [ebp - 0xe4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp byte [ebp - 0xd9], bl
push ebx
push 1
lea esi, [ebp - 0x48]
setne byte [ebp - 0xd9]
mov byte [ebp - 4], 1
call fcn.0040169d
mov al, byte [ebp - 0xd9]
mov byte [ebp - 0xd9], al
jmp 0x4021bf