Function at 0x405997
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 0x405a42
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 0x405a42
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 0x40bebc
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.004025a7
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.0040538e
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 0x405ab8
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 0x40bebc
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 0x405a17
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp + 0x10], eax
cmp eax, ebx
jne 0x405b3c
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 0x40bebc
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.004025a7
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 0x405a3b
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 0x405bb3
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 0x40bebc
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.004025a7
lea ecx, [ebp - 0x14]
call fcn.00401471
jmp 0x405bd8
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.00405690
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 0x405bf6
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov bl, byte [ebp - 1]
jmp 0x405b25