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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56f418
mov eax, dword fs:[0]
push eax
sub esp, 0x8a0
mov eax, dword [0x5c524c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0xc]
lea ecx, [ebp - 0x66c]
push 0xffffffffffffffff
push dword [ebp + 8]
mov dword [ebp - 0x8a4], ebx
call fcn.0048bc90
push 4
lea eax, [ebp - 0x5e8]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x66c]
call fcn.0048d3f0
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.00473f10
push eax
push 0x587668
call fcn.005295d9
add esp, 8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x5e8]
mov esi, eax
call fcn.00420cc0
test esi, esi
jne 0x4a0d05
xor eax, eax
push 0x200
push eax
mov dword [ebp - 0x18], eax
mov word [ebp - 0x14], ax
lea eax, [ebp - 0x86c]
push eax
call fcn.0051e5a0
push 0x200
lea eax, [ebp - 0x418]
push esi
push eax
call fcn.0051e5a0
push 0x200
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.0051e5a0
push 0x100
lea eax, [ebp - 0x218]
push eax
push 0x100
lea eax, [ebp - 0x418]
push eax
push 0x100
lea eax, [ebp - 0x86c]
push eax
push 3
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
call fcn.00537007
add esp, 0x48
lea eax, [ebp - 0x218]
push 0x587668
push eax
call fcn.005295d9
add esp, 8
test eax, eax
jne 0x4a0d05
xor edi, edi
lea eax, [ebp - 0x18]
mov ecx, 0x5798f8
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4a0af6
test dx, dx
je 0x4a0af2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4a0af6
add eax, 4
add ecx, 4
test dx, dx
jne 0x4a0ad0
xor eax, eax
jmp 0x4a0afb
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4a0bdb
call fcn.0048ef90
push eax
lea ecx, [ebp - 0x520]
call fcn.0048bbd0
mov byte [ebp - 4], 2
call fcn.0048eed0
push eax
lea ecx, [ebp - 0x49c]
call fcn.0048bbd0
mov ebx, dword [sym.imp.USER32.dll_LoadImageW]
lea esi, [ebp - 0x520]
mov byte [ebp - 4], 3
nop dword [eax]
push esi
lea ecx, [ebp - 0x5e8]
call fcn.0048bbd0
lea ecx, [ebp - 0x5e8]
mov byte [ebp - 4], 4
call fcn.0048cb50
test al, al
jne 0x4a0b8b
push dword [ebp + 8]
lea ecx, [ebp - 0x5e8]
call fcn.0048c190
push 0x50
push 0
push 0
push 1
lea ecx, [ebp - 0x5e8]
call fcn.00473f10
push eax
push 0
call ebx
mov edi, eax
test edi, edi
jne 0x4a0bac
lea ecx, [ebp - 0x5e8]
mov byte [ebp - 4], 3
call fcn.00420cc0
add esi, 0x84
lea eax, [ebp - 0x418]
cmp esi, eax
jne 0x4a0b40
jmp 0x4a0bb7
lea ecx, [ebp - 0x5e8]
call fcn.00420cc0
push fcn.00420cc0
push 2
push 0x84
lea eax, [ebp - 0x520]
mov byte [ebp - 4], 0
push eax
call fcn.00472891
mov ebx, dword [ebp - 0x8a4]
jmp 0x4a0bf0
push 0x50
push 0
push 0
push 1
push dword [ebp + 8]
push 0
call dword [sym.imp.USER32.dll_LoadImageW]
mov edi, eax
test edi, edi
je 0x4a0d05
push 0x98
call fcn.0047298f
mov esi, eax
add esp, 4
mov dword [ebp - 0x8a8], esi
mov byte [ebp - 4], 5
test esi, esi
je 0x4a0c1f
lea ecx, [esi + 0x10]
call fcn.0048bcc0
jmp 0x4a0c21
xor esi, esi
lea eax, [ebp - 0x534]
push eax
push edi
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
jne 0x4a0c49
mov eax, dword [ebp + 0x10]
xor ebx, ebx
mov dword [esi], ebx
mov byte [esi + 0xc], 1
mov dword [esi + 0x94], eax
jmp 0x4a1483
mov eax, dword [ebp - 0x530]
push 0
lea ebx, [eax + eax]
mov eax, dword [ebp - 0x52c]
add eax, eax
mov dword [ebp - 0x8a8], ebx
mov dword [ebp - 0x8a4], eax
mov dword [esi + 4], ebx
mov dword [esi + 8], eax
call dword [sym.imp.USER32.dll_GetDC]
push eax
mov dword [ebp - 0x890], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push dword [ebp - 0x8a4]
mov dword [ebp - 0x898], eax
push ebx
push dword [ebp - 0x890]
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov ebx, eax
test ebx, ebx
je 0x4a0c33
push ebx
push dword [ebp - 0x898]
call dword [sym.imp.GDI32.dll_SelectObject]
push 3
push 0
push 0
push dword [ebp - 0x8a4]
push dword [ebp - 0x8a8]
push edi
push 0
push 0
push dword [ebp - 0x898]
call dword [sym.imp.USER32.dll_DrawIconEx]
push dword [ebp - 0x898]
call dword [sym.imp.GDI32.dll_DeleteDC]
push dword [ebp - 0x890]
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push edi
call dword [sym.imp.USER32.dll_DestroyIcon]
mov eax, dword [ebp + 0x10]
mov dword [esi], ebx
mov byte [esi + 0xc], 1
mov dword [esi + 0x94], eax
jmp 0x4a1483
mov dword [ebp - 0x88c], 0
mov dword [ebp - 0x888], 0
test ebx, ebx
jne 0x4a10fb
call fcn.0048eee0
mov ecx, eax
call fcn.0048cb50
test al, al
je 0x4a0e94
or edi, 0xffffffff
call fcn.0048ef90
push eax
lea ecx, [ebp - 0x520]
call fcn.0048bbd0
mov byte [ebp - 4], 6
call fcn.0048eed0
push eax
lea ecx, [ebp - 0x49c]
call fcn.0048bbd0
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
lea esi, [ebp - 0x520]
mov byte [ebp - 4], 7
nop
push esi
lea ecx, [ebp - 0x5e8]
call fcn.0048bbd0
lea ecx, [ebp - 0x5e8]
mov byte [ebp - 4], 8
call fcn.0048cb50
test al, al
jne 0x4a0dc4
push dword [ebp + 8]
lea ecx, [ebp - 0x5e8]
call fcn.0048c190
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
lea ecx, [ebp - 0x5e8]
call fcn.00473f10
push eax
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x4a0de5
lea ecx, [ebp - 0x5e8]
mov byte [ebp - 4], 7
call fcn.00420cc0
add esi, 0x84
lea eax, [ebp - 0x418]
cmp esi, eax
jne 0x4a0d70
jmp 0x4a0df0
lea ecx, [ebp - 0x5e8]
call fcn.00420cc0
push fcn.00420cc0
push 2
push 0x84
lea eax, [ebp - 0x520]
mov byte [ebp - 4], 0
push eax
call fcn.00472891
cmp edi, 0xffffffff
je 0x4a122c
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x888], eax
test eax, eax
je 0x4a117d
push eax
mov dword [ebp - 0x890], 0
call fcn.00472ca5
add esp, 4
mov dword [ebp - 0x88c], eax
lea ecx, [ebp - 0x890]
push 0
push ecx
push dword [ebp - 0x888]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
mov eax, dword [ebp - 0x888]
cmp dword [ebp - 0x890], eax
je 0x4a1183
push dword [ebp - 0x88c]
call fcn.00472cae
add esp, 4
mov dword [ebp - 0x88c], 0
jmp 0x4a1191
call fcn.0048f0c0
test al, al
je 0x4a1009
mov dword [ebp - 0x890], 0xffffffff
call fcn.0048efb0
mov dword [ebp - 0x18], eax
call fcn.0048eef0
mov dword [ebp - 0x14], eax
lea esi, [ebp - 0x18]
nop
mov edi, dword [esi]
test edi, edi
je 0x4a0f8d
push 0x218
lea eax, [ebp - 0x884]
push 0
push eax
call fcn.0051e5a0
add esp, 0xc
mov dword [ebp - 0x528], 0
xor eax, eax
mov dword [ebp - 0x524], 7
mov word [ebp - 0x538], ax
mov eax, dword [ebp + 8]
mov edx, eax
lea ebx, [edx + 2]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x4a0f05
sub edx, ebx
lea ecx, [ebp - 0x538]
sar edx, 1
push edx
push eax
call fcn.0041cb00
lea eax, [ebp - 0x884]
mov byte [ebp - 4], 9
push eax
lea eax, [ebp - 0x890]
push eax
lea eax, [ebp - 0x538]
push eax
push edi
call fcn.004855d0
mov edx, dword [ebp - 0x524]
add esp, 0x10
mov byte [ebp - 4], 0
mov ebx, eax
cmp edx, 8
jb 0x4a0f89
mov ecx, dword [ebp - 0x538]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4a0f7f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4a14ac
push edx
push ecx
call fcn.004729bf
add esp, 8
test ebx, ebx
jne 0x4a0fa0
add esi, 4
lea eax, [ebp - 0x10]
cmp esi, eax
jne 0x4a0ec0
jmp 0x4a1171
mov eax, dword [ebp - 0x670]
mov dword [ebp - 0x888], eax
test eax, eax
je 0x4a1177
push eax
call fcn.00472ca5
push dword [ebp - 0x888]
mov dword [ebp - 0x88c], eax
push eax
push dword [ebp - 0x890]
push edi
call fcn.00485320
add esp, 0x14
test eax, eax
jne 0x4a1171
push 1
push dword [ebp - 0x88c]
call fcn.004729bf
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
add esp, 8
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x88c], 0
jmp 0x4a1191
mov edi, 0x80004005
call fcn.0048efa0
push eax
lea eax, [ebp - 0x520]
push eax
call fcn.0048ef90
mov ecx, eax
call fcn.0048c0a0
mov byte [ebp - 4], 0xa
call fcn.0048eee0
push eax
lea eax, [ebp - 0x49c]
push eax
call fcn.0048eed0
mov ecx, eax
call fcn.0048c0a0
mov byte [ebp - 4], 0xb
lea esi, [ebp - 0x520]
nop
push esi
lea ecx, [ebp - 0x5e8]
call fcn.0048bbd0
lea ecx, [ebp - 0x5e8]
mov byte [ebp - 4], 0xc
call fcn.0048cb50
test al, al
jne 0x4a109a
lea eax, [ebp - 0x888]
push eax
lea eax, [ebp - 0x88c]
push eax
push dword [ebp + 8]
lea ecx, [ebp - 0x5e8]
call fcn.00473f10
push eax
call fcn.00483fa0
mov edi, eax
add esp, 0x10
test edi, edi
jns 0x4a10bb
lea ecx, [ebp - 0x5e8]
mov byte [ebp - 4], 0xb
call fcn.00420cc0
add esi, 0x84
lea eax, [ebp - 0x418]
cmp esi, eax
jne 0x4a1050
jmp 0x4a10c6
lea ecx, [ebp - 0x5e8]
call fcn.00420cc0
push fcn.00420cc0
push 2
push 0x84
lea eax, [ebp - 0x520]
mov byte [ebp - 4], 0
push eax
call fcn.00472891
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
test edi, edi
js 0x4a122c
mov eax, dword [ebp - 0x888]
jmp 0x4a117d
push ebx
push dword [ebp + 8]
call fcn.0048eec0
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x4a1226
push esi
call fcn.0048eec0
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
push esi
test edi, edi
je 0x4a116b
call fcn.0048eec0
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x888], eax
test eax, eax
je 0x4a1177
push eax
call fcn.00472ca5
add esp, 4
mov dword [ebp - 0x88c], eax
push dword [ebp - 0x888]
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push dword [ebp - 0x88c]
call fcn.0051efd0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebp - 0x888]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x88c]
test ecx, ecx
jne 0x4a1247
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push dword [ebp + 8]
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x4a1237
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x888], eax
test eax, eax
je 0x4a123d
push eax
mov dword [ebp - 0x890], 0
call fcn.00472ca5
add esp, 4
mov dword [ebp - 0x88c], eax
lea ecx, [ebp - 0x890]
push 0
push ecx
push dword [ebp - 0x888]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call edi
mov eax, dword [ebp - 0x888]
cmp dword [ebp - 0x890], eax
je 0x4a123d
push dword [ebp - 0x88c]
call fcn.00472cae
add esp, 4
mov dword [ebp - 0x88c], 0
xor esi, esi
jmp 0x4a1483
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
mov eax, dword [ebp - 0x888]
jmp 0x4a117d
mov eax, dword [ebp - 0x888]
mov ecx, dword [ebp - 0x88c]
test ecx, ecx
je 0x4a127f
push 4
lea edx, [ebp - 0x8ac]
push edx
lea edx, [ebp - 0x8a0]
push edx
lea edx, [ebp - 0x89c]
push edx
push eax
push ecx
call fcn.004bb1e0
push dword [ebp - 0x88c]
mov edi, eax
mov dword [ebp - 0x898], edi
call fcn.00472cae
add esp, 0x1c
test edi, edi
jne 0x4a1286
xor esi, esi
jmp 0x4a1483
mov eax, dword [ebp - 0x8a0]
xorps xmm0, xmm0
mov edx, dword [ebp - 0x89c]
neg eax
push 0
push 0
mov dword [ebp - 0x55c], eax
xor bl, bl
mov dword [ebp - 0x560], edx
lea eax, [ebp - 0x894]
imul edx, dword [ebp - 0x8a0]
push eax
push 0
lea eax, [ebp - 0x564]
movlpd qword [ebp - 0x54c], xmm0
push eax
shl edx, 2
push 0
movlpd qword [ebp - 0x544], xmm0
mov dword [ebp - 0x53c], 0
mov dword [ebp - 0x564], 0x28
mov dword [ebp - 0x558], 0x200001
mov dword [ebp - 0x554], 0
mov dword [ebp - 0x550], edx
mov dword [ebp - 0x894], 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
xor esi, esi
mov dword [ebp - 0x8a8], eax
test eax, eax
je 0x4a1483
mov eax, dword [ebp - 0x89c]
imul eax, dword [ebp - 0x8a0]
test eax, eax
jle 0x4a1437
mov ebx, dword [ebp + 0x10]
nop dword [eax + eax]
mov eax, dword [ebp - 0x894]
mov cl, byte [edi + esi*4 + 3]
mov byte [eax + esi*4 + 3], cl
mov eax, dword [ebp - 0x894]
cmp byte [eax + esi*4 + 3], 0xff
lea edi, [eax + esi*4]
mov eax, dword [ebp - 0x898]
jae 0x4a13c6
movzx ecx, byte [eax + esi*4 + 2]
movzx eax, byte [eax + esi*4 + 3]
imul ecx, eax
mov eax, 0x80808081
mul ecx
shr edx, 7
mov byte [edi], dl
mov edi, dword [ebp - 0x898]
movzx eax, byte [edi + esi*4 + 3]
movzx ecx, byte [edi + esi*4 + 1]
imul ecx, eax
mov eax, 0x80808081
mul ecx
mov eax, dword [ebp - 0x894]
shr edx, 7
mov byte [eax + esi*4 + 1], dl
movzx eax, byte [edi + esi*4 + 3]
movzx ecx, byte [edi + esi*4]
imul ecx, eax
mov eax, 0x80808081
mul ecx
mov eax, dword [ebp - 0x894]
shr edx, 7
mov byte [eax + esi*4 + 2], dl
jmp 0x4a13ef
mov al, byte [eax + esi*4 + 2]
mov byte [edi], al
mov edi, dword [ebp - 0x898]
mov eax, dword [ebp - 0x894]
movzx ecx, byte [edi + esi*4 + 1]
mov byte [eax + esi*4 + 1], cl
mov eax, dword [ebp - 0x894]
movzx ecx, byte [edi + esi*4]
mov byte [eax + esi*4 + 2], cl
mov eax, dword [ebp - 0x894]
cmp dword [eax + esi*4], ebx
jne 0x4a141f
mov byte [eax + esi*4], 0
mov eax, dword [ebp - 0x894]
mov byte [eax + esi*4 + 1], 0
mov eax, dword [ebp - 0x894]
mov byte [eax + esi*4 + 2], 0
mov eax, dword [ebp - 0x894]
mov byte [eax + esi*4 + 3], 0
mov eax, dword [ebp - 0x89c]
inc esi
imul eax, dword [ebp - 0x8a0]
cmp esi, eax
jl 0x4a1340
mov bl, 1
push edi
call fcn.00472ca0
push 0x98
call fcn.0047298f
mov esi, eax
add esp, 8
mov dword [ebp - 0x890], esi
mov byte [ebp - 4], 0xd
test esi, esi
je 0x4a1464
lea ecx, [esi + 0x10]
call fcn.0048bcc0
jmp 0x4a1466
xor esi, esi
mov eax, dword [ebp - 0x8a8]
mov dword [esi], eax
mov ecx, dword [ebp - 0x89c]
mov dword [esi + 4], ecx
mov ecx, dword [ebp - 0x8a0]
mov dword [esi + 8], ecx
mov byte [esi + 0xc], bl
lea ecx, [ebp - 0x66c]
call fcn.00420cc0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0047285d
mov esp, ebp
pop ebp
ret
call fcn.00522b89
int3