Function at 0x4cb500
Capabilities:
Get file size
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
push esi
push edi
push 0x30
xor ebx, ebx
lea eax, [ebp - 0x58]
push ebx
push eax
mov edi, edx
mov esi, ecx
call fcn.005091d0
add esp, 0xc
mov dword [ebp - 0x58], esi
lea eax, [ebp - 0x38]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x4cb54d
push str.GetFileSizeEx__
push eax
push 0x11e
push str.QHImageHlp.c
call fcn.004ced50
add esp, 0x10
jmp 0x4cb6d3
push 0x4000
mov dword [ebp - 0x2c], 0x4000
call fcn.00503856
mov esi, eax
add esp, 4
test esi, esi
jne 0x4cb56f
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 0x30], esi
test esi, esi
jne 0x4cb593
push 0x567294
push esi
push 0x223
push str.QHImageHlp.c
call fcn.004ced50
add esp, 0x10
jmp 0x4cb6d3
lea eax, [ebp - 0x58]
mov edx, 0x40
push eax
push 0
push 0
mov ecx, edi
call fcn.004cb2a0
add esp, 0xc
test eax, eax
je 0x4cb6d3
mov eax, 0x5a4d
cmp word [edi], ax
jne 0x4cba6e
mov eax, dword [edi + 0x3c]
test eax, eax
jle 0x4cba6e
cdq
lea ecx, [ebp - 0x58]
push ecx
push edx
push eax
mov edx, 4
lea ecx, [ebp - 0x24]
call fcn.004cb2a0
add esp, 0xc
test eax, eax
je 0x4cb6d3
cmp dword [ebp - 0x24], 0x4550
je 0x4cb611
push str._rN_f
push 1
push 0x22e
push str.QHImageHlp.c
call fcn.004cee50
add esp, 0x10
jmp 0x4cb6d3
mov eax, dword [edi + 0x3c]
mov esi, dword [ebp + 8]
lea ebx, [eax + 4]
mov dword [esi + 0xa0], 0
cmp eax, 0x110
jb 0x4cb65f
lea eax, [ebp - 0x58]
mov edx, 0x90
push eax
push 0
push 0x80
mov ecx, edi
call fcn.004cb2a0
add esp, 0xc
test eax, eax
je 0x4cb6d1
cmp dword [edi], 0x82c8851f
jne 0x4cb65f
mov dword [esi + 0xa0], 0x80
xor ecx, ecx
lea eax, [ebp - 0x58]
push eax
push ecx
push ebx
lea edx, [ecx + 0x14]
mov ecx, edi
call fcn.004cb2a0
add esp, 0xc
test eax, eax
je 0x4cb6d1
add ebx, 0x14
lea ecx, [ebp - 0x58]
push ecx
mov eax, 0
mov dword [ebp - 8], ebx
adc eax, eax
lea ecx, [ebp - 0x14]
push eax
push ebx
mov edx, 2
mov dword [ebp - 0xc], eax
call fcn.004cb2a0
add esp, 0xc
test eax, eax
je 0x4cb6d1
mov eax, dword [ebp - 0x14]
mov ecx, 0x10b
cmp ax, cx
jne 0x4cb709
movzx eax, word [edi + 0x10]
cmp eax, 0x78
jae 0x4cb6fb
push 0x5674bc
push 1
push 0x248
push str.QHImageHlp.c
call fcn.004cee50
add esp, 0x10
xor ebx, ebx
xor esi, esi
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x4cb6e5
push eax
call fcn.00502847
add esp, 4
test ebx, ebx
je 0x4cb6f2
push ebx
call fcn.00502847
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x10], 1
mov edx, 0xe0
jmp 0x4cb73f
mov ecx, 0x20b
cmp ax, cx
jne 0x4cba5d
movzx eax, word [edi + 0x10]
mov ecx, 0x88
cmp ax, cx
jae 0x4cb733
push 0x5674bc
push 1
push 0x24e
jmp 0x4cb6c4
mov dword [ebp - 0x10], 0
mov edx, 0xf0
movzx ebx, word [edi + 2]
movzx eax, ax
cmp eax, edx
cmovb edx, eax
mov dword [ebp - 0x20], edx
test edx, edx
je 0x4cb772
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 0x58]
push eax
push ecx
push dword [ebp - 8]
mov ecx, edi
call fcn.004cb2a0
add esp, 0xc
test eax, eax
je 0x4cb6d1
mov edx, dword [ebp - 0x20]
cmp dword [ebp - 0x10], 0
mov ecx, dword [ebp - 8]
lea eax, [ecx + 0x40]
mov dword [esi], eax
je 0x4cb7d3
lea eax, [ecx + 0x80]
mov dword [esi + 4], eax
mov eax, dword [edi + 0x80]
mov dword [esi + 0xc], eax
mov eax, dword [edi + 0x84]
mov dword [esi + 0x14], eax
mov eax, dword [edi + 0x40]
mov dword [esi + 0x10], eax
mov byte [esi + 0x9c], 0
cmp word [edi + 0x44], 1
jne 0x4cb7c1
mov byte [esi + 0x9d], 1
mov eax, dword [edi + 0x70]
mov dword [ebp - 0x10], eax
mov eax, dword [edi + 0x74]
jmp 0x4cb821
mov byte [esi + 0x9d], 0
mov eax, dword [edi + 0x70]
mov dword [ebp - 0x10], eax
mov eax, dword [edi + 0x74]
jmp 0x4cb821
lea eax, [ecx + 0x90]
mov dword [esi + 4], eax
mov eax, dword [edi + 0x90]
mov dword [esi + 0xc], eax
mov eax, dword [edi + 0x94]
mov dword [esi + 0x14], eax
mov eax, dword [edi + 0x40]
mov dword [esi + 0x10], eax
mov byte [esi + 0x9c], 1
cmp word [edi + 0x44], 1
jne 0x4cb80b
mov byte [esi + 0x9d], 1
jmp 0x4cb812
mov byte [esi + 0x9d], 0
mov eax, dword [edi + 0x80]
mov dword [ebp - 0x10], eax
mov eax, dword [edi + 0x84]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 4]
add eax, 4
mov dword [esi + 0x18], 0
add ecx, edx
mov dword [esi + 8], eax
mov dword [ebp - 8], ecx
adc dword [ebp - 0xc], 0
cmp dword [esi + 0xa0], 0
mov byte [esi + 0x9e], 0
mov dword [esi + 0xb0], ecx
je 0x4cb86c
cmp byte [esi + 0x9c], 0
jne 0x4cb86c
cmp byte [esi + 0x9d], 0
je 0x4cb86c
mov eax, 1
jmp 0x4cb86e
xor eax, eax
cmp dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], eax
jne 0x4cb87f
test eax, eax
je 0x4cba53
mov eax, 0x333
mov dword [ebp - 0x14], 0x333
cmp bx, ax
jbe 0x4cb894
mov ebx, eax
jmp 0x4cb8a4
mov ecx, 0xffff
mov eax, 0xfffe
cmp bx, cx
cmove ebx, eax
movzx eax, bx
lea eax, [eax + eax*4]
shl eax, 3
mov ecx, eax
mov dword [ebp - 0x18], eax
call fcn.004cb170
mov ecx, eax
mov dword [ebp - 4], ecx
test ecx, ecx
jne 0x4cb8e0
push 0x567294
push eax
push 0x289
push str.QHImageHlp.c
call fcn.004ced50
add esp, 0x10
mov ebx, dword [ebp - 4]
jmp 0x4cb6d3
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4cb909
lea ecx, [ebp - 0x58]
mov edx, eax
push ecx
mov ecx, dword [ebp - 0xc]
push ecx
push dword [ebp - 8]
mov ecx, dword [ebp - 4]
call fcn.004cb2a0
add esp, 0xc
test eax, eax
je 0x4cb8d8
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
add dword [esi + 0xb0], eax
cmp dword [ebp - 0x1c], 0
je 0x4cb942
xor eax, eax
xor edx, edx
cmp ax, bx
jae 0x4cb942
mov edi, edi
cmp dword [ecx], 0x54494e49
jne 0x4cb930
movzx eax, byte [ecx + 4]
test al, al
je 0x4cb93b
inc edx
add ecx, 0x28
cmp dx, bx
jb 0x4cb920
jmp 0x4cb942
mov byte [esi + 0x9e], 1
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
push ebx
push dword [ebp - 4]
call fcn.004cbb40
add esp, 8
mov dword [ebp - 0xc], eax
test eax, eax
je 0x4cba46
lea ecx, [ebp - 0x58]
mov edx, 0xa
push ecx
push ecx
push edi
mov ecx, eax
call fcn.004cba90
add esp, 0xc
test eax, eax
je 0x4cba46
mov ecx, dword [eax + 4]
test ecx, ecx
jns 0x4cba46
lea eax, [ebp - 0x58]
mov edx, 0x360
push eax
push ecx
and ecx, 0x7fffffff
add ecx, dword [ebp - 0xc]
push edi
call fcn.004cba90
add esp, 0xc
test eax, eax
je 0x4cba46
mov ecx, dword [eax + 4]
test ecx, ecx
jns 0x4cba46
lea eax, [ebp - 0x58]
xor edx, edx
push eax
push ecx
and ecx, 0x7fffffff
add ecx, dword [ebp - 0xc]
push edi
call fcn.004cba90
add esp, 0xc
test eax, eax
je 0x4cba46
mov ecx, dword [eax + 4]
test ecx, ecx
js 0x4cba46
mov eax, dword [ebp - 0xc]
mov edx, 0x10
add eax, ecx
lea ecx, [ebp - 0x58]
push ecx
push 0
push eax
mov ecx, edi
call fcn.004cb2a0
add esp, 0xc
test eax, eax
je 0x4cb8d8
cmp dword [edi + 4], 0x80
jne 0x4cba46
mov ecx, dword [edi]
mov edx, 0x80
push ebx
mov ebx, dword [ebp - 4]
push ebx
call fcn.004cbb40
lea ecx, [ebp - 0x58]
mov edx, 0x80
push ecx
push 0
lea ecx, [esi + 0x1c]
push eax
call fcn.004cb2a0
add esp, 0x14
test eax, eax
je 0x4cb6d3
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x18], eax
mov esi, 1
jmp 0x4cb6d5
mov ebx, dword [ebp - 4]
mov esi, 1
jmp 0x4cb6d5
xor ebx, ebx
lea esi, [ebx + 1]
jmp 0x4cb6d5
push str._rN_e
push 1
push 0x252
jmp 0x4cb6c4
push str._rN_f
push 1
push 0x229
push str.QHImageHlp.c
call fcn.004cee50
add esp, 0x10
jmp 0x4cb6d3