Function at 0x4c8a00
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2fe4
call fcn.00571390
push ebx
mov ebx, dword [ebp + 0x10]
push esi
xor esi, esi
cmp ebx, esi
push edi
mov dword [esp + 0x28], edx
mov dword [esp + 0x20], ecx
je 0x4c8a26
mov dword [ebx], esi
or edi, 0xffffffff
mov edx, 0x3e7
lea ecx, [esp + 0xc00]
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x40], 0x2000
call fcn.0041ef30
mov edx, 0x3e7
lea ecx, [esp + 0x430]
call fcn.0041ef30
mov edx, 0x3e7
lea ecx, [esp + 0x818]
call fcn.0041ef30
mov edx, 0x3e7
lea ecx, [esp + 0x48]
call fcn.0041ef30
mov eax, dword [ebp + 8]
and eax, 1
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x2c], eax
je 0x4c8b7d
mov ecx, dword [ebp + 0xc]
call fcn.00542ed0
test eax, eax
je 0x4c8ab7
mov edx, 1
lea ecx, [esp + 0xc00]
call fcn.0052ef00
lea edx, [esp + 0x430]
mov ecx, 0xe7d
call fcn.0041d620
lea eax, [esp + 0x430]
push 0x20
push eax
call fcn.00570260
add esp, 8
cmp eax, esi
je 0x4c8ae1
mov byte [eax], 0
lea eax, [esp + 0x430]
lea edx, [eax + 1]
jmp 0x4c8af0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c8af0
sub eax, edx
lea edx, [esp + 0x818]
mov ecx, 0xe75
mov dword [esp + 0x44], eax
call fcn.0041d620
lea ecx, [esp + 0x818]
push 0x20
push ecx
call fcn.00570260
add esp, 8
cmp eax, esi
je 0x4c8b27
mov byte [eax], 0
lea eax, [esp + 0x818]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c8b31
sub eax, edx
lea edx, [esp + 0x48]
mov ecx, 0xe76
mov dword [esp + 0x3c], eax
call fcn.0041d620
lea edx, [esp + 0x48]
push 0x20
push edx
call fcn.00570260
add esp, 8
cmp eax, esi
je 0x4c8b62
mov byte [eax], 0
lea eax, [esp + 0x48]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c8b70
sub eax, edx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x20]
push esi
push 0x80
push 3
push esi
push 3
push bind
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, edi
mov dword [esp + 0x20], eax
jne 0x4c8bb5
cmp ebx, esi
je 0x4c8baa
mov dword [ebx], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push esi
push esi
mov edx, 2
mov ecx, eax
call fcn.0048df30
mov dword [esp + 0x10], eax
and eax, edx
cmp eax, edi
mov dword [esp + 0x14], edx
jne 0x4c8be4
cmp ebx, esi
je 0x4c8e4a
mov dword [ebx], 1
jmp 0x4c8e4a
mov ebx, dword [esp + 0x40]
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov eax, ebx
cdq
cmp edx, esi
jl 0x4c8c03
jg 0x4c8bfd
cmp eax, ecx
jbe 0x4c8c03
mov ebx, ecx
mov dword [esp + 0x40], ebx
mov eax, ebx
cdq
sub ecx, eax
mov eax, dword [esp + 0x30]
sbb esi, edx
cmp ecx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], esi
jne 0x4c8c24
cmp esi, dword [esp + 0x34]
je 0x4c8e4a
push esi
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x24]
mov dword [esp + 0x34], ecx
push ecx
xor edx, edx
mov ecx, esi
call fcn.0048df30
and eax, edx
cmp eax, 0xffffffff
je 0x4c8e34
xor eax, eax
push eax
mov ecx, 0x802
lea edi, [esp + 0xfec]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x28]
push ecx
push ebx
lea edx, [esp + 0xff4]
push edx
push esi
mov dword [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4c8e34
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x4c8e4a
dec ecx
xor ebx, ebx
test ebx, ebx
mov dword [esp + 0x24], ecx
mov esi, ecx
jl 0x4c8e07
jg 0x4c8cb0
test esi, esi
jb 0x4c8e07
jmp 0x4c8cb0
mov ecx, dword [esp + 0x24]
lea esp, [esp]
mov al, byte [esp + esi + 0xfe8]
cmp al, 0xd
je 0x4c8cc3
cmp al, 0xa
jne 0x4c8ddb
xor eax, eax
cmp ebx, eax
jg 0x4c8d9c
jl 0x4c8cd7
cmp esi, ecx
jae 0x4c8d9c
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4c8d40
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x44]
push eax
push ecx
push edx
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x828]
push ecx
lea edx, [esp + 0x444]
push edx
mov edx, dword [esp + 0x34]
lea eax, [esp + 0xc18]
push eax
lea ecx, [esp + esi + 0x1005]
push ecx
mov ecx, dword [ebp + 0xc]
call fcn.004c87f0
mov edi, eax
test byte [ebp + 8], 2
je 0x4c8d47
push 0x5acb8c
push edi
call fcn.005809c6
add esp, 8
test eax, eax
jne 0x4c8d47
mov edi, 0x583b74
jmp 0x4c8d47
lea edi, [esp + esi + 0xfe9]
mov eax, dword [ebp + 8]
test eax, eax
je 0x4c8d5b
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4c8d9c
cmp byte [edi], 0
je 0x4c8d9c
mov eax, dword [esp + 0x28]
test eax, eax
jle 0x4c8e4a
dec eax
push 0
mov edx, edi
xor ecx, ecx
mov dword [esp + 0x2c], eax
call fcn.004c7e10
test eax, eax
je 0x4c8e3d
mov ecx, dword [esp + 0x1c]
test ecx, ecx
mov dword [eax + 0x40], ecx
jne 0x4c8d8f
mov dword [eax + 0x44], eax
jmp 0x4c8d98
mov edx, dword [ecx + 0x44]
mov dword [eax + 0x44], edx
mov dword [ecx + 0x44], eax
mov dword [esp + 0x1c], eax
cmp byte [esp + esi + 0xfe8], 0xa
mov byte [esp + esi + 0xfe8], 0
jne 0x4c8dd1
test ebx, ebx
jl 0x4c8e07
jg 0x4c8db8
test esi, esi
jbe 0x4c8df5
mov al, byte [esp + esi + 0xfe7]
add esi, 0xffffffff
adc ebx, 0xffffffff
cmp al, 0xd
jne 0x4c8de1
mov byte [esp + esi + 0xfe8], 0
test ebx, ebx
jl 0x4c8e07
jg 0x4c8ddb
test esi, esi
jbe 0x4c8df5
add esi, 0xffffffff
adc ebx, 0xffffffff
test ebx, ebx
jg 0x4c8ca5
jl 0x4c8e07
test esi, esi
jae 0x4c8ca5
jmp 0x4c8e07
test ebx, ebx
jg 0x4c8be4
jl 0x4c8e07
test esi, esi
jae 0x4c8be4
lea eax, [esp + 0xfe8]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c8e11
mov ecx, dword [esp + 0x10]
sub eax, edx
add ecx, eax
mov eax, dword [esp + 0x14]
adc eax, 0
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
jmp 0x4c8be4
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4c8e4a
jmp 0x4c8e44
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4c8e4a
mov dword [eax], 1
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc