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

Disassembly:
push 0x28c
mov eax, 0x57393e
call fcn.0052887e
mov eax, dword [ebp + 0xc]
xor ebx, ebx
or edi, 0xffffffff
mov esi, 0x88
test eax, eax
jne 0x4f7a37
call fcn.004dd4f9
push eax
lea ecx, [ebp - 0xc4]
call fcn.004d9b31
mov dword [ebp - 4], ebx
call fcn.004dd4ff
mov ecx, eax
call fcn.004da644
test al, al
je 0x4f7952
push dword [ebp + 8]
lea ecx, [ebp - 0xc4]
call fcn.004d9fdd
push ebx
push 0x80
push 3
push ebx
push 1
push closesocket
lea ecx, [ebp - 0xc4]
call fcn.004da4c6
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, edi
jne 0x4f78f6
mov esi, dword [0x5c639c]
jmp 0x4f78db
push esi
call fcn.004d9d3f
push dword [ebp + 8]
lea ecx, [ebp - 0xc4]
call fcn.004d9fdd
push 0
push 0x80
push 3
push 0
push 1
push closesocket
lea ecx, [ebp - 0xc4]
call fcn.004da4c6
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, edi
jne 0x4f78f6
add esi, 0x88
lea ecx, [ebp - 0xc4]
cmp esi, dword [0x5c63a0]
jne 0x4f7897
mov dword [ebp - 4], edi
call fcn.004d9ca5
jmp 0x4f7aae
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
jne 0x4f7910
mov dword [ebp - 4], edi
lea ecx, [ebp - 0xc4]
jmp 0x4f78ec
and dword [ebp - 0x288], 0
push esi
call fcn.00528a7d
pop ecx
push 0
mov edi, eax
lea eax, [ebp - 0x288]
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 - 0x288], esi
je 0x4f7a26
push edi
call fcn.00528a86
pop ecx
or dword [ebp - 4], 0xffffffff
jmp 0x4f7908
call fcn.004dd4ff
push eax
lea ecx, [ebp - 0xc4]
call fcn.004d9f5a
call fcn.004dd618
test al, al
je 0x4f7973
call fcn.004dd505
jmp 0x4f798a
push 2
push ebx
lea ecx, [ebp - 0xc4]
call fcn.004da4c6
push eax
call fcn.004e9b7e
add esp, 0xc
mov ebx, eax
test ebx, ebx
jne 0x4f79a3
lea ecx, [ebp - 0xc4]
mov dword [ebp - 4], edi
call fcn.004d9ca5
jmp 0x4f7ab3
lea eax, [ebp - 0x278]
push eax
lea eax, [ebp - 0x284]
push eax
push 1
push dword [ebp + 8]
push ebx
call fcn.004e920b
add esp, 0x14
test eax, eax
jne 0x4f7990
mov esi, dword [ebp - 0x150]
test esi, esi
je 0x4f7905
push esi
call fcn.00528a7d
push 3
push esi
mov edi, eax
push edi
push dword [ebp - 0x284]
push ebx
call fcn.004e9fdb
add esp, 0x18
test eax, eax
je 0x4f7a16
cmp eax, 0x600
je 0x4f7a16
push edi
call fcn.00528a86
pop ecx
call fcn.004dd618
test al, al
jne 0x4f794c
push ebx
call fcn.004e905b
jmp 0x4f794b
call fcn.004dd618
test al, al
jne 0x4f7a26
push ebx
call fcn.004e905b
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc4]
call fcn.004d9ca5
jmp 0x4f7aa6
push eax
push dword [ebp + 8]
call fcn.004dd4ea
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x4f7ab3
push ebx
call fcn.004dd4ea
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x284], eax
push ebx
test eax, eax
jne 0x4f7a6d
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x4f7ab3
call fcn.004dd4ea
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test esi, esi
je 0x4f7aae
push esi
call fcn.00528a7d
pop ecx
push esi
push dword [ebp - 0x284]
mov edi, eax
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 0x4f7bc7
mov esi, 0x88
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push dword [ebp + 8]
call edi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4f7b72
mov eax, dword [0x5c63a0]
sub eax, dword [0x5c639c]
cdq
idiv esi
test eax, eax
je 0x4f7dcd
lea ecx, [ebp - 0x14c]
call fcn.004d9b7a
mov esi, dword [0x5c639c]
mov dword [ebp - 4], 1
jmp 0x4f7b52
push esi
lea ecx, [ebp - 0x14c]
call fcn.004d9d3f
push dword [ebp + 8]
lea ecx, [ebp - 0x14c]
call fcn.004d9fdd
push 0
push 0x80
push 3
push 0
push 1
push closesocket
lea ecx, [ebp - 0x14c]
call fcn.004da4c6
push eax
call edi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4f7b5a
add esi, 0x88
cmp esi, dword [0x5c63a0]
jne 0x4f7b0b
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14c]
call fcn.004d9ca5
cmp ebx, 0xffffffff
je 0x4f7dcd
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x4f7dcd
and dword [ebp - 0x28c], 0
push esi
call fcn.00528a7d
pop ecx
push 0
mov edi, eax
lea eax, [ebp - 0x28c]
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 - 0x28c], esi
je 0x4f7bbf
push edi
call fcn.00528a86
pop ecx
xor edi, edi
test edi, edi
je 0x4f7dcd
push 4
lea eax, [ebp - 0x298]
push eax
lea eax, [ebp - 0x294]
push eax
lea eax, [ebp - 0x290]
push eax
push esi
push edi
call fcn.0050482e
push edi
mov ebx, eax
call fcn.00528a86
add esp, 0x1c
test ebx, ebx
je 0x4f7dcd
push 0x2c
lea eax, [ebp - 0x3c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x294]
add esp, 0xc
mov ecx, dword [ebp - 0x290]
neg eax
and dword [ebp - 0x2c], 0
mov edi, ecx
imul edi, dword [ebp - 0x294]
mov dword [ebp - 0x34], eax
xor eax, eax
inc eax
mov dword [ebp - 0x38], ecx
push 0x20
mov word [ebp - 0x30], ax
xor ecx, ecx
pop eax
mov word [ebp - 0x2e], ax
mov eax, edi
push ecx
shl eax, 2
push ecx
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x280]
push eax
push ecx
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0x28
push eax
push ecx
mov byte [ebp - 0x279], cl
mov dword [ebp - 0x280], ecx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x288], eax
test eax, eax
je 0x4f7dcd
xor esi, esi
test edi, edi
jle 0x4f7d75
mov edx, 0xff
mov eax, dword [ebp - 0x280]
mov cl, byte [ebx + esi*4 + 3]
mov byte [eax + esi*4 + 3], cl
mov ecx, dword [ebp - 0x280]
cmp byte [ecx + esi*4 + 3], dl
jae 0x4f7d09
movzx ecx, byte [ebx + esi*4 + 3]
xor edx, edx
movzx eax, byte [ebx + esi*4 + 2]
imul eax, ecx
mov ecx, 0xff
div ecx
mov ecx, dword [ebp - 0x280]
xor edx, edx
mov byte [ecx + esi*4], al
movzx ecx, byte [ebx + esi*4 + 3]
movzx eax, byte [ebx + esi*4 + 1]
imul eax, ecx
mov ecx, 0xff
div ecx
mov ecx, dword [ebp - 0x280]
xor edx, edx
mov byte [ecx + esi*4 + 1], al
movzx ecx, byte [ebx + esi*4 + 3]
movzx eax, byte [ebx + esi*4]
imul eax, ecx
mov ecx, 0xff
div ecx
mov ecx, dword [ebp - 0x280]
xor edx, edx
inc edx
mov byte [ebp - 0x279], dl
mov byte [ecx + esi*4 + 2], al
jmp 0x4f7d2e
mov al, byte [ebx + esi*4 + 2]
xor edx, edx
mov byte [ecx + esi*4], al
inc edx
mov eax, dword [ebp - 0x280]
mov cl, byte [ebx + esi*4 + 1]
mov byte [eax + esi*4 + 1], cl
mov eax, dword [ebp - 0x280]
mov cl, byte [ebx + esi*4]
mov byte [eax + esi*4 + 2], cl
mov eax, dword [ebp - 0x280]
mov ecx, dword [ebp + 0x10]
cmp dword [eax + esi*4], ecx
jne 0x4f7d67
mov byte [eax + esi*4], 0
mov eax, dword [ebp - 0x280]
mov byte [ebp - 0x279], dl
mov byte [eax + esi*4 + 1], 0
mov eax, dword [ebp - 0x280]
mov byte [eax + esi*4 + 2], 0
mov eax, dword [ebp - 0x280]
mov byte [eax + esi*4 + 3], 0
inc esi
mov edx, 0xff
cmp esi, edi
jl 0x4f7c86
push ebx
call fcn.005042e1
push 0x9c
call fcn.005283c2
pop ecx
mov esi, eax
pop ecx
mov dword [ebp - 0x298], esi
mov dword [ebp - 4], 2
test esi, esi
je 0x4f7da4
lea ecx, [esi + 0x10]
call fcn.004d9b7a
jmp 0x4f7da6
xor esi, esi
mov eax, dword [ebp - 0x288]
mov dword [esi], eax
mov eax, dword [ebp - 0x290]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x294]
mov dword [esi + 8], eax
mov al, byte [ebp - 0x279]
mov byte [esi + 0xc], al
mov eax, esi
jmp 0x4f7dcf
xor eax, eax
call fcn.00528828
ret