Function at 0x48f020
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5377e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
mov eax, dword [esp + 0x40]
push ebp
push esi
xor ebp, ebp
push edi
push ebp
push 0x80
push 3
push ebp
push ebp
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x18], edi
je 0x48f2b6
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x4c]
push ebp
push ecx
lea edx, [esp + 0x2c]
push 6
push edx
push edi
mov dword [esp + 0x60], ebp
call esi
test eax, eax
je 0x48f2af
cmp dword [esp + 0x4c], 6
jne 0x48f2af
cmp word [esp + 0x26], 1
jne 0x48f2af
mov eax, dword [esp + 0x28]
cmp ax, bp
je 0x48f2af
and eax, 0xffff
shl eax, 4
push eax
call fcn.00461c33
mov ebx, eax
add esp, 4
cmp ebx, ebp
mov dword [esp + 0x20], ebx
je 0x48f2af
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x4c]
and ecx, 0xffff
push ebp
shl ecx, 4
push eax
push ecx
push ebx
push edi
call esi
test eax, eax
je 0x48f2a6
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x4c]
and eax, 0xffff
mov edx, eax
shl edx, 4
cmp ecx, edx
jne 0x48f2a6
cmp eax, ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x14], ebp
jle 0x48f27b
lea esi, [ebx + 8]
cmp word [esi - 2], 0x20
jne 0x48f225
mov eax, dword [esp + 0x50]
xor ecx, ecx
mov cl, byte [esi - 8]
cmp ecx, eax
je 0x48f139
cmp eax, ebp
jne 0x48f225
mov edx, dword [esi + 4]
push ebp
push ebp
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x48f225
mov eax, dword [esi]
push eax
call fcn.00461c33
mov ebx, eax
add esp, 4
cmp ebx, ebp
je 0x48f225
mov dword [esp + 0x4c], ebp
mov edx, dword [esi]
lea ecx, [esp + 0x4c]
push ebp
push ecx
push edx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebp
je 0x48f21c
mov eax, dword [esp + 0x4c]
mov ecx, dword [esi]
cmp eax, ecx
jne 0x48f21c
cmp word [ebx + 0xe], 0x20
jne 0x48f21c
lea ecx, [esp + 0x2c]
call fcn.005150d2
push ebp
mov dword [esp + 0x48], ebp
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [esp + 0x30]
call fcn.00515189
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
cdq
sub eax, edx
push ebp
sar eax, 1
imul ecx, eax
mov dword [ebx + 8], eax
lea eax, [esp + 0x30]
shl ecx, 2
neg eax
mov dword [ebx + 0x14], ecx
mov edi, dword [esp + 0x34]
lea edx, [esp + 0x14]
push ebp
sbb eax, eax
push edx
and eax, edi
push ebp
push ebx
push eax
mov dword [esp + 0x28], ebp
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov edi, dword [esp + 0x10]
cmp edi, ebp
je 0x48f1fc
cmp eax, ebp
jne 0x48f245
push ebx
call fcn.0046185f
add esp, 4
lea ecx, [esp + 0x2c]
mov dword [esp + 0x44], 0xffffffff
call fcn.00515207
mov edi, dword [esp + 0x18]
jmp 0x48f225
push ebx
call fcn.0046185f
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
inc eax
and ecx, 0xffff
add esi, 0x10
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x48f119
jmp 0x48f27b
mov ecx, dword [ebx + 0x14]
lea esi, [ebx + 0x28]
mov edx, ecx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x20], eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.0046185f
add esp, 4
lea ecx, [esp + 0x2c]
mov dword [esp + 0x44], 0xffffffff
call fcn.00515207
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
push eax
call fcn.0046185f
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
add esp, 0x38
ret
push ebx
call fcn.0046185f
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret