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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x508196
mov eax, dword fs:[0]
push eax
sub esp, 0x4c4
mov eax, dword [0x5675c8]
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 edi, dword [ebp + 0xc]
mov esi, dword [ebp + 0x14]
test edi, edi
jne 0x47299b
call fcn.0044fce0
push eax
lea ecx, [ebp - 0xc0]
call fcn.0044ad60
mov dword [ebp - 4], edi
call fcn.0044fd00
mov ecx, eax
call fcn.0044bf60
test al, al
je 0x4727f0
push dword [ebp + 8]
lea ecx, [ebp - 0xc0]
call fcn.0044b550
push edi
push 0x80
push 3
push edi
push 1
push bind
lea ecx, [ebp - 0xc0]
call fcn.0044bc50
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x47276e
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], eax
call fcn.0044af90
jmp 0x472a10
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push ebx
call edi
mov esi, eax
test esi, esi
jne 0x472796
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.0044af90
jmp 0x472a16
push esi
mov dword [ebp - 0x4cc], 0
call fcn.004ffbb1
add esp, 4
mov edi, eax
lea eax, [ebp - 0x4cc]
push 0
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x4cc], esi
je 0x472987
push edi
call fcn.004ffbba
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.0044af90
jmp 0x472a10
call fcn.0044fd00
push eax
lea ecx, [ebp - 0xc0]
call fcn.0044b4c0
call fcn.0044fd20
push eax
lea ecx, [ebp - 0x1c8]
call fcn.0044ad60
mov byte [ebp - 4], 1
call fcn.00450110
test al, al
je 0x472828
call fcn.0044fd10
mov ebx, eax
jmp 0x472864
push 0
lea ecx, [ebp - 0x1c8]
call fcn.0044bc50
push eax
call fcn.00481cd0
add esp, 8
lea ecx, [ebp - 0xc0]
mov esi, eax
push esi
call fcn.0044bc50
push eax
call fcn.004628e0
add esp, 8
mov ebx, eax
test esi, esi
je 0x472864
push esi
call fcn.004ffbba
add esp, 4
test ebx, ebx
jne 0x47288a
lea ecx, [ebp - 0x1c8]
call fcn.0044af90
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.0044af90
jmp 0x472a10
push 0xffffffffffffffff
push dword [ebp + 8]
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x4d0], 0
call fcn.0044ad90
push 0x51e94c
push 0x51cdac
lea ecx, [ebp - 0x144]
mov byte [ebp - 4], 2
call fcn.0044c2f0
lea eax, [ebp - 0x4b0]
push eax
lea eax, [ebp - 0x4d0]
push eax
push 1
lea ecx, [ebp - 0x144]
call fcn.0044b260
push eax
push ebx
call fcn.00461ed0
add esp, 0x14
test eax, eax
je 0x4728f6
lea ecx, [ebp - 0x144]
call fcn.0044af90
jmp 0x472868
mov esi, dword [ebp - 0x284]
test esi, esi
jne 0x472910
lea ecx, [ebp - 0x144]
call fcn.0044af90
jmp 0x472868
push esi
call fcn.004ffbb1
push esi
mov edi, eax
push edi
push dword [ebp - 0x4d0]
push ebx
call fcn.00462f50
add esp, 0x14
test eax, eax
je 0x47295f
cmp eax, 0x600
je 0x47295f
push edi
call fcn.004ffbba
add esp, 4
call fcn.00450110
test al, al
jne 0x47294f
push ebx
call fcn.00461bd0
add esp, 4
lea ecx, [ebp - 0x144]
call fcn.0044af90
jmp 0x472868
call fcn.00450110
test al, al
jne 0x472971
push ebx
call fcn.00461bd0
add esp, 4
lea ecx, [ebp - 0x144]
call fcn.0044af90
lea ecx, [ebp - 0x1c8]
call fcn.0044af90
lea ecx, [ebp - 0xc0]
mov dword [ebp - 4], 0xffffffff
call fcn.0044af90
jmp 0x472a08
test esi, esi
jne 0x4729a6
call fcn.0044fcd0
mov esi, eax
push edi
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x472a10
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x4c4], eax
push ebx
test eax, eax
jne 0x4729d2
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x472a10
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test esi, esi
je 0x472a10
push esi
call fcn.004ffbb1
add esp, 4
mov edi, eax
push esi
push dword [ebp - 0x4c4]
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
test edi, edi
jne 0x472aa4
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push 0x80
push 3
push 0
push 1
push bind
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x472a82
push 0
push ebx
call edi
mov esi, eax
test esi, esi
je 0x472a82
push esi
mov dword [ebp - 0x4c0], 0
call fcn.004ffbb1
add esp, 4
mov edi, eax
lea eax, [ebp - 0x4c0]
push 0
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x4c0], esi
je 0x472aa0
push edi
call fcn.004ffbba
add esp, 4
xor eax, eax
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.004ff7f3
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x472a82
lea eax, [esi + edi]
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x1cc], eax
mov dword [ebp - 0x1d4], eax
lea eax, [ebp - 0x4bc]
push 4
push eax
lea eax, [ebp - 0x4c4]
mov dword [ebp - 0x260], 0
push eax
lea eax, [ebp - 0x4c8]
mov dword [ebp - 0x1d0], edi
push eax
lea eax, [ebp - 0x280]
mov dword [ebp - 0x1d8], edi
push eax
call fcn.0047b700
mov ebx, eax
push edi
mov dword [ebp - 0x4bc], ebx
call fcn.004ffbba
add esp, 0x18
test ebx, ebx
je 0x472a82
push 0x2c
lea eax, [ebp - 0x3c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov edi, dword [ebp - 0x4c8]
add esp, 0xc
mov eax, dword [ebp - 0x4c4]
mov ebx, edi
imul ebx, dword [ebp - 0x4c4]
neg eax
mov dword [ebp - 0x34], eax
push 0
push 0
mov dword [ebp - 0x3c], 0x28
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x30], 0x200001
mov dword [ebp - 0x2c], 0
lea eax, [ebx*4]
mov byte [ebp - 0x4b1], 0
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x4b8]
push eax
push 0
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x4b8], 0
push eax
push 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x4c0], eax
test eax, eax
je 0x472a82
xor esi, esi
test ebx, ebx
jle 0x472ca5
mov edx, dword [ebp - 0x4bc]
nop dword [eax]
nop word [eax + eax]
mov eax, dword [ebp - 0x4b8]
mov cl, byte [edx + esi*4 + 3]
mov byte [eax + esi*4 + 3], cl
mov eax, dword [ebp - 0x4b8]
cmp byte [eax + esi*4 + 3], 0xff
lea edi, [eax + esi*4]
jae 0x472c39
movzx eax, byte [edx + esi*4 + 3]
movzx ecx, byte [edx + esi*4 + 2]
imul ecx, eax
mov eax, 0x80808081
mov byte [ebp - 0x4b1], 1
mul ecx
shr edx, 7
mov byte [edi], dl
mov edi, dword [ebp - 0x4bc]
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 - 0x4b8]
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 - 0x4b8]
shr edx, 7
mov byte [eax + esi*4 + 2], dl
mov edx, edi
jmp 0x472c5c
mov al, byte [edx + esi*4 + 2]
mov byte [edi], al
mov eax, dword [ebp - 0x4b8]
movzx ecx, byte [edx + esi*4 + 1]
mov byte [eax + esi*4 + 1], cl
mov eax, dword [ebp - 0x4b8]
movzx ecx, byte [edx + esi*4]
mov byte [eax + esi*4 + 2], cl
mov eax, dword [ebp - 0x4b8]
mov ecx, dword [ebp + 0x10]
cmp dword [eax + esi*4], ecx
jne 0x472c96
mov byte [eax + esi*4], 0
mov eax, dword [ebp - 0x4b8]
mov byte [ebp - 0x4b1], 1
mov byte [eax + esi*4 + 1], 0
mov eax, dword [ebp - 0x4b8]
mov byte [eax + esi*4 + 2], 0
mov eax, dword [ebp - 0x4b8]
mov byte [eax + esi*4 + 3], 0
inc esi
cmp esi, ebx
jl 0x472bb0
mov edi, dword [ebp - 0x4c8]
push dword [ebp - 0x4bc]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push 0xa0
call fcn.004ff0c5
mov esi, eax
add esp, 8
mov dword [ebp - 0x4c8], esi
mov dword [ebp - 4], 3
test esi, esi
je 0x472cdb
lea ecx, [esi + 0x18]
call fcn.0044adc0
jmp 0x472cdd
xor esi, esi
mov eax, dword [ebp - 0x4c0]
mov dword [esi], eax
mov eax, dword [ebp - 0x4c4]
mov dword [esi + 0x10], eax
mov al, byte [ebp - 0x4b1]
mov byte [esi + 0x14], al
mov eax, esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], edi
jmp 0x472a84