Function at 0x405d99
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
lea ecx, [ebp + 0x1c]
mov dword [ebp - 8], ebx
call fcn.00401052
test eax, eax
jle 0x405e44
lea ecx, [ebp + 0x1c]
call fcn.00401062
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x405e44
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
push ecx
mov ecx, esp
push ebx
push 0xa
push eax
call fcn.00401443
push ecx
push ecx
mov ecx, esp
push 0x40cf04
call fcn.0040140d
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0xc]
call fcn.00401037
mov ecx, eax
call fcn.004014d9
mov ecx, eax
call fcn.004014d9
push ecx
push ecx
mov ecx, esp
push eax
call fcn.00401037
push 0x402
mov ecx, dword [esi]
push 1
push ebx
call fcn.004026fa
lea ecx, [ebp - 0xc]
call fcn.00401471
lea ecx, [ebp + 8]
call fcn.00401471
lea ecx, [ebp + 0x1c]
call fcn.00401471
xor al, al
pop edi
pop esi
pop ebx
leave
ret 0x20
push 0xa
push dword [ebp + 0x10]
mov ecx, esi
mov byte [ebp - 1], bl
call fcn.00405790
add eax, 0xc8
movzx eax, ax
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
cmp edi, ebx
jne 0x405eba
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
push ecx
mov ecx, esp
push ebx
push 0xa
push eax
call fcn.00401443
push ecx
push ecx
mov ecx, esp
push 0x40cf04
call fcn.0040140d
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0xc]
call fcn.00401037
mov ecx, eax
call fcn.004014d9
mov ecx, eax
call fcn.004014d9
push ecx
push ecx
mov ecx, esp
push eax
call fcn.00401037
push 0x403
jmp 0x405e19
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp + 0x10], eax
cmp eax, ebx
jne 0x405f3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
push ecx
mov ecx, esp
push ebx
push 0xa
push eax
call fcn.00401443
push ecx
push ecx
mov ecx, esp
push 0x40cf04
call fcn.0040140d
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0xc]
call fcn.00401037
mov ecx, eax
call fcn.004014d9
mov ecx, eax
call fcn.004014d9
push ecx
push ecx
mov ecx, esp
push eax
call fcn.00401037
mov ecx, dword [esi]
push 0x404
push 1
push ebx
call fcn.004026fa
lea ecx, [ebp - 0xc]
call fcn.00401471
lea ecx, [ebp + 8]
call fcn.00401471
lea ecx, [ebp + 0x1c]
call fcn.00401471
mov al, bl
jmp 0x405e3d
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp + 0x10]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, ebx
jne 0x405fb5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
push ecx
mov ecx, esp
push ebx
push 0xa
push eax
call fcn.00401443
push ecx
push ecx
mov ecx, esp
push 0x40cf04
call fcn.0040140d
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x14]
call fcn.00401037
mov ecx, eax
call fcn.004014d9
mov ecx, eax
call fcn.004014d9
push ecx
push ecx
mov ecx, esp
push eax
call fcn.00401037
mov ecx, dword [esi]
push 0x405
push 1
push ebx
call fcn.004026fa
lea ecx, [ebp - 0x14]
call fcn.00401471
jmp 0x405fda
push dword [ebp + 0x24]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edi
push eax
push ecx
push ecx
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00401037
mov ecx, esi
call fcn.00405a92
test eax, eax
setne byte [ebp - 1]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_FreeResource]
lea ecx, [ebp + 0x1c]
call fcn.00401052
test eax, eax
jle 0x405ff8
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov bl, byte [ebp - 1]
jmp 0x405f27