Function at 0x401174
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405762
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x13c
call dword [sym.imp.MSVCRT.dll_clock]
add eax, 0x3e8
mov dword [ebp - 0x10], eax
cmp dword [ebp + 0x20], 0xffffffff
je 0x401247
lea eax, [ebp - 0x138]
push eax
lea ecx, [ebp - 0x12c]
push ecx
mov edx, dword [ebp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
cmp dword [ebp - 0x134], 0x88
je 0x4011d9
call dword [sym.imp.MSVCRT.dll_clock]
cmp dword [ebp - 0x10], eax
jg 0x4011aa
cmp dword [ebp - 0x134], 0x110
jbe 0x4011ef
mov dword [ebp - 0x134], 0x110
push 0
lea eax, [ebp - 0x13c]
push eax
mov ecx, dword [ebp - 0x134]
push ecx
lea edx, [ebp - 0x124]
push edx
mov eax, dword [ebp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [ebp - 0x12c]
push ecx
mov edx, dword [ebp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
cmp dword [ebp - 0x13c], 0x88
je 0x401238
mov ax, 2
jmp 0x40161a
mov dword [ebp - 0x128], 0
jmp 0x401381
cmp dword [ebp + 8], 0
je 0x401378
movsx eax, byte [ebp + 0xc]
test eax, eax
je 0x401378
lea ecx, [ebp - 0x140]
call fcn.004052a6
mov dword [ebp - 4], 0
push 2
lea ecx, [ebp - 0x144]
push ecx
lea edx, [ebp - 0x140]
push edx
push 0x110
lea eax, [ebp - 0x124]
push eax
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CAsyncSocket::ReceiveFrom
mov dword [ebp - 0x128], eax
cmp dword [ebp - 0x128], 0xffffffff
jne 0x4012b7
call dword [sym.imp.MSVCRT.dll_clock]
cmp dword [ebp - 0x10], eax
jle 0x4012b7
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40126f
cmp dword [ebp - 0x128], 0xffffffff
je 0x40130c
push 0
lea ecx, [ebp - 0x144]
push ecx
lea edx, [ebp - 0x140]
push edx
push 0x110
lea eax, [ebp - 0x124]
push eax
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CAsyncSocket::ReceiveFrom
push 0x10
lea ecx, [ebp - 0x140]
call sub.MFC42.DLL_CString::GetBuffer
push eax
lea ecx, [ebp + 0xc]
push ecx
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
je 0x40130c
mov dword [ebp - 0x128], 0
cmp dword [ebp - 0x128], 0x8a
je 0x401327
call dword [sym.imp.MSVCRT.dll_clock]
cmp dword [ebp - 0x10], eax
jg 0x40126f
cmp dword [ebp - 0x128], 0x8a
je 0x40135a
mov word [ebp - 0x148], 2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x140]
call sub.MFC42.DLL_CString::CString
mov ax, word [ebp - 0x148]
jmp 0x40161a
mov dword [ebp - 0x128], 2
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x140]
call sub.MFC42.DLL_CString::CString
jmp 0x401381
mov ax, 2
jmp 0x40161a
mov edx, dword [ebp - 0x128]
mov al, byte [ebp + edx - 0x124]
sub al, 0x2a
mov ecx, dword [ebp - 0x128]
mov byte [ebp + ecx - 0x124], al
mov dword [ebp - 0x14], 1
jmp 0x4013af
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
cmp dword [ebp - 0x14], 0x88
jge 0x4013e4
mov eax, dword [ebp - 0x128]
add eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x128]
mov dl, byte [ebp + ecx - 0x124]
sub dl, byte [ebp + eax - 0x124]
mov eax, dword [ebp - 0x128]
mov byte [ebp + eax - 0x124], dl
jmp 0x4013a6
mov ecx, dword [ebp - 0x128]
xor edx, edx
mov dl, byte [ebp + ecx - 0x124]
test edx, edx
je 0x401400
mov ax, 7
jmp 0x40161a
mov eax, dword [ebp - 0x128]
xor ecx, ecx
mov cl, byte [ebp + eax - 0x123]
cmp ecx, 0xff
jne 0x4014d1
mov edx, dword [ebp - 0x128]
xor eax, eax
mov al, byte [ebp + edx - 0x122]
test eax, eax
jne 0x401437
mov ax, 3
jmp 0x40161a
mov ecx, dword [ebp - 0x128]
xor edx, edx
mov dl, byte [ebp + ecx - 0x122]
cmp edx, 1
jne 0x401454
mov ax, 4
jmp 0x40161a
mov eax, dword [ebp - 0x128]
xor ecx, ecx
mov cl, byte [ebp + eax - 0x122]
cmp ecx, 2
jne 0x401471
mov ax, 5
jmp 0x40161a
mov edx, dword [ebp - 0x128]
xor eax, eax
mov al, byte [ebp + edx - 0x122]
cmp eax, 3
jne 0x40148e
mov ax, 9
jmp 0x40161a
mov ecx, dword [ebp - 0x128]
xor edx, edx
mov dl, byte [ebp + ecx - 0x122]
cmp edx, 4
jne 0x4014ab
mov ax, 6
jmp 0x40161a
mov eax, dword [ebp - 0x128]
xor ecx, ecx
mov cl, byte [ebp + eax - 0x122]
cmp ecx, 5
jne 0x4014c8
mov ax, 0xb
jmp 0x40161a
mov ax, 8
jmp 0x40161a
mov edx, dword [ebp - 0x128]
xor eax, eax
mov al, byte [ebp + edx - 0x123]
mov ecx, dword [ebp + 0x30]
xor edx, edx
mov dl, byte [ecx + 1]
cmp eax, edx
jne 0x401616
mov eax, dword [ebp + 0x30]
xor ecx, ecx
mov cl, byte [eax + 1]
test ecx, ecx
jne 0x401523
push 0x86
mov edx, dword [ebp - 0x128]
lea eax, [ebp + edx - 0x122]
push eax
mov ecx, dword [ebp + 0x30]
add ecx, 2
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
jmp 0x401611
mov edx, dword [ebp + 0x30]
xor eax, eax
mov al, byte [edx + 1]
cmp eax, 1
je 0x401557
mov ecx, dword [ebp + 0x30]
xor edx, edx
mov dl, byte [ecx + 1]
cmp edx, 2
je 0x401557
mov eax, dword [ebp + 0x30]
xor ecx, ecx
mov cl, byte [eax + 1]
cmp ecx, 4
je 0x401557
mov edx, dword [ebp + 0x30]
xor eax, eax
mov al, byte [edx + 1]
cmp eax, 5
jne 0x40158b
push 0x86
mov ecx, dword [ebp - 0x128]
lea edx, [ebp + ecx - 0x122]
push edx
mov eax, dword [ebp + 0x30]
add eax, 2
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
je 0x401586
mov ax, 8
jmp 0x40161a
jmp 0x401611
mov ecx, dword [ebp + 0x30]
xor edx, edx
mov dl, byte [ecx + 1]
cmp edx, 3
jne 0x4015e5
push 6
mov eax, dword [ebp - 0x128]
lea ecx, [ebp + eax - 0x122]
push ecx
mov edx, dword [ebp + 0x30]
add edx, 2
push edx
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
je 0x4015c1
mov ax, 8
jmp 0x40161a
push 0x80
mov eax, dword [ebp - 0x128]
lea ecx, [ebp + eax - 0x11c]
push ecx
mov edx, dword [ebp + 0x30]
add edx, 8
push edx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
jmp 0x401611
mov eax, dword [ebp + 0x30]
xor ecx, ecx
mov cl, byte [eax + 1]
cmp ecx, 6
jne 0x401611
push 7
mov edx, dword [ebp - 0x128]
lea eax, [ebp + edx - 0x122]
push eax
mov ecx, dword [ebp + 0x30]
add ecx, 2
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
xor ax, ax
jmp 0x40161a
mov ax, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret