Function at 0x401ad0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40577c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x648
mov byte [ebp - 0x628], 0xa5
mov byte [ebp - 0x627], 0x5a
mov byte [ebp - 0x626], 0x5a
mov byte [ebp - 0x625], 0
mov byte [ebp - 0x624], 0
mov byte [ebp - 0x623], 0
mov byte [ebp - 0x622], 0
mov byte [ebp - 0x621], 0
mov byte [ebp - 0x620], 0
mov byte [ebp - 0x61f], 0
mov byte [ebp - 0x61e], 0xb9
mov byte [ebp - 0x61d], 0x9b
mov byte [ebp - 0x1c], 0xa5
mov byte [ebp - 0x1b], 0x5a
mov byte [ebp - 0x1a], 0xff
mov byte [ebp - 0x19], 0xff
mov byte [ebp - 0x18], 0
mov byte [ebp - 0x17], 0
mov byte [ebp - 0x16], 0
mov byte [ebp - 0x15], 0
mov byte [ebp - 0x14], 0
mov byte [ebp - 0x13], 0
mov byte [ebp - 0x12], 0xb9
mov byte [ebp - 0x11], 0x9b
call dword [sym.imp.MSVCRT.dll_clock]
add eax, 0x3e8
mov dword [ebp - 0x10], eax
cmp dword [ebp + 0x20], 0xffffffff
je 0x401cfd
mov dword [ebp - 0x644], 6
mov eax, dword [ebp + 0x2e]
and eax, 0xffff
test eax, eax
je 0x401bb3
mov cx, word [ebp + 0x2e]
mov word [ebp - 0x628], cx
mov dx, word [ebp + 0x2e]
mov word [ebp - 0x1c], dx
mov eax, dword [ebp - 0x644]
mov ecx, dword [ebp - 0x644]
sub ecx, 1
mov dword [ebp - 0x644], ecx
test eax, eax
je 0x401c5d
push 0
lea edx, [ebp - 0x640]
push edx
push 0xc
lea eax, [ebp - 0x628]
push eax
mov ecx, dword [ebp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [ebp - 0x638]
push edx
lea eax, [ebp - 0x62c]
push eax
mov ecx, dword [ebp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
cmp dword [ebp - 0x634], 0x88
je 0x401c1b
call dword [sym.imp.MSVCRT.dll_clock]
cmp dword [ebp - 0x10], eax
jg 0x401bec
push 0
lea edx, [ebp - 0x63c]
push edx
mov eax, dword [ebp - 0x634]
push eax
lea ecx, [ebp - 0x61c]
push ecx
mov edx, dword [ebp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x634], 0x88
jne 0x401c4a
jmp 0x401c5d
call dword [sym.imp.MSVCRT.dll_clock]
add eax, 0x3e8
mov dword [ebp - 0x10], eax
jmp 0x401bb3
cmp dword [ebp - 0x634], 0x88
je 0x401c72
mov ax, 0xa
jmp 0x401e48
push 0
lea eax, [ebp - 0x640]
push eax
push 0xc
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x638]
push eax
lea ecx, [ebp - 0x62c]
push ecx
mov edx, dword [ebp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_ClearCommError]
cmp dword [ebp - 0x634], 0x88
je 0x401cba
call dword [sym.imp.MSVCRT.dll_clock]
cmp dword [ebp - 0x10], eax
jg 0x401c8b
cmp dword [ebp - 0x634], 0
je 0x401ce4
push 0
lea eax, [ebp - 0x63c]
push eax
mov ecx, dword [ebp - 0x634]
push ecx
lea edx, [ebp - 0x61c]
push edx
mov eax, dword [ebp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x634], 0x88
jae 0x401cf8
xor ax, ax
jmp 0x401e48
jmp 0x401e44
cmp dword [ebp + 8], 0
je 0x401e44
movsx ecx, byte [ebp + 0xc]
test ecx, ecx
je 0x401e44
lea ecx, [ebp - 0x648]
call fcn.004052a6
mov dword [ebp - 4], 0
push 0
lea edx, [ebp + 0xc]
push edx
push 0xc350
push 0xc
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CAsyncSocket::SendTo
push 2
lea ecx, [ebp - 0x64c]
push ecx
lea edx, [ebp - 0x648]
push edx
push 0x600
lea eax, [ebp - 0x61c]
push eax
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CAsyncSocket::ReceiveFrom
mov dword [ebp - 0x650], eax
cmp dword [ebp - 0x650], 0xffffffff
jne 0x401d86
call dword [sym.imp.MSVCRT.dll_clock]
cmp dword [ebp - 0x10], eax
jle 0x401d86
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401d3e
cmp dword [ebp - 0x650], 0xffffffff
je 0x401de7
push 0
lea ecx, [ebp - 0x64c]
push ecx
lea edx, [ebp - 0x648]
push edx
push 0x600
lea eax, [ebp - 0x61c]
push eax
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CAsyncSocket::ReceiveFrom
push 0x10
lea ecx, [ebp - 0x648]
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
jne 0x401ddd
cmp dword [ebp - 0x64c], 0xc350
je 0x401de7
mov dword [ebp - 0x650], 0
cmp dword [ebp - 0x650], 0x8a
je 0x401e02
call dword [sym.imp.MSVCRT.dll_clock]
cmp dword [ebp - 0x10], eax
jg 0x401d3e
cmp dword [ebp - 0x650], 0x8a
je 0x401e32
mov word [ebp - 0x654], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x648]
call sub.MFC42.DLL_CString::CString
mov ax, word [ebp - 0x654]
jmp 0x401e48
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x648]
call sub.MFC42.DLL_CString::CString
mov ax, 0xa
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret