Function at 0x4039d0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x14], 0
cmp dword [ebp + 0xc], 2
jne 0x403a4a
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x18]
call fcn.004050c0
cmp dword [ebp + 0x10], 0
je 0x403a00
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x30], ecx
jmp 0x403a0d
mov ecx, 0x4c5d4c
call fcn.00403bc0
mov dword [ebp - 0x30], eax
lea ecx, [ebp - 0x18]
call fcn.00405120
push eax
mov edx, dword [ebp - 0x30]
push edx
call fcn.00403e20
add esp, 8
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x2c]
add ecx, 0x10
call fcn.00405880
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x28], ecx
lea ecx, [ebp - 0x18]
call fcn.00405100
mov eax, dword [ebp - 0x28]
jmp 0x403bae
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
je 0x403a66
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x34], edx
jmp 0x403a73
mov ecx, 0x4c5d4c
call fcn.00403bc0
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp + 0x10], eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x403a9c
mov eax, dword [ebp - 0x14]
jmp 0x403bae
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x403abb
mov eax, dword [ebp - 0x14]
jmp 0x403bae
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x403ba1
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jle 0x403ba1
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 8]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x24], eax
lea ecx, [ebp - 0x24]
push ecx
mov ecx, dword [ebp - 0x2c]
add ecx, 4
call fcn.00405690
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call fcn.00469d40
add esp, 0xc
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
jne 0x403b50
mov eax, dword [ebp - 0x14]
jmp 0x403bae
lea edx, [ebp - 0x20]
push edx
push 0
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
je 0x403b69
mov eax, dword [ebp - 0x14]
jmp 0x403bae
push 0
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.00403bd0
add esp, 8
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x14]
push edx
mov ecx, dword [ebp - 0x2c]
add ecx, 0x10
call fcn.00405880
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ecx + 8]
call eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret 0xc