Function at 0x46d0fc
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x24], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x46d367
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 1], 0
lea eax, [ebx + 0x54c]
call fcn.00403a28
cmp byte [ebx + 0x558], 0
jne 0x46d139
push 5
call sub.kernel32.dll_Sleep
call sub.kernel32.dll_GetTickCount
add eax, dword [ebx + 4]
mov dword [ebp - 8], eax
jmp 0x46d244
xor eax, eax
push ebp
push 0x46d220
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebx + 8]
push eax
call sub.kernel32.dll_ClearCommError
test eax, eax
je 0x46d209
cmp byte [ebx + 0x558], 0
je 0x46d186
cmp dword [ebp - 0x1c], 0
jne 0x46d186
mov dword [ebp - 0x1c], 1
cmp dword [ebp - 0x1c], 0x190
jbe 0x46d196
mov dword [ebp - 0x1c], 0x190
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x10]
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x1c]
push eax
lea eax, [ebx + 0x352]
push eax
mov eax, dword [ebx + 8]
push eax
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x46d216
call sub.kernel32.dll_GetLastError_1
cmp dword [ebp - 0x10], 0
jbe 0x46d216
mov edi, dword [ebp - 0x10]
dec edi
test edi, edi
jl 0x46d1f2
inc edi
xor esi, esi
lea eax, [ebp - 0x24]
mov dl, byte [ebx + esi + 0x352]
call fcn.00403bd0
mov edx, dword [ebp - 0x24]
lea eax, [ebx + 0x54c]
call fcn.00403cb0
inc esi
dec edi
jne 0x46d1d1
mov eax, dword [ebp - 0x10]
cmp byte [ebx + eax + 0x351], 0xd
jne 0x46d216
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x46d252
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x46d351
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x46d234
cmp byte [ebx + 0x558], 0
jne 0x46d244
push 5
call sub.kernel32.dll_Sleep
call sub.kernel32.dll_GetTickCount
cmp eax, dword [ebp - 8]
jbe 0x46d149
mov ecx, dword [ebx + 0x54c]
mov edx, dword [ebx + 0x20]
lea eax, [ebx + 0x54c]
call fcn.00403cf4
mov edx, dword [ebx + 0x54c]
mov eax, 0x46d380
call fcn.00403f94
mov edi, eax
test edi, edi
jg 0x46d28e
mov edx, dword [ebx + 0x54c]
mov eax, 0x46d38c
call fcn.00403f94
mov edi, eax
mov edx, dword [ebx + 0x54c]
mov eax, 0x46d398
call fcn.00403f94
mov dword [ebp - 0x14], eax
test edi, edi
je 0x46d351
cmp dword [ebp - 0x14], 0
jne 0x46d2d2
mov ecx, edi
dec ecx
lea eax, [ebx + 0x54c]
mov edx, 1
call fcn.00403ef0
lea eax, [ebx + 0x20]
mov edx, dword [ebx + 0x54c]
call fcn.00403a7c
jmp 0x46d351
mov eax, dword [ebx + 0x54c]
call fcn.00403ca8
xor edi, edi
xor edx, edx
mov dword [ebp - 0x14], edx
mov esi, eax
cmp esi, 1
jl 0x46d328
mov eax, dword [ebx + 0x54c]
cmp byte [eax + esi - 1], 0xd
jne 0x46d303
cmp dword [ebp - 0x14], 0
jne 0x46d323
mov dword [ebp - 0x14], esi
jmp 0x46d323
mov eax, dword [ebx + 0x54c]
mov al, byte [eax + esi - 1]
cmp al, 0x7f
je 0x46d31b
mov edx, dword [ebx + 0x54c]
cmp al, 0x7e
jne 0x46d323
test edi, edi
jne 0x46d323
mov edi, esi
jmp 0x46d328
dec esi
test esi, esi
jne 0x46d2eb
mov esi, dword [ebp - 0x14]
sub esi, edi
mov eax, esi
sub eax, 4
test eax, eax
jle 0x46d351
lea eax, [ebx + 0x54c]
push eax
mov ecx, esi
inc ecx
mov eax, dword [ebx + 0x54c]
mov edx, edi
call fcn.00403eb0
mov byte [ebp - 1], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46d36e
lea eax, [ebp - 0x24]
call fcn.00403a28
ret