Function at 0x4a2f52
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x83c
mov ebx, ecx
call fcn.0049b00f
mov dword [ebp - 0x824], eax
test eax, eax
je 0x4a327a
mov eax, dword [eax + 0x20]
mov eax, dword [eax + 0x20]
mov eax, dword [eax + 0x34]
test eax, eax
je 0x4a2f88
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [ebp - 0x824]
mov eax, dword [eax + 0x20]
mov eax, dword [eax + 0x20]
xor ecx, ecx
mov dword [eax + 0x34], ecx
test ebx, ebx
je 0x4a3103
mov dword [esp + 8], 7
mov dword [esp + 4], 0x5eae4f
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll__strnicmp
test eax, eax
jne 0x4a310a
lea eax, [ebx + 7]
mov edx, 0x5eae57
call fcn.00427968
mov ebx, eax
mov eax, 0xfffffff4
test ebx, ebx
je 0x4a327d
mov dword [esp], 2
xor edx, edx
xor ecx, ecx
mov eax, ebx
call fcn.00425b5e
mov dword [esp], ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__ftelli64]
mov esi, eax
mov edi, edx
xor edx, edx
mov dword [esp], edx
xor edx, edx
xor ecx, ecx
mov eax, ebx
call fcn.00425b5e
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 3
mov dword [esp + 4], 1
lea eax, [ebp - 0x418]
mov dword [esp], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
cmp eax, 3
je 0x4a3044
mov eax, ebx
call fcn.00425b84
mov eax, 0xfffffffb
jmp 0x4a327d
mov dword [ebp - 0x820], esi
mov dword [ebp - 0x81c], edi
mov al, byte [ebp - 0x418]
cmp al, 0xef
jne 0x4a307c
cmp byte [ebp - 0x417], 0xbb
jne 0x4a3082
cmp byte [ebp - 0x416], 0xbf
jne 0x4a3082
add dword [ebp - 0x820], 0xfffffffd
adc dword [ebp - 0x81c], 0xffffffff
jmp 0x4a309e
not eax
test al, 0xef
jne 0x4a308e
mov eax, ebx
call fcn.00425b84
jmp 0x4a327a
xor eax, eax
mov dword [esp], eax
xor edx, edx
xor ecx, ecx
mov eax, ebx
call fcn.00425b5e
mov eax, dword [ebp - 0x820]
mov esi, dword [ebp - 0x824]
mov edx, dword [esi + 0x20]
mov edi, dword [edx + 0x20]
inc eax
mov dword [esp], eax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov dword [edi + 0x34], eax
mov dword [esp + 0xc], ebx
mov eax, dword [ebp - 0x820]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x824]
mov eax, dword [eax + 0x20]
mov eax, dword [eax + 0x20]
mov eax, dword [eax + 0x34]
mov dword [esp], eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
mov edi, dword [ebp - 0x824]
mov edx, dword [edi + 0x20]
mov edx, dword [edx + 0x20]
mov edx, dword [edx + 0x34]
mov byte [edx + eax], 0
mov eax, ebx
call fcn.00425b84
xor eax, eax
jmp 0x4a327d
mov dword [esp + 4], ebx
lea ebx, [ebp - 0x418]
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov dword [ebp - 0x82c], eax
xor eax, eax
xor edx, edx
mov esi, dword [ebp - 0x82c]
cmp edx, esi
jae 0x4a3250
mov cl, byte [ebp + edx - 0x418]
mov byte [ebp - 0x820], cl
test cl, cl
jns 0x4a323b
lea ebx, [edx + 1]
lea esi, [eax + 1]
mov cl, byte [ebp + ebx - 0x418]
mov byte [ebp - 0x828], cl
mov edi, dword [ebp - 0x828]
and edi, 0xc0
add edi, 0xffffff80
je 0x4a319f
mov bl, byte [ebp - 0x820]
shr bl, 6
or ebx, 0xffffffc0
mov byte [ebp + eax - 0x818], bl
mov cl, byte [ebp - 0x820]
and ecx, 0xffffffbf
mov byte [ebp + edx - 0x418], cl
mov eax, esi
jmp 0x4a323b
movsx edi, byte [ebp - 0x820]
mov ecx, dword [ebp - 0x820]
and ecx, 0xe0
cmp ecx, 0xc0
jne 0x4a31cd
mov dl, byte [ebp - 0x820]
mov byte [ebp + eax - 0x818], dl
mov eax, esi
mov edx, ebx
jmp 0x4a323b
mov ebx, edi
and ebx, 0xf0
cmp ebx, 0xe0
jne 0x4a31ff
mov cl, byte [ebp - 0x820]
mov byte [ebp + eax - 0x818], cl
mov cl, byte [ebp - 0x828]
mov byte [ebp + esi - 0x818], cl
add edx, 2
add eax, 2
jmp 0x4a323b
and edi, 0xf8
cmp edi, 0xf0
jne 0x4a323b
mov cl, byte [ebp - 0x820]
mov byte [ebp + eax - 0x818], cl
mov cl, byte [ebp - 0x828]
mov byte [ebp + esi - 0x818], cl
mov cl, byte [ebp + edx - 0x416]
mov byte [ebp + eax - 0x816], cl
add edx, 3
add eax, 3
mov cl, byte [ebp + edx - 0x418]
mov byte [ebp + eax - 0x818], cl
inc eax
inc edx
jmp 0x4a312e
mov byte [ebp + eax - 0x818], 0
mov eax, dword [ebp - 0x824]
mov eax, dword [eax + 0x20]
mov ebx, dword [eax + 0x20]
lea eax, [ebp - 0x818]
mov dword [esp], eax
call sub.api_ms_win_crt_string_l1_1_0.dll__strdup
mov dword [ebx + 0x34], eax
jmp 0x4a3103
or eax, 0xffffffff
add esp, 0x83c
pop ebx
pop esi
pop edi
pop ebp
ret