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

Disassembly:
push 0xffffffffffffffff
push 0x52d93b
mov eax, dword fs:[0]
push eax
sub esp, 0x308
mov eax, dword [0x55c4c8]
xor eax, esp
mov dword [esp + 0x300], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x55c4c8]
xor eax, esp
push eax
lea eax, [esp + 0x31c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x330]
xor edi, edi
cmp eax, edi
jne 0x4ce9d8
mov edx, dword [0x61c338]
or ebx, 0xffffffff
push ebx
lea eax, [esp + 0x64]
xor ecx, ecx
push edx
lea esi, [esp + 0x64]
mov dword [esp + 0x64], eax
mov word [esp + 0x68], cx
call fcn.004b50c0
mov dword [esp + 0x324], edi
mov eax, dword [0x61c3c0]
cmp word [eax], di
jne 0x4ce85f
mov eax, dword [esp + 0x32c]
cmp eax, edi
je 0x4ce788
push eax
mov eax, esi
push eax
call fcn.004b4f80
mov ecx, dword [esp + 0x5c]
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, ebx
jne 0x4ce7ce
mov dword [esp + 0x324], ebx
mov eax, dword [esp + 0x5c]
lea edx, [esp + 0x60]
cmp eax, edx
je 0x4cea14
push eax
call fcn.0050a8b9
add esp, 4
jmp 0x4cea14
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, edi
jne 0x4ce801
mov dword [esp + 0x324], ebx
mov eax, dword [esp + 0x5c]
lea ecx, [esp + 0x60]
cmp eax, ecx
je 0x4cea14
push eax
call fcn.0050a8b9
add esp, 4
jmp 0x4cea14
push esi
mov dword [esp + 0x24], edi
call fcn.005095f9
add esp, 4
push 0
lea edx, [esp + 0x24]
push edx
push esi
mov edi, eax
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x20], esi
je 0x4ce9b3
push edi
call fcn.0050a8ae
mov dword [esp + 0x328], ebx
mov eax, dword [esp + 0x60]
lea ecx, [esp + 0x64]
add esp, 4
cmp eax, ecx
je 0x4cea14
push eax
call fcn.0050a8b9
add esp, 4
jmp 0x4cea14
push eax
lea edx, [esp + 0x60]
push edx
call fcn.004b4f80
cmp byte [0x61fd47], 0
je 0x4ce87b
mov ebp, dword [0x626d08]
jmp 0x4ce88d
mov eax, dword [esp + 0x5c]
push 2
push edi
push eax
call fcn.004e1c30
add esp, 0xc
mov ebp, eax
cmp ebp, edi
jne 0x4ce8b6
mov dword [esp + 0x324], ebx
mov eax, dword [esp + 0x5c]
lea ecx, [esp + 0x60]
cmp eax, ecx
je 0x4cea14
push eax
call fcn.0050a8b9
add esp, 4
jmp 0x4cea14
mov ecx, dword [esp + 0x32c]
lea edx, [esp + 0xe4]
push edx
push ebp
lea edx, [esp + 0x24]
call fcn.004e1ca0
add esp, 8
test eax, eax
je 0x4ce8fb
mov dword [esp + 0x324], ebx
mov eax, dword [esp + 0x5c]
lea ecx, [esp + 0x60]
cmp eax, ecx
je 0x4cea14
push eax
call fcn.0050a8b9
add esp, 4
jmp 0x4cea14
mov esi, dword [esp + 0x310]
cmp esi, edi
jne 0x4ce92b
mov dword [esp + 0x324], ebx
mov eax, dword [esp + 0x5c]
lea edx, [esp + 0x60]
cmp eax, edx
je 0x4cea14
push eax
call fcn.0050a8b9
add esp, 4
jmp 0x4cea14
push esi
call fcn.005095f9
add esp, 4
cmp dword [ebp], 1
mov edi, eax
je 0x4ce948
mov dword [0x626d40], 0x80000
jmp 0x4ce968
mov ecx, dword [esp + 0x1c]
mov eax, dword [ebp + 4]
push esi
push edi
push ecx
push eax
call fcn.004e1b40
mov dword [0x626d40], eax
test eax, eax
je 0x4ce9a1
cmp eax, 0x600
je 0x4ce9a1
push edi
call fcn.0050a8ae
add esp, 4
cmp byte [0x61fd47], 0
jne 0x4ce983
push ebp
call fcn.004e1e30
add esp, 4
mov dword [esp + 0x324], ebx
mov eax, dword [esp + 0x5c]
lea edx, [esp + 0x60]
cmp eax, edx
je 0x4cea14
push eax
call fcn.0050a8b9
add esp, 4
jmp 0x4cea14
cmp byte [0x61fd47], 0
jne 0x4ce9b3
push ebp
call fcn.004e1e30
add esp, 4
mov dword [esp + 0x324], ebx
mov eax, dword [esp + 0x5c]
lea ecx, [esp + 0x60]
cmp eax, ecx
je 0x4cead2
push eax
call fcn.0050a8b9
add esp, 4
jmp 0x4cead2
mov edx, dword [esp + 0x32c]
push eax
push edx
call fcn.004ace40
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebp, eax
cmp ebp, edi
je 0x4cea11
push ebp
call fcn.004ace40
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
push ebp
cmp ebx, edi
jne 0x4cea95
call dword [sym.imp.KERNEL32.dll_FreeResource]
or ebx, 0xffffffff
mov eax, dword [esp + 0x32c]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, ebx
je 0x4cec0e
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x4cec0e
push esi
mov dword [esp + 0x2c], 0
call fcn.005095f9
add esp, 4
push 0
lea ecx, [esp + 0x2c]
push ecx
push esi
mov edi, eax
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x28], esi
je 0x4cec06
push edi
call fcn.0050a8ae
add esp, 4
xor eax, eax
jmp 0x4cecb8
call fcn.004ace40
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, edi
je 0x4cea11
push esi
call fcn.005095f9
add esp, 4
push esi
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.00510c60
add esp, 0xc
push ebp
call dword [sym.imp.KERNEL32.dll_FreeResource]
or ebx, 0xffffffff
test edi, edi
je 0x4cea14
lea edx, [esp + 0x1c]
push edx
push esi
lea esi, [esp + 0x2c]
lea edx, [esp + 0x34]
mov ecx, edi
call fcn.00500510
mov esi, eax
push edi
mov dword [esp + 0x28], esi
call fcn.0050a8ae
add esp, 0xc
test esi, esi
je 0x4cec0e
push 0x2c
lea eax, [esp + 0x34]
push 0
push eax
call fcn.0050e6a0
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x30]
add esp, 0xc
push 0
mov ebp, edi
mov edx, 1
imul ebp, esi
push 0
mov word [esp + 0x44], dx
lea edx, [esp + 0x20]
push edx
mov eax, 0x20
mov ecx, esi
neg ecx
mov word [esp + 0x4a], ax
push 0
lea eax, [esp + 0x40]
mov dword [esp + 0x48], ecx
push eax
lea ecx, [ebp*4]
push 0
mov dword [esp + 0x48], 0x28
mov dword [esp + 0x4c], edi
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], ecx
xor bl, bl
mov dword [esp + 0x30], 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [esp + 0x20], eax
test eax, eax
je 0x4cec0e
xor ecx, ecx
test ebp, ebp
jle 0x4cec7c
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
add esi, 3
mov dl, byte [esi]
mov byte [eax + ecx*4 + 3], dl
mov edi, dword [esp + 0x18]
cmp byte [edi + ecx*4 + 3], 0xff
jae 0x4cec15
movzx eax, byte [esi]
movzx edx, byte [esi - 1]
imul edx, eax
mov eax, 0x80808081
mul edx
shr edx, 7
mov byte [edi + ecx*4], dl
movzx eax, byte [esi]
movzx edx, byte [esi - 2]
imul edx, eax
mov eax, 0x80808081
mul edx
mov eax, dword [esp + 0x18]
shr edx, 7
mov byte [eax + ecx*4 + 1], dl
movzx eax, byte [esi]
movzx edx, byte [esi - 3]
imul edx, eax
mov eax, 0x80808081
mul edx
mov eax, dword [esp + 0x18]
shr edx, 7
mov byte [eax + ecx*4 + 2], dl
mov bl, 1
jmp 0x4cec33
test edi, edi
jne 0x4ceada
xor eax, eax
jmp 0x4cecb8
mov dl, byte [esi - 1]
mov byte [edi + ecx*4], dl
movzx eax, byte [esi - 2]
mov edx, dword [esp + 0x18]
mov byte [edx + ecx*4 + 1], al
movzx eax, byte [esi - 3]
mov edx, dword [esp + 0x18]
mov byte [edx + ecx*4 + 2], al
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x334]
cmp dword [eax + ecx*4], edx
jne 0x4cec68
mov byte [eax + ecx*4], 0
mov eax, dword [esp + 0x18]
mov byte [eax + ecx*4 + 1], 0
mov edx, dword [esp + 0x18]
mov byte [edx + ecx*4 + 2], 0
mov eax, dword [esp + 0x18]
mov byte [eax + ecx*4 + 3], 0
mov eax, dword [esp + 0x18]
mov bl, 1
inc ecx
add esi, 4
cmp ecx, ebp
jl 0x4ceba2
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0050a8b9
add esp, 4
push 0x98
call fcn.0050a753
add esp, 4
test eax, eax
je 0x4ceca7
lea ecx, [eax + 0x14]
xor edx, edx
mov dword [eax + 0x10], ecx
mov word [ecx], dx
jmp 0x4ceca9
xor eax, eax
mov ecx, dword [esp + 0x20]
mov dword [eax], ecx
mov dword [eax + 4], edi
mov dword [eax + 8], esi
mov byte [eax + 0xc], bl
mov ecx, dword [esp + 0x31c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x300]
xor ecx, esp
call fcn.0050a231
add esp, 0x314
ret