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

Disassembly:
push 0x310
mov eax, 0x571e6f
call fcn.0054512b
mov dword [ebp - 0x31c], edx
xor ebx, ebx
xor edi, edi
inc ebx
test ecx, ecx
jne 0x4d6b5c
call fcn.004c05ae
push eax
lea ecx, [ebp - 0xcc]
call fcn.004bf2ce
mov dword [ebp - 4], edi
call fcn.004c05b4
mov edx, eax
mov ecx, eax
call fcn.004bf41b
lea ecx, [ebp - 0xcc]
test al, al
je 0x4d6a8d
push dword [ebp + 8]
call fcn.004bf666
push edi
push 0x80
push 3
push edi
push ebx
push SysReAllocString
lea ecx, [ebp - 0xcc]
call fcn.004bf443
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4d6a30
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xcc]
call fcn.004bf2f3
jmp 0x4d6bd1
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x4d6a1c
push esi
mov dword [ebp - 0x30c], edi
call fcn.0051d4c8
pop ecx
push 0
mov edi, eax
lea eax, [ebp - 0x30c]
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 - 0x30c], esi
je 0x4d6b4b
push edi
call fcn.00538881
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xcc]
call fcn.004bf2f3
jmp 0x4d6bcf
push edx
call fcn.004bf649
call fcn.004c05ba
test al, al
je 0x4d6aa3
call fcn.004c05c0
jmp 0x4d6aba
push 2
lea ecx, [ebp - 0xcc]
call fcn.004bf443
xor edx, edx
mov ecx, eax
call fcn.004d2d81
pop ecx
mov ebx, eax
test ebx, ebx
je 0x4d6a1c
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x2fc]
push eax
lea eax, [ebp - 0x308]
push eax
push ecx
mov ecx, ebx
call fcn.004d2f0f
add esp, 0xc
test eax, eax
jne 0x4d6a1c
mov esi, dword [ebp - 0xd0]
test esi, esi
je 0x4d6a1c
push esi
call fcn.0051d4c8
mov edx, dword [ebp - 0x308]
mov edi, eax
push esi
push edi
mov ecx, ebx
call fcn.004d2fe3
add esp, 0xc
test eax, eax
je 0x4d6b3b
cmp eax, 0x600
je 0x4d6b3b
push edi
call fcn.00538881
pop ecx
call fcn.004c05ba
test al, al
jne 0x4d6a79
mov ecx, ebx
call fcn.004d3016
jmp 0x4d6a79
call fcn.004c05ba
test al, al
jne 0x4d6b4b
mov ecx, ebx
call fcn.004d3016
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xcc]
call fcn.004bf2f3
jmp 0x4d6bcb
push ecx
push dword [ebp + 8]
call fcn.004c059f
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x4d6bd1
push ebx
call fcn.004c059f
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x308], eax
push ebx
test eax, eax
jne 0x4d6b92
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x4d6bd1
call fcn.004c059f
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test esi, esi
je 0x4d6bd1
push esi
call fcn.0051d4c8
pop ecx
push esi
push dword [ebp - 0x308]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.00538be0
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
test edi, edi
jne 0x4d6c48
xor edi, edi
push edi
push 0x80
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 0x4d6e45
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x4d6e45
push esi
mov dword [ebp - 0x310], edi
call fcn.0051d4c8
pop ecx
push 0
mov edi, eax
lea eax, [ebp - 0x310]
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 - 0x310], esi
je 0x4d6c40
push edi
call fcn.00538881
pop ecx
xor edi, edi
test edi, edi
je 0x4d6e45
push ecx
lea eax, [ebp - 0x318]
mov edx, esi
push eax
lea eax, [ebp - 0x308]
mov ecx, edi
push eax
lea eax, [ebp - 0x314]
push eax
call fcn.004ed11e
push edi
mov ebx, eax
call fcn.00538881
add esp, 0x14
test ebx, ebx
je 0x4d6e45
push 0x2c
lea eax, [ebp - 0x40]
push 0
push eax
call fcn.005392b0
mov eax, dword [ebp - 0x308]
add esp, 0xc
mov ecx, dword [ebp - 0x314]
neg eax
and dword [ebp - 0x30], 0
mov edi, ecx
imul edi, dword [ebp - 0x308]
mov dword [ebp - 0x38], eax
xor eax, eax
inc eax
mov dword [ebp - 0x3c], ecx
push 0x20
mov word [ebp - 0x34], ax
xor ecx, ecx
pop eax
mov word [ebp - 0x32], ax
mov eax, edi
push ecx
shl eax, 2
push ecx
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x304]
push eax
push ecx
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0x28
push eax
push ecx
mov byte [ebp - 0x2fd], cl
mov dword [ebp - 0x304], ecx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x318], eax
test eax, eax
je 0x4d6e45
xor esi, esi
test edi, edi
jle 0x4d6dfa
mov edx, 0xff
mov eax, dword [ebp - 0x304]
mov cl, byte [ebx + esi*4 + 3]
mov byte [eax + esi*4 + 3], cl
mov ecx, dword [ebp - 0x304]
cmp byte [ecx + esi*4 + 3], dl
jae 0x4d6d8b
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 - 0x304]
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 - 0x304]
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 - 0x304]
xor edx, edx
inc edx
mov byte [ebp - 0x2fd], dl
mov byte [ecx + esi*4 + 2], al
jmp 0x4d6db0
mov al, byte [ebx + esi*4 + 2]
xor edx, edx
mov byte [ecx + esi*4], al
inc edx
mov eax, dword [ebp - 0x304]
mov cl, byte [ebx + esi*4 + 1]
mov byte [eax + esi*4 + 1], cl
mov eax, dword [ebp - 0x304]
mov cl, byte [ebx + esi*4]
mov byte [eax + esi*4 + 2], cl
mov eax, dword [ebp - 0x304]
mov ecx, dword [ebp - 0x31c]
cmp dword [eax + esi*4], ecx
jne 0x4d6dec
mov byte [eax + esi*4], 0
mov eax, dword [ebp - 0x304]
mov byte [ebp - 0x2fd], dl
mov byte [eax + esi*4 + 1], 0
mov eax, dword [ebp - 0x304]
mov byte [eax + esi*4 + 2], 0
mov eax, dword [ebp - 0x304]
mov byte [eax + esi*4 + 3], 0
inc esi
mov edx, 0xff
cmp esi, edi
jl 0x4d6d08
mov ecx, ebx
call fcn.004ed024
push 0x98
call fcn.00538625
mov esi, eax
pop ecx
test esi, esi
je 0x4d6e1c
lea ecx, [esi + 0x10]
call fcn.004bf288
jmp 0x4d6e1e
xor esi, esi
mov eax, dword [ebp - 0x318]
mov dword [esi], eax
mov eax, dword [ebp - 0x314]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x308]
mov dword [esi + 8], eax
mov al, byte [ebp - 0x2fd]
mov byte [esi + 0xc], al
mov eax, esi
jmp 0x4d6e47
xor eax, eax
call fcn.005450da
ret