Function at 0x47c670
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov dword [ebp - 0x10], ecx
cmp dword [ebp + 8], 0
jne 0x47c696
push 0
push 0
push 0
push 2
mov ecx, dword [ebp - 0x10]
call fcn.00480cb0
xor al, al
jmp 0x47c86e
mov ecx, dword [ebp - 0x10]
call fcn.0047b410
mov ecx, dword [ebp - 0x10]
add ecx, 4
call fcn.0047b3f0
mov dword [ebp - 0x18], 0
push 2
push 0
mov eax, dword [ebp + 8]
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ftell
add esp, 4
mov dword [ebp - 0x18], eax
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0xc
cmp dword [ebp - 0x18], 0
jg 0x47c6fc
push 0
push 0
push 0
push 0xc
mov ecx, dword [ebp - 0x10]
call fcn.00480cb0
xor al, al
jmp 0x47c86e
mov eax, dword [ebp - 0x18]
add eax, 1
push eax
call sub.mfc140u.dll_operator
add esp, 4
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 8], ecx
mov edx, 1
imul eax, edx, 0
mov ecx, dword [ebp - 8]
mov byte [ecx + eax], 0
mov edx, dword [ebp + 8]
push edx
push 1
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 8]
push ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add esp, 0x10
cmp eax, 1
je 0x47c783
mov edx, dword [ebp - 8]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
push eax
call sub.mfc140u.dll_operator_1
add esp, 4
cmp dword [ebp - 0x1c], 0
jne 0x47c75f
mov dword [ebp - 0x2c], 0
jmp 0x47c76c
mov dword [ebp - 8], 0x8123
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x2c], ecx
push 0
push 0
push 0
push 2
mov ecx, dword [ebp - 0x10]
call fcn.00480cb0
xor al, al
jmp 0x47c86e
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov byte [ebp - 1], 0xd
mov byte [ebp - 2], 0xa
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0x18]
mov byte [ecx], 0
mov edx, dword [ebp - 0xc]
movsx eax, byte [edx]
test eax, eax
je 0x47c801
mov ecx, dword [ebp - 0xc]
movsx edx, byte [ecx]
cmp edx, 0xd
jne 0x47c7e3
mov eax, dword [ebp - 0x14]
mov byte [eax], 0xa
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
movsx ecx, byte [eax]
cmp ecx, 0xa
jne 0x47c7e1
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
jmp 0x47c7ff
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dl, byte [ecx]
mov byte [eax], dl
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
jmp 0x47c7a0
mov edx, dword [ebp - 0x14]
mov byte [edx], 0
mov eax, dword [ebp + 0xc]
push eax
push 0
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x10]
mov edx, dword [eax + 8]
call edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
push ecx
call sub.mfc140u.dll_operator_1
add esp, 4
cmp dword [ebp - 0x20], 0
jne 0x47c83f
mov dword [ebp - 0x30], 0
jmp 0x47c84c
mov dword [ebp - 8], 0x8123
mov edx, dword [ebp - 8]
mov dword [ebp - 0x30], edx
mov ecx, dword [ebp - 0x10]
call fcn.0047b1d0
movzx eax, al
test eax, eax
jne 0x47c864
mov dword [ebp - 0x24], 1
jmp 0x47c86b
mov dword [ebp - 0x24], 0
mov al, byte [ebp - 0x24]
mov esp, ebp
pop ebp
ret 8