Function at 0x4a6ebe
Capabilities:
Extract resource via kernel32 functions
Get file size
Read file on windows

Disassembly:
push 0x3ec
mov eax, 0x5385f5
call fcn.00500c07
mov dword [ebp - 0x3f8], edx
mov eax, dword [ebp + 0xc]
xor edi, edi
mov esi, dword [ebp + 0x1c]
mov dword [ebp - 0x3f4], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x3f0], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x3ec], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x3e8], eax
test ecx, ecx
jne 0x4a7137
push 0x58ab80
lea ecx, [ebp - 0x9c]
call fcn.0047ce33
mov dword [ebp - 4], edi
mov eax, dword [0x58ac18]
cmp word [eax], di
jne 0x4a6fcc
cmp dword [ebp + 8], edi
je 0x4a6f38
push dword [ebp + 8]
lea ecx, [ebp - 0x9c]
call fcn.0047ce68
push edi
push pe_nt_image_headers32
push 3
push edi
push 1
push SysReAllocString
push dword [ebp - 0x9c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4a6f6f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x9c]
call fcn.0047ce58
jmp 0x4a71b0
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x4a6f5b
push esi
mov dword [ebp - 0x3e0], edi
call fcn.005008e0
pop ecx
push 0
mov edi, eax
lea eax, [ebp - 0x3e0]
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [0x53e34c]
cmp dword [ebp - 0x3e0], esi
je 0x4a7126
push edi
call fcn.005005bb
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x9c]
call fcn.0047ce58
jmp 0x4a71ae
push eax
lea ecx, [ebp - 0x9c]
call fcn.0047ce68
push 0x58acb0
lea ecx, [ebp - 0x1ac]
call fcn.0047ce33
mov byte [ebp - 4], 1
cmp byte [0x58aad9], 0
je 0x4a6ffd
mov ebx, dword [0x58ee64]
jmp 0x4a7029
mov ecx, dword [ebp - 0x1ac]
call fcn.00485466
mov ecx, dword [ebp - 0x9c]
mov esi, eax
push esi
push 2
xor edx, edx
call fcn.004bd47d
mov ebx, eax
pop ecx
pop ecx
test esi, esi
je 0x4a7029
push esi
call fcn.005005bb
pop ecx
test ebx, ebx
jne 0x4a703d
lea ecx, [ebp - 0x1ac]
call fcn.0047ce58
jmp 0x4a6f5b
push 0xffffffffffffffff
push dword [ebp + 8]
lea ecx, [ebp - 0x124]
mov dword [ebp - 0x3e0], edi
call fcn.0047ce0f
push 0x557934
push 0x557034
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 2
call fcn.0047d279
mov edx, dword [ebp - 0x124]
lea eax, [ebp - 0x3dc]
push eax
lea eax, [ebp - 0x3e0]
push eax
push ecx
mov ecx, ebx
call fcn.004bd4f7
add esp, 0xc
test eax, eax
je 0x4a709c
lea ecx, [ebp - 0x124]
call fcn.0047ce58
jmp 0x4a702d
mov esi, dword [ebp - 0x1b0]
test esi, esi
je 0x4a708f
push esi
call fcn.005008e0
mov edx, dword [ebp - 0x3e0]
mov edi, eax
pop ecx
push 3
push esi
push edi
mov ecx, ebx
call fcn.004bd52a
add esp, 0xc
test eax, eax
je 0x4a7100
cmp eax, 0x600
je 0x4a7100
push edi
call fcn.005005bb
cmp byte [0x58aad9], 0
pop ecx
jne 0x4a70e5
mov ecx, ebx
call fcn.004bd55d
lea ecx, [ebp - 0x124]
call fcn.0047ce58
lea ecx, [ebp - 0x1ac]
call fcn.0047ce58
jmp 0x4a6fb8
cmp byte [0x58aad9], 0
jne 0x4a7110
mov ecx, ebx
call fcn.004bd55d
lea ecx, [ebp - 0x124]
call fcn.0047ce58
lea ecx, [ebp - 0x1ac]
call fcn.0047ce58
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x9c]
call fcn.0047ce58
jmp 0x4a71aa
test esi, esi
jne 0x4a714a
mov esi, dword [0x58ee68]
test esi, esi
cmove esi, dword [0x58ee60]
push ecx
push dword [ebp + 8]
push esi
push ebx
call 0x806e61
mov ebx, eax
test ebx, ebx
je 0x4a71b0
push ebx
push esi
push eax
call 0x7d6e5a
mov dword [ebp - 0x3e4], eax
push ebx
test eax, eax
jne 0x4a7176
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x4a71b0
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test esi, esi
je 0x4a71b0
push esi
call fcn.005008e0
pop ecx
push esi
push dword [ebp - 0x3e4]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.00504830
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
test edi, edi
jne 0x4a7221
xor edi, edi
push edi
push pe_nt_image_headers32
push 3
push edi
push 1
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4a7215
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x4a7215
push esi
mov dword [ebp - 0x3e4], edi
call fcn.005008e0
pop ecx
push 0
mov edi, eax
lea eax, [ebp - 0x3e4]
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [0x53e34c]
cmp dword [ebp - 0x3e4], esi
je 0x4a721d
push edi
call fcn.005005bb
pop ecx
xor eax, eax
call fcn.00500bc5
ret
test edi, edi
je 0x4a7215
push dword [ebp - 0x3e8]
mov edx, esi
mov ecx, edi
push dword [ebp - 0x3ec]
push dword [ebp - 0x3f0]
push dword [ebp - 0x3f4]
push dword [ebp - 0x3f8]
call fcn.004a7258
add esp, 0x14
mov esi, eax
push edi
call fcn.005005bb
pop ecx
mov eax, esi
jmp 0x4a7217