Function at 0x404380
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44a8a8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x45e274]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x45e020]
mov edx, dword [eax + 0xc]
mov ecx, 0x45e020
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
movzx ebx, word [ebp + 0xc]
mov dword [ebp - 4], 0
mov eax, dword [0x461624]
mov ecx, dword [0x461618]
lea eax, [eax + eax*8]
lea eax, [eax*4 + 0x45fd28]
movzx eax, word [eax]
push eax
push ebx
push 0x4515e8
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov edi, eax
test edi, edi
jne 0x404410
movzx edx, word [0x45fd28]
mov eax, dword [0x461618]
push edx
push ebx
push 0x4515e8
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov edi, eax
mov ecx, dword [0x461618]
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
mov dword [ebp - 0x18], ebx
test ebx, ebx
jne 0x404462
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404573
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x404549
mov ecx, dword [0x461618]
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
je 0x40449a
mov edx, dword [ebp - 0x10]
mov al, byte [edx]
cmp al, 0xff
je 0x404495
cmp al, 0xfe
jne 0x40449a
dec edi
add dword [ebp - 0x10], 2
lea ebx, [edi + 1]
test ebx, ebx
jns 0x4044ab
push 0x80070057
call fcn.00403700
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x4044c9
mov eax, ebx
lea ecx, [ebp - 0x14]
call fcn.00405ee0
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
push edi
push eax
push ebx
push esi
call fcn.0042fca3
add esp, 0x10
mov eax, edi
cmp edi, 0xffffffff
jne 0x4044ec
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0042fd58
add esp, 8
test eax, eax
js 0x4044a1
cmp eax, dword [esi - 8]
jg 0x4044a1
mov ecx, dword [ebp - 0x18]
mov dword [esi - 0xc], eax
push ecx
mov byte [eax + esi], 0
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov edi, dword [ebp + 8]
mov ecx, esi
call fcn.00404190
mov edi, eax
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404535
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404573
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret