Function at 0x406317
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 0x4063c2
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 0x4063c2
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 0x40d0c4
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.004028c5
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.00405b74
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 0x406438
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 0x40d0c4
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 0x406397
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp + 0x10], eax
cmp eax, ebx
jne 0x4064bc
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 0x40d0c4
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.004028c5
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 0x4063bb
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 0x406533
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 0x40d0c4
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.004028c5
lea ecx, [ebp - 0x14]
call fcn.00401471
jmp 0x406558
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.00406010
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 0x406576
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov bl, byte [ebp - 1]
jmp 0x4064a5