Function at 0x4c6c40
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
mov eax, dword [ebp + 0xc]
mov edx, dword [eax]
cmp edx, 3
jne 0x4c6c80
push 0
push 0
push 3
push 0
push 3
push SysReAllocStringLen
mov ecx, dword [ebp + 0xc]
add ecx, 0x124
push ecx
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
cmp eax, 0xffffffff
jne 0x4c6c86
xor eax, eax
jmp 0x4c6f1b
mov edx, dword [ebp + 8]
mov dword [ebp - 0x3c], edx
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 8]
test eax, eax
je 0x4c6cc4
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 0x3c]
call fcn.004ba092
add esp, 0x14
mov dword [ebp - 0x40], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx]
cmp ecx, 3
jne 0x4c6cbc
push dword [ebp - 0x3c]
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp - 0x40]
jmp 0x4c6f1b
mov edx, dword [ebp + 0x18]
mov dword [ebp - 0x24], edx
imul ecx, dword [ebp - 0x24], 0x930
mov dword [ebp - 0x28], ecx
push dword [ebp - 0x28]
push 0
push dword [ebp + 0x14]
call fcn.0066c86c
add esp, 0xc
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx + 0x238]
sub eax, ecx
mov dword [ebp - 0x44], eax
xor eax, eax
mov dword [ebp - 0x40], eax
mov edx, dword [ebp - 0x44]
test edx, edx
jge 0x4c6d4b
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 0x238]
mov edx, dword [ebp + 0x10]
sub eax, edx
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x24]
cmp ecx, eax
jb 0x4c6d36
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx]
cmp ecx, 3
jne 0x4c6d2e
push dword [ebp - 0x3c]
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp - 0x28]
jmp 0x4c6f1b
mov edx, dword [ebp - 0x30]
sub dword [ebp - 0x24], edx
xor ecx, ecx
mov dword [ebp - 0x44], ecx
imul eax, dword [ebp - 0x30], 0x930
mov dword [ebp - 0x40], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0xc]
cdq
push edx
push eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 0xc]
dec eax
cdq
mov ecx, dword [ebp + 0xc]
add eax, dword [ecx + 0x230]
adc edx, dword [ecx + 0x234]
call fcn.0067457f
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x40]
add edx, ecx
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x1c]
cmp eax, edx
jae 0x4c6f06
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp + 0xc]
imul dword [edx + 0xc]
cdq
mov ecx, dword [ebp + 0xc]
add eax, dword [ecx + 0x228]
adc edx, dword [ecx + 0x22c]
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
push dword [ebp - 0x3c]
call sub.KERNEL32.DLL_SetFilePointer
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
cmp edx, 0xffffffff
jne 0x4c6de9
call sub.KERNEL32.DLL_GetLastError
test eax, eax
je 0x4c6de9
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
cmp eax, 3
jne 0x4c6de2
push dword [ebp - 0x3c]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4c6f1b
mov edx, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x24]
add edx, ecx
mov eax, dword [ebp - 0x1c]
cmp edx, eax
jbe 0x4c6e03
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x44]
sub edx, ecx
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp + 0xc]
imul dword [edx + 0xc]
mov dword [ebp - 0x2c], eax
imul ecx, dword [ebp - 0x24], 0x930
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 0xc]
cmp edx, 0x930
jne 0x4c6e62
push 0
lea ecx, [ebp - 0x14]
push ecx
push dword [ebp - 0x28]
push dword [ebp - 0x34]
push dword [ebp - 0x3c]
call sub.KERNEL32.DLL_ReadFile
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
cmp eax, edx
je 0x4c6efb
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
cmp eax, 3
jne 0x4c6e5b
push dword [ebp - 0x3c]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4c6f1b
push dword [ebp - 0x2c]
call fcn.0066c210
pop ecx
mov dword [ebp - 0x4c], eax
mov edx, dword [ebp - 0x4c]
test edx, edx
je 0x4c6efb
push 0
lea ecx, [ebp - 0x14]
push ecx
push dword [ebp - 0x2c]
push dword [ebp - 0x4c]
push dword [ebp - 0x3c]
call sub.KERNEL32.DLL_ReadFile
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x2c]
cmp eax, edx
je 0x4c6ead
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
cmp eax, 3
jne 0x4c6ea9
push dword [ebp - 0x3c]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x4c6f1b
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x38], edx
xor ecx, ecx
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
cmp eax, edx
jae 0x4c6ef2
push 0x930
push dword [ebp - 0x38]
push dword [ebp - 0x34]
call fcn.0066c7fc
add esp, 0xc
add dword [ebp - 0x34], 0x930
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 0xc]
add dword [ebp - 0x38], eax
inc dword [ebp - 0x20]
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
cmp edx, ecx
jb 0x4c6ec2
push dword [ebp - 0x4c]
call fcn.0066c220
pop ecx
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x28]
add eax, edx
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
cmp eax, 3
jne 0x4c6f18
push dword [ebp - 0x3c]
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp - 0x40]
mov esp, ebp
pop ebp
ret