Function at 0x4c2a70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, eax
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x6c
mov eax, dword [edx]
cmp eax, dword [edx + 4]
je 0x4c2a85
mov dword [edx + 4], eax
mov eax, dword [esi + 0x18]
mov edi, dword [esi + 0x30]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 0x1c]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x20]
add edi, 4
lea ebx, [eax + 4]
cmp ebx, edi
jae 0x4c2acd
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], eax
nop
mov edx, dword [ebx]
add ebx, 4
mov dword [esp], edx
call fcn.005c2f20
cmp ebx, edi
jb 0x4c2ab0
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x20]
mov dword [esi + 0x30], eax
lea eax, [esp + 0x3c]
mov dword [esi + 0x24], edx
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], ecx
mov dword [esi + 0x38], 0
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.004e7ab0
test eax, eax
js 0x4c2c60
mov dword [esp + 4], 0x605eba
mov dword [esp], ebp
call sub.msvcrt.dll_fopen
mov edi, eax
test eax, eax
je 0x4c2c60
mov ecx, dword [esi + 4]
mov edx, dword [esi]
mov eax, dword [esp + 0x50]
mov ebx, ecx
sub ebx, edx
cmp ebx, eax
jb 0x4c2c40
cmp eax, ebx
jae 0x4c2b38
add edx, eax
cmp ecx, edx
je 0x4c2b38
mov dword [esi + 4], edx
test eax, eax
je 0x4c2bd8
mov edx, dword [esi]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov eax, dword [esi + 4]
mov dword [esp], edx
sub eax, edx
mov dword [esp + 4], eax
call sub.msvcrt.dll_fread
cmp eax, 1
jne 0x4c2c6a
lea eax, [esi + 0x34]
mov dword [esp], esi
mov dword [esp + 0xc], eax
lea eax, [esi + 0x38]
mov dword [esp + 8], eax
lea eax, [esi + 0xc]
mov dword [esp + 4], eax
call fcn.004ce1c0
test al, al
je 0x4c2cb4
mov ebx, dword [esi + 0x38]
mov dword [esp], ebx
call fcn.004c3fe0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ebp
mov dword [esp + 8], str.load_mem_file
mov dword [esp + 4], str._s:__s_encoding_looks_like__s___d__n
mov dword [esp], 3
call fcn.0043ce70
mov dword [esp], edi
call sub.msvcrt.dll_fclose
xor eax, eax
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esi + 0x14]
mov ebx, dword [esi + 0x30]
mov byte [esi + 0x34], 0
mov edx, dword [esi + 0x18]
mov ecx, dword [esi + 0x1c]
mov dword [esi + 0x38], 0
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x20]
lea ebp, [ebx + 4]
lea ebx, [eax + 4]
cmp ebx, ebp
jae 0x4c2c2d
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], eax
lea esi, [esi]
mov edx, dword [ebx]
add ebx, 4
mov dword [esp], edx
call fcn.005c2f20
cmp ebx, ebp
jb 0x4c2c10
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x20]
mov dword [esi + 0x28], edx
mov dword [esi + 0x2c], ecx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x30], eax
jmp 0x4c2bc0
sub eax, ebx
mov ecx, esi
mov dword [esp], eax
call fcn.00581690
sub esp, 4
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x4c2b40
jmp 0x4c2bd8
mov eax, 0xffffffff
jmp 0x4c2bca
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
mov esi, dword [eax]
call ebx
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ebp
mov dword [esp + 8], str.load_mem_file
mov dword [esp + 4], str._s:_fread__s__failed:__s___d__n
mov dword [esp], 1
call fcn.0043ce70
mov dword [esp], 0x4a
call sub.msvcrt.dll_exit
mov dword [esp + 0xc], ebp
mov dword [esp + 8], str.load_mem_file
mov dword [esp + 4], str._s:_failed_to_decode_the_file__s_n
mov dword [esp], 1
call fcn.0043ce70
mov dword [esp], 0x4a
call sub.msvcrt.dll_exit
push ebp
push edi
push esi
mov esi, eax
push ebx
mov ebx, edx
sub esp, 0x42c
mov edi, dword [0x699d3c]
mov ebp, dword [eax]
test edi, edi
je 0x4c2d70
movzx eax, byte [edi]
test al, al
je 0x4c2d70
mov ecx, edi
mov edx, edi
jmp 0x4c2d17
movzx eax, byte [edx]
test al, al
je 0x4c2d2b
add edx, 1
cmp al, 0x2f
je 0x4c2d22
cmp al, 0x5c
jne 0x4c2d10
movzx eax, byte [edx]
mov ecx, edx
test al, al
jne 0x4c2d17
sub ecx, edi
lea eax, [esp + 0x20]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ecx
mov dword [esp + 8], str._.s_s
mov dword [esp + 4], 0x400
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__snprintf]
mov edx, ebx
lea eax, [esp + 0x20]
call fcn.004c2a70
test eax, eax
js 0x4c2d78
add esp, 0x42c
pop ebx
pop esi
pop edi
pop ebp
ret
xor ecx, ecx
jmp 0x4c2d2d
mov eax, dword [esi]
mov edx, ebx
call fcn.004c2a70
test eax, eax
jns 0x4c2d65
mov eax, dword [esi]
mov dword [esp + 4], str.Failed_to_load___s__or___s__n
mov dword [esp], 1
mov dword [esp + 0xc], eax
lea eax, [esp + 0x20]
mov dword [esp + 8], eax
call fcn.0043ce70
mov dword [esp], 0x4a
call sub.msvcrt.dll_exit
lea esi, cs:[esi]
lea esi, cs:[esi]