Function at 0x4c5774
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xffffffc0
xor eax, eax
mov dword [ebp - 0x3c], eax
xor edx, edx
mov dword [0x777e34], edx
xor ecx, ecx
mov dword [0x777e38], ecx
mov dword [0x777e30], 0x800
xor eax, eax
mov dword [0x777e24], eax
mov edx, dword [0x6ebc48]
test edx, edx
je 0x4c588d
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jns 0x4c57c2
add ecx, 0x7ff
sar ecx, 0xb
mov dword [ebp - 0x40], ecx
push dword [0x6ebc4c]
push 1
mov eax, dword [ebp - 0x40]
add eax, 0x10
push eax
lea edx, [ebp - 0x1040]
push edx
call fcn.0046f1c0
add esp, 0x10
xor ecx, ecx
mov dword [ebp - 0x28], ecx
xor eax, eax
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x18]
movsx ecx, byte [ebp + edx - 0x1040]
mov eax, dword [ebp - 0x18]
xor edx, edx
mov dl, byte [eax + 0x777e3c]
cmp ecx, edx
jne 0x4c5815
inc dword [ebp - 0x18]
mov ecx, dword [ebp - 0x18]
cmp ecx, 6
jl 0x4c57f0
mov eax, dword [ebp - 0x18]
cmp eax, 6
jne 0x4c5824
mov dword [ebp - 0x28], 1
mov edx, dword [ebp - 0x28]
test edx, edx
jne 0x4c586d
mov dword [ebp - 0x18], 1
mov ecx, dword [ebp - 0x18]
movsx eax, byte [ebp + ecx - 0x1040]
mov edx, dword [ebp - 0x18]
xor ecx, ecx
mov cl, byte [edx + 0x777e42]
cmp eax, ecx
jne 0x4c5857
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, 6
jl 0x4c5832
mov edx, dword [ebp - 0x18]
cmp edx, 6
jne 0x4c586d
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x28], 1
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4c5886
mov eax, dword [ebp + 0xc]
mov dword [0x777e38], eax
mov eax, 1
jmp 0x4c5d27
xor eax, eax
jmp 0x4c5d27
push 0x8006
call fcn.0066c62c
pop ecx
mov dword [ebp - 8], eax
mov edx, dword [ebp - 8]
test edx, edx
jne 0x4c58c3
push 0x59fa
call fcn.00402b9c
pop ecx
push eax
push dword [0x76875c]
call fcn.00462a84
add esp, 8
xor eax, eax
jmp 0x4c5d27
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], edx
xor ecx, ecx
mov dword [ebp - 0x28], ecx
xor eax, eax
mov dword [ebp - 0x10], eax
push 0
push 0
push dword [ebp - 0x1c]
push dword [ebp + 8]
call sub.KERNEL32.DLL_SetFilePointer
cmp eax, 0xffffffff
jne 0x4c58f7
push dword [ebp - 8]
call fcn.0066c63c
pop ecx
xor eax, eax
jmp 0x4c5d27
push 0
lea edx, [ebp - 0x30]
push edx
push 0x8006
push dword [ebp - 8]
push dword [ebp + 8]
call sub.KERNEL32.DLL_ReadFile
mov ecx, dword [ebp - 0x30]
sub ecx, 6
inc ecx
mov dword [ebp - 0x34], ecx
mov eax, dword [ebp - 0x34]
test eax, eax
jg 0x4c592e
push dword [ebp - 8]
call fcn.0066c63c
pop ecx
xor eax, eax
jmp 0x4c5d27
xor edx, edx
mov dword [ebp - 0x14], edx
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x34]
cmp ecx, eax
jge 0x4c59d5
xor edx, edx
mov dword [ebp - 0x18], edx
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
lea edx, [ecx + eax]
mov ecx, dword [ebp - 0x18]
mov al, byte [edx + ecx]
mov edx, dword [ebp - 0x18]
mov cl, byte [edx + 0x777e3c]
cmp al, cl
jne 0x4c596d
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, 6
jl 0x4c5946
mov edx, dword [ebp - 0x18]
cmp edx, 6
jne 0x4c597e
mov dword [ebp - 0x28], 1
jmp 0x4c59d5
mov dword [ebp - 0x18], 1
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
lea edx, [ecx + eax]
mov ecx, dword [ebp - 0x18]
mov al, byte [edx + ecx]
mov edx, dword [ebp - 0x18]
mov cl, byte [edx + 0x777e42]
cmp al, cl
jne 0x4c59ac
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, 6
jl 0x4c5985
mov edx, dword [ebp - 0x18]
cmp edx, 6
jne 0x4c59c4
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x28], 1
jmp 0x4c59d5
inc dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x34]
cmp ecx, eax
jl 0x4c5941
mov edx, dword [ebp - 0x28]
test edx, edx
je 0x4c59e9
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
add ecx, eax
mov dword [ebp - 0x20], ecx
jmp 0x4c59ff
add dword [ebp - 0x1c], 0x8000
inc dword [ebp - 0x10]
mov edx, dword [ebp - 0x10]
cmp edx, 0x20
jl 0x4c58d3
mov ecx, dword [ebp - 0x28]
test ecx, ecx
jne 0x4c5a16
push dword [ebp - 8]
call fcn.0066c63c
pop ecx
xor eax, eax
jmp 0x4c5d27
xor edx, edx
mov dword [ebp - 0x28], edx
push 0
push 0
mov ecx, dword [ebp - 0x20]
add ecx, 0x800
push ecx
push dword [ebp + 8]
call sub.KERNEL32.DLL_SetFilePointer
cmp eax, 0xffffffff
jne 0x4c5a46
push dword [ebp - 8]
call fcn.0066c63c
pop ecx
xor eax, eax
jmp 0x4c5d27
push 0
lea edx, [ebp - 0x30]
push edx
push 0x8000
push dword [ebp - 8]
push dword [ebp + 8]
call sub.KERNEL32.DLL_ReadFile
mov ecx, dword [ebp - 0x30]
sub ecx, 6
inc ecx
mov dword [ebp - 0x34], ecx
mov eax, dword [ebp - 0x34]
test eax, eax
jg 0x4c5a7d
push dword [ebp - 8]
call fcn.0066c63c
pop ecx
xor eax, eax
jmp 0x4c5d27
xor edx, edx
mov dword [ebp - 0x14], edx
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x34]
cmp ecx, eax
jge 0x4c5b26
mov edx, dword [ebp - 0x3c]
test edx, edx
jne 0x4c5ad6
mov dword [ebp - 0x18], 1
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
lea edx, [ecx + eax]
mov ecx, dword [ebp - 0x18]
mov al, byte [edx + ecx]
mov edx, dword [ebp - 0x18]
mov cl, byte [edx + 0x777e3c]
cmp al, cl
jne 0x4c5ac5
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, 6
jl 0x4c5a9e
mov edx, dword [ebp - 0x18]
cmp edx, 6
jne 0x4c5b15
mov dword [ebp - 0x28], 1
jmp 0x4c5b26
mov dword [ebp - 0x18], 1
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
lea edx, [ecx + eax]
mov ecx, dword [ebp - 0x18]
mov al, byte [edx + ecx]
mov edx, dword [ebp - 0x18]
mov cl, byte [edx + 0x777e48]
cmp al, cl
jne 0x4c5b04
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, 5
jl 0x4c5add
mov edx, dword [ebp - 0x18]
cmp edx, 5
jne 0x4c5b15
mov dword [ebp - 0x28], 1
jmp 0x4c5b26
inc dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x34]
cmp ecx, eax
jl 0x4c5a90
mov edx, dword [ebp - 0x28]
test edx, edx
jne 0x4c5b3d
push dword [ebp - 8]
call fcn.0066c63c
pop ecx
xor eax, eax
jmp 0x4c5d27
mov edx, dword [ebp - 0x14]
add edx, 0x800
mov dword [0x777e30], edx
xor ecx, ecx
mov dword [ebp - 0x28], ecx
xor eax, eax
mov dword [ebp - 0x14], eax
jmp 0x4c5b9a
mov dword [ebp - 0x18], 1
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
lea eax, [edx + ecx]
mov edx, dword [ebp - 0x18]
mov cl, byte [eax + edx]
mov eax, dword [ebp - 0x18]
mov dl, byte [eax + 0x760da8]
cmp cl, dl
jne 0x4c5b86
inc dword [ebp - 0x18]
mov ecx, dword [ebp - 0x18]
cmp ecx, 0xc
jl 0x4c5b5f
mov eax, dword [ebp - 0x18]
cmp eax, 0xc
jne 0x4c5b97
mov dword [ebp - 0x28], 1
jmp 0x4c5bad
inc dword [ebp - 0x14]
mov edx, dword [0x777e30]
add edx, 0xfffff800
mov ecx, dword [ebp - 0x14]
cmp edx, ecx
jg 0x4c5b58
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x4c5bf4
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x2c], edx
mov ecx, dword [0x777e30]
add ecx, 0xfffff800
mov eax, dword [ebp - 0x2c]
sub ecx, eax
mov dword [0x777e34], ecx
mov edx, dword [0x777e34]
cmp edx, 0x18
jne 0x4c5be8
mov dword [0x777e24], 2
jmp 0x4c5c55
mov dword [0x777e24], 1
jmp 0x4c5c55
mov ecx, dword [0x777e30]
cmp ecx, 0x800
je 0x4c5c55
mov eax, dword [0x777e30]
add eax, 0xfffff800
mov dword [0x777e34], eax
mov edx, dword [0x777e34]
cmp edx, 0xc
jle 0x4c5c3a
mov ecx, dword [0x777e30]
add ecx, 0xfffff6e8
mov dword [0x777e34], ecx
mov dword [0x777e24], 2
jmp 0x4c5c44
mov dword [0x777e24], 1
mov eax, dword [0x777e34]
test eax, eax
jge 0x4c5c55
xor edx, edx
mov dword [0x777e34], edx
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
je 0x4c5cfe
mov eax, dword [ebp + 0xc]
mov dword [0x777e38], eax
imul edx, dword [0x777e30], 0xe0
add dword [ebp - 0x20], edx
xor ecx, ecx
mov dword [ebp - 0x10], ecx
push 0
push 0
push dword [ebp - 0x20]
push dword [ebp + 8]
call sub.KERNEL32.DLL_SetFilePointer
cmp eax, 0xffffffff
je 0x4c5cd9
push 0
lea eax, [ebp - 0x30]
push eax
push dword [0x777e30]
push dword [ebp - 8]
push dword [ebp + 8]
call sub.KERNEL32.DLL_ReadFile
mov edx, dword [ebp - 0x30]
mov ecx, dword [0x777e30]
cmp edx, ecx
jne 0x4c5cd9
push dword [ebp - 0x30]
push 2
push dword [ebp - 8]
call fcn.00467930
add esp, 0xc
test eax, eax
jne 0x4c5cd9
mov eax, dword [0x777e30]
add dword [ebp - 0x20], eax
inc dword [ebp - 0x10]
mov edx, dword [ebp - 0x10]
cmp edx, 0x20
jl 0x4c5c7a
mov ecx, dword [ebp - 0x10]
cmp ecx, 0x20
jge 0x4c5d19
mov eax, dword [ebp - 0x20]
mov edx, dword [0x777e34]
sub eax, edx
mov ecx, dword [0x777e30]
shl ecx, 8
sub eax, ecx
mov dword [0x777e38], eax
jmp 0x4c5d19
mov eax, dword [ebp - 0x20]
mov edx, dword [0x777e34]
sub eax, edx
mov ecx, dword [0x777e30]
shl ecx, 4
sub eax, ecx
mov dword [0x777e38], eax
push dword [ebp - 8]
call fcn.0066c63c
pop ecx
mov eax, 1
mov esp, ebp
pop ebp
ret