Function at 0x4146bc
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff98
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], edx
xor eax, eax
push ebp
push 0x414992
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov edx, dword [0x413cac]
call fcn.00404b78
xor eax, eax
mov dword [ebp - 8], eax
xor edi, edi
xor edx, edx
push ebp
push 0x414959
push dword fs:[edx]
mov dword fs:[edx], esp
xor eax, eax
mov al, byte [0x4188b8]
cmp edi, eax
jge 0x41494f
cmp edi, 0xffffffff
je 0x414724
push 0x40140000
push 0
call fcn.00414408
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [0x4188bc]
push eax
call sub.kernel32.dll_ClearCommError
test eax, eax
je 0x414949
cmp dword [ebp - 0x60], 0
jbe 0x414949
lea eax, [ebp - 0x58]
xor ecx, ecx
mov edx, 0x40
call fcn.00402aac
xor eax, eax
mov dword [ebp - 0xc], eax
or edi, 0xffffffff
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x60]
push eax
lea eax, [ebp - 0x58]
push eax
mov eax, dword [0x4188bc]
push eax
call sub.kernel32.dll_ReadFile
cmp dword [ebp - 0xc], 0
je 0x414785
cmp dword [ebp - 0x60], 0x40
jbe 0x414797
push 8
mov eax, dword [0x4188bc]
push eax
call sub.kernel32.dll_PurgeComm
jmp 0x41494f
mov eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x413cac]
call fcn.00404a78
add esp, 4
mov esi, dword [ebp - 0xc]
dec esi
test esi, esi
jl 0x4147cc
inc esi
xor ebx, ebx
lea eax, [ebp - 0x58]
mov edx, dword [ebp - 0x14]
mov cl, byte [eax]
mov byte [edx + ebx], cl
inc ebx
inc eax
dec esi
jne 0x4147bf
cmp dword [ebp - 0xc], 1
jne 0x4147fd
cmp byte [ebp - 0x58], 0x22
jne 0x4147fd
push 1
mov eax, dword [ebp - 4]
mov ecx, 1
mov edx, dword [0x413cac]
call fcn.00404a78
add esp, 4
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov byte [eax], 0xbb
jmp 0x41494f
lea edx, [ebp - 0x68]
mov eax, dword [ebp - 0x14]
call fcn.00413f84
mov edx, dword [ebp - 0x68]
lea eax, [ebp - 0x14]
mov ecx, dword [0x413cac]
call fcn.00404bb4
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x18]
mov ecx, 1
mov edx, dword [0x413cac]
call fcn.00404a78
add esp, 4
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
dec esi
test esi, esi
jl 0x41485a
inc esi
xor ebx, ebx
mov edx, dword [ebp - 0x14]
mov dl, byte [edx + ebx]
push edx
lea edx, [ebx + eax]
mov ecx, dword [ebp - 0x18]
add ecx, edx
pop edx
mov byte [ecx], dl
inc ebx
dec esi
jne 0x414844
mov eax, dword [ebp - 0xc]
add dword [ebp - 8], eax
cmp dword [ebp - 8], 5
jbe 0x414704
mov eax, dword [ebp - 0x18]
cmp byte [eax], 4
jne 0x414704
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax + 1]
mov edx, dword [ebp - 0x18]
movzx edx, byte [edx + 2]
add eax, edx
cmp eax, 0xff
jne 0x414704
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax + 3]
mov edx, dword [ebp - 0x18]
movzx edx, byte [edx + 4]
add eax, edx
cmp eax, 0xff
jne 0x414704
mov eax, dword [ebp - 8]
sub eax, 6
mov edx, dword [ebp - 0x18]
movzx edx, byte [edx + 3]
cmp eax, edx
jb 0x414704
xor eax, eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x18]
movzx esi, byte [eax + 3]
test esi, esi
jle 0x4148f3
mov ebx, 1
mov eax, dword [ebp - 0x18]
call fcn.004048c4
lea edi, [ebx + 4]
cmp eax, edi
jl 0x4148ef
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax + edi]
add dword [ebp - 8], eax
inc ebx
dec esi
jne 0x4148d6
mov eax, dword [ebp - 8]
and eax, 0xff
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x18]
call fcn.004048c4
mov edx, dword [ebp - 0x18]
movzx edx, byte [edx + 3]
add edx, 5
cmp eax, edx
jl 0x41494f
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax + 3]
mov edx, dword [ebp - 0x18]
movzx eax, byte [edx + eax + 5]
cmp eax, dword [ebp - 8]
jne 0x41494f
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax + 3]
add eax, 5
push eax
mov eax, dword [ebp - 4]
push eax
xor ecx, ecx
mov edx, dword [0x413cac]
mov eax, dword [ebp - 0x18]
call fcn.00404a84
jmp 0x41494f
inc edi
jmp 0x414704
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x414963
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x414999
lea eax, [ebp - 0x68]
mov edx, dword [0x413cac]
call fcn.00404b78
lea eax, [ebp - 0x18]
mov edx, dword [0x413cac]
mov ecx, 2
call fcn.00404570
ret