Function at 0x41b820
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a12e0
mov eax, dword fs:[0]
push eax
mov eax, 0x32ac
call fcn.005965e0
mov eax, dword [0x601018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor eax, eax
mov edi, ecx
mov dword [ebp - 0x326c], eax
mov dword [ebp - 0x3270], eax
mov dword [ebp - 0x3268], eax
mov dword [ebp - 0x3264], eax
mov dword [ebp - 0x3260], eax
mov dword [ebp - 0x225c], eax
mov dword [ebp - 0x1258], eax
lea eax, [edi + 0x48c8]
mov dword [ebp - 0x3274], edi
mov dword [ebp - 0x3290], eax
jmp 0x41b8a6
mov edi, dword [ebp - 0x3274]
mov ebx, dword [ebp - 0x3290]
push ebx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x3290]
mov ebx, dword [ebx + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
mov dword [edi + 0x289c], ebx
call fcn.0041e120
mov eax, dword [edi + 0x48f8]
mov dword [ebp - 0x326c], esi
mov dword [ebp - 0x3270], esi
mov dword [ebp - 0x3268], esi
mov dword [ebp - 0x3264], esi
mov dword [ebp - 0x3260], esi
mov dword [ebp - 0x225c], esi
mov dword [ebp - 0x1258], esi
mov ecx, dword [eax]
mov dword [ebp - 0x3294], esi
mov dword [ebp - 0x3288], ecx
cmp ecx, eax
je 0x41c1cd
mov edx, dword [ebp - 0x3288]
mov esi, dword [edx + 8]
lea ebx, [esi + 4]
mov ecx, ebx
mov dword [ebp - 0x3298], esi
mov dword [ebp - 0x3280], ebx
call fcn.0042d560
mov dword [ebp - 0x3284], eax
test eax, eax
js 0x41bcc7
mov eax, dword [ebp - 0x3284]
test eax, 0x40000000
jne 0x41bdec
test eax, 0x10000
je 0x41b99b
push str.begin_listen
add esi, 0x70
xor edi, edi
call fcn.0042b1f0
mov eax, dword [ebx]
add esp, 4
test eax, eax
je 0x41b97b
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
or dword [ebx + 0x18], 0x20000
mov eax, dword [ebx]
test eax, eax
je 0x41b98f
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebp - 0x3274]
mov esi, dword [ebp - 0x3298]
test dword [ebp - 0x3284], 0x20000
je 0x41bbbe
push 0x6073b0
push 0x500
call fcn.00596588
add esp, 8
mov dword [ebp - 0x3278], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x41b9dc
push eax
call fcn.0041a4e0
mov dword [ebp - 0x327c], eax
jmp 0x41b9e4
xor eax, eax
mov dword [ebp - 0x327c], eax
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x3278], eax
test eax, eax
je 0x41bbbe
mov edx, dword [ebp - 0x327c]
lea eax, [ebp - 0x110]
add edx, 4
push eax
mov ecx, ebx
call fcn.0042d6e0
add dword [esi + 0x4d8], 1
adc dword [esi + 0x4dc], 0
mov eax, dword [ebx]
test eax, eax
je 0x41ba2b
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
or dword [ebx + 0x18], 0x20000
mov ebx, dword [ebx]
test ebx, ebx
je 0x41ba3f
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [edi + 0x48f8]
mov edx, dword [ebx + 4]
lea ecx, [ebp - 0x3278]
push ecx
push edx
push ebx
call fcn.0041e7b0
mov ecx, dword [edi + 0x48fc]
mov edx, 0x3ffffffe
sub edx, ecx
cmp edx, 1
jb 0x41c405
inc ecx
mov dword [edi + 0x48fc], ecx
mov dword [ebx + 4], eax
mov ecx, dword [eax + 4]
mov dword [ecx], eax
inc dword [edi + 0x48b8]
mov edi, dword [ebp - 0x327c]
lea eax, [ebp - 0x110]
push eax
add edi, 0x70
push 0x5ca334
call fcn.0042b010
mov ecx, dword [ebp - 0x3274]
mov eax, dword [ecx + 0x850]
mov dword [edi + 4], eax
mov ebx, dword [ecx + 0x430]
mov eax, dword [ebx + 0x105c]
add esp, 8
test eax, eax
je 0x41bac4
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
inc dword [ebx + 0x1060]
jns 0x41bad6
mov dword [ebx + 0x1060], 0
mov ecx, dword [ebx + 0x1060]
mov ebx, dword [ebx + 0x105c]
mov dword [ebp - 0x3278], ecx
test ebx, ebx
je 0x41baf3
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [edi]
mov eax, dword [ebp - 0x3278]
mov edx, dword [edx + 8]
push eax
mov ecx, edi
call edx
mov ebx, dword [ebp - 0x3274]
push str.open_connection
add ebx, 0x434
mov ecx, 1
mov edx, edi
call fcn.0042b270
mov ebx, dword [ebp - 0x327c]
mov eax, dword [ebx + 4]
add esp, 4
test eax, eax
je 0x41bb37
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebx + 8], edi
mov eax, dword [ebx + 4]
test eax, eax
je 0x41bb48
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x3274]
cmp dword [eax + 0x2890], 0
je 0x41bb5e
mov dword [ebx + 0x28], 1
mov eax, dword [ebp - 0x327c]
mov edi, dword [eax + 0x4ec]
mov ecx, dword [eax + 0x4e8]
sub edi, dword [eax + 0x4f0]
mov eax, dword [ebx + 4]
mov dword [ebp - 0x3278], ecx
test eax, eax
je 0x41bb8a
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [ebp - 0x3278]
or dword [ebx + 0x1c], 0x80000
mov dword [ebx + 0x50], edx
mov dword [ebx + 0x54], edi
mov dword [ebx + 0x58], 0
mov ebx, dword [ebx + 4]
test ebx, ebx
je 0x41bbb2
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebp - 0x3274]
mov ebx, dword [ebp - 0x3280]
test dword [ebp - 0x3284], 0x80000
je 0x41bc4e
mov eax, dword [ebx]
test eax, eax
je 0x41bbdb
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebx]
mov eax, dword [ebx + 0x54]
mov dword [ebp - 0x3278], eax
test ecx, ecx
je 0x41bbf7
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x3278]
test eax, eax
jne 0x41bd0a
push str.remote_host_closing_connection
lea ebx, [edi + 0x434]
lea edx, [esi + 0x70]
lea ecx, [eax + 1]
call fcn.0042b270
mov eax, dword [esi + 0x4b0]
add esp, 4
test eax, eax
je 0x41bc29
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, esi
call fcn.0041c6e0
mov byte [esi + 0x4d0], 1
mov eax, dword [esi + 0x4b0]
test eax, eax
je 0x41bc48
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [ebp - 0x3280]
test dword [ebp - 0x3284], 0x200000
mov eax, dword [esi + 0x4b0]
jne 0x41be0c
test eax, eax
je 0x41bc6f
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x4b0]
mov cl, byte [esi + 0x4d2]
mov byte [ebp - 0x3289], cl
test eax, eax
je 0x41bc8c
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [ebp - 0x3289], 0
jne 0x41bf09
mov eax, dword [ebp - 0x3284]
test eax, 0xff00
jne 0x41be2a
test eax, eax
je 0x41bec2
mov ecx, ebx
call fcn.0042d560
mov dword [ebp - 0x3284], eax
test eax, eax
jns 0x41b944
mov eax, dword [esi + 0x4b0]
test eax, eax
je 0x41bcd8
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, esi
call fcn.0041c6e0
mov al, 1
mov byte [esi + 0x4d2], al
mov word [esi + 0x4d0], 0x101
mov eax, dword [esi + 0x4b0]
test eax, eax
je 0x41bf09
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x41bf09
add dword [esi + 0x4f0], eax
cdq
add dword [esi + 0x4e0], eax
mov dword [ebp - 0x327c], 1
adc dword [esi + 0x4e4], edx
xor eax, eax
cmp dword [ebp - 0x327c], 0
jle 0x41bd48
lea eax, [ebp - 0x327c]
push eax
mov edx, esi
mov ecx, edi
call fcn.0041c870
test eax, eax
je 0x41bd29
jmp 0x41bd4c
test eax, eax
je 0x41bd85
mov eax, dword [esi + 0x4b0]
test eax, eax
je 0x41bd5d
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, esi
call fcn.0041c6e0
mov byte [esi + 0x4d0], 1
mov eax, dword [esi + 0x4b0]
test eax, eax
je 0x41bc4e
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x41bc4e
mov eax, dword [esi + 0x4ec]
mov ecx, dword [esi + 0x4e8]
sub eax, dword [esi + 0x4f0]
add ecx, dword [esi + 0x4f0]
mov edx, dword [ebx]
mov dword [ebp - 0x327c], eax
mov dword [ebp - 0x3278], ecx
test edx, edx
je 0x41bdc2
push edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x3278]
mov eax, dword [ebp - 0x327c]
or dword [ebx + 0x18], 0x80000
mov dword [ebx + 0x4c], ecx
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x54], 0
mov eax, dword [ebx]
test eax, eax
je 0x41bc4e
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x41bc4e
push str.remote_host_closing_connection
lea ebx, [edi + 0x434]
lea edx, [esi + 0x70]
mov ecx, 1
call fcn.0042b270
add esp, 4
jmp 0x41bcc7
test eax, eax
je 0x41be17
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, esi
call fcn.0041c6e0
mov byte [esi + 0x4d2], 1
jmp 0x41bce7
cmp dword [ebx + 0xc], 0
jne 0x41be42
cmp dword [ebx + 0x10], 0
jne 0x41be42
mov dword [ebp - 0x3280], 0xffffffff
jmp 0x41be4b
mov edx, dword [ebx + 0x14]
mov dword [ebp - 0x3280], edx
mov eax, dword [esi + 0x4b0]
test eax, eax
je 0x41be5c
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x4b0]
mov bl, byte [esi + 0x4d2]
test eax, eax
je 0x41be73
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test bl, bl
jne 0x41bf09
cmp dword [ebp - 0x3280], 0xffffffff
je 0x41bf09
mov ecx, dword [ebp - 0x3284]
mov ebx, dword [ebp - 0x3284]
mov edx, dword [ebp - 0x3280]
mov edi, ecx
lea eax, [ebp - 0x3270]
and ebx, 0x400
and edi, 0x200
and ecx, 0x900
push eax
call fcn.00433e60
mov edi, dword [ebp - 0x3274]
jmp 0x41bf09
cmp dword [ebx + 0xc], 0
jne 0x41bece
cmp dword [ebx + 0x10], 0
je 0x41bf09
mov ebx, dword [ebx + 0x14]
cmp ebx, 0xffffffff
je 0x41bf09
cmp dword [ebp - 0x3264], ebx
jae 0x41bee4
mov dword [ebp - 0x3264], ebx
mov eax, dword [ebp - 0x3260]
mov ecx, 1
add dword [ebp - 0x3268], ecx
cmp eax, 0x400
jae 0x41bf09
mov dword [ebp + eax*4 - 0x325c], ebx
add dword [ebp - 0x3260], ecx
push esi
push edi
call fcn.0041c530
cmp eax, 1
jne 0x41c192
cmp dword [esi + 0x4d4], 0
mov ebx, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
je 0x41c05f
lea ecx, [ebp - 0x32b8]
push ecx
call ebx
test eax, eax
jne 0x41bf45
mov dword [ebp - 0x32b8], eax
mov dword [ebp - 0x32b4], eax
lea edx, [ebp - 0x32a0]
push edx
call ebx
test eax, eax
jne 0x41bf62
xor ecx, ecx
mov dword [ebp - 0x32a0], ecx
mov dword [ebp - 0x329c], eax
jmp 0x41bf6e
mov eax, dword [ebp - 0x329c]
mov ecx, dword [ebp - 0x32a0]
sub ecx, dword [esi + 0x498]
push 0
sbb eax, dword [esi + 0x49c]
push 0x3e8
push eax
push ecx
call fcn.00596e30
mov ecx, dword [0x61023c]
push ecx
mov ecx, dword [0x610238]
push ecx
push edx
push eax
call fcn.00596bf0
push edx
mov edx, dword [esi + 0x4dc]
push eax
mov eax, dword [esi + 0x4d8]
push edx
push eax
lea ebx, [edi + 0x434]
push str.end_listen__accepted___I64d___duration___I64d__ms
lea edx, [esi + 0x70]
mov ecx, 1
call fcn.0042b270
add esp, 0x14
dec dword [edi + 0x48bc]
jne 0x41c11d
mov ebx, dword [ebp - 0x3290]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x3290]
mov ebx, dword [ebx + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebx, ebx
jne 0x41c11d
push str.no_more_listening_sockets__shutting_down
lea edx, [edi + 8]
push 0x11754
push edx
lea ecx, [edi + 0x434]
call fcn.0042c130
mov ebx, dword [0x60d72c]
add esp, 0xc
test ebx, ebx
je 0x41c11d
lea eax, [ebx + 0x8c8]
push eax
mov dword [ebp - 0x3278], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 0x8e0]
push eax
mov dword [ebx + 0x8e8], 1
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [ebp - 0x3278]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x41c11d
lea edx, [ebp - 0x32b0]
push edx
call ebx
test eax, eax
jne 0x41c078
mov dword [ebp - 0x32b0], eax
mov dword [ebp - 0x32ac], eax
lea eax, [ebp - 0x32a8]
push eax
call ebx
test eax, eax
jne 0x41c095
xor ecx, ecx
mov dword [ebp - 0x32a8], ecx
mov dword [ebp - 0x32a4], eax
jmp 0x41c0a1
mov eax, dword [ebp - 0x32a4]
mov ecx, dword [ebp - 0x32a8]
sub ecx, dword [esi + 0x498]
push 0
sbb eax, dword [esi + 0x49c]
push 0x3e8
push eax
push ecx
call fcn.00596e30
mov ecx, dword [0x61023c]
push ecx
mov ecx, dword [0x610238]
push ecx
push edx
push eax
call fcn.00596bf0
mov ecx, dword [esi + 0x4e4]
push edx
mov edx, dword [esi + 0x4ac]
push eax
mov eax, dword [esi + 0x4a8]
push edx
mov edx, dword [esi + 0x4e0]
push eax
mov eax, dword [esi + 0x4cc]
push ecx
mov ecx, dword [esi + 0x4c8]
push edx
push eax
push ecx
lea ebx, [edi + 0x434]
push str.close_connection__requests___I64d___read___I64d___written___I64d___duration___I64d__ms
lea edx, [esi + 0x70]
mov ecx, 1
call fcn.0042b270
add esp, 0x24
dec dword [edi + 0x48b8]
mov edx, dword [edi + 0x4908]
mov eax, dword [edi + 0x48b8]
mov ecx, dword [edi + 0x48bc]
push edx
push eax
push ecx
push str.listening___d___open___d___resetlevel___d_
lea edx, [edi + 8]
mov ecx, 1
lea ebx, [edi + 0x434]
call fcn.0042b270
mov eax, dword [ebp - 0x3288]
mov ebx, dword [eax]
add esp, 0x10
cmp eax, dword [edi + 0x48f8]
je 0x41c17a
mov ecx, dword [eax + 4]
mov dword [ecx], ebx
mov edx, dword [eax]
mov ecx, dword [eax + 4]
push eax
mov dword [edx + 4], ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
dec dword [edi + 0x48fc]
push esi
mov dword [ebp - 0x3288], ebx
call fcn.0041c430
push esi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x41c1bb
cmp eax, 0xffffffff
jne 0x41c1ad
mov edx, dword [ebp - 0x3288]
mov eax, dword [edx]
inc dword [ebp - 0x3294]
mov dword [ebp - 0x3288], eax
jmp 0x41c1bb
mov ecx, dword [ebp - 0x3288]
mov edx, dword [ecx]
mov dword [ebp - 0x3288], edx
mov eax, dword [ebp - 0x3288]
cmp eax, dword [edi + 0x48f8]
jne 0x41b917
xor ebx, ebx
cmp dword [edi + 0x48fc], ebx
je 0x41c410
cmp dword [ebp - 0x3294], ebx
jg 0x41c1f3
cmp dword [edi + 0x289c], ebx
jne 0x41c1f3
mov ecx, dword [edi + 0x287c]
jmp 0x41c1f9
mov ecx, dword [edi + 0x2878]
lea esi, [ebp - 0x3270]
call fcn.00433ee0
mov eax, dword [ebp - 0x326c]
xor ecx, ecx
cmp eax, ebx
je 0x41c34a
cmp eax, 0x7530
jne 0x41c24a
mov dword [ebp - 0x326c], ebx
mov dword [ebp - 0x3270], ebx
mov dword [ebp - 0x3268], ebx
mov dword [ebp - 0x3264], ebx
mov dword [ebp - 0x3260], ebx
mov dword [ebp - 0x225c], ebx
mov dword [ebp - 0x1258], ebx
jmp 0x41c34a
xor ebx, ebx
lea ecx, [ebp - 0x248]
mov edi, 1
push 0x11756
push str.ERROR__d:
lea esi, [ebp - 0x250]
mov dword [ebp - 0x250], ecx
mov dword [ebp - 0x24c], 0x100
mov dword [ebp - 0x140], edi
mov dword [ebp - 0x148], ebx
mov dword [ebp - 0x144], ebx
mov byte [ebp - 0x134], bl
mov dword [ebp - 0x13c], edi
mov dword [ebp - 0x138], 0x11756
call fcn.00506600
add esp, 8
push str.Server_failed_to_determine_socket_status
mov eax, esi
mov byte [ebp - 0x134], bl
call fcn.00506660
mov dword [ebp - 4], edi
mov edi, dword [ebp - 0x326c]
mov ecx, esi
call fcn.005067d0
mov ecx, dword [ebp - 0x3274]
mov dword [eax + 0x110], ebx
push ebx
lea edx, [ecx + 0x434]
lea ebx, [ecx + 8]
mov ecx, eax
call fcn.0042c010
xor esi, esi
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x140], esi
je 0x41c31d
mov edx, dword [ebp - 0x250]
mov eax, dword [ebp - 0x148]
push edx
push eax
push 0x5cb5f8
mov ecx, 0x610240
call fcn.00504670
add esp, 0xc
mov dword [ebp - 0x140], esi
mov eax, dword [ebp - 0x250]
lea ecx, [ebp - 0x248]
cmp eax, ecx
je 0x41c33d
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov dword [ebp - 0x250], esi
mov edi, dword [ebp - 0x3274]
mov ecx, 1
xor ebx, ebx
mov eax, dword [edi + 0x2880]
cmp eax, ebx
jle 0x41c35c
cmp dword [edi + 0x48b8], eax
jg 0x41c364
cmp ecx, ebx
je 0x41b8a6
mov edx, dword [edi + 0x48b8]
push eax
mov eax, dword [edi + 0x48bc]
push edx
push eax
lea esi, [edi + 8]
push str.listening___d___open___d___resetlevel___d_
mov edi, 1
call fcn.0042b1f0
mov edi, dword [ebp - 0x3274]
push str.resetting_connection_table
lea ebx, [edi + 0x434]
xor ecx, ecx
mov edx, esi
call fcn.0042b270
mov eax, dword [edi + 0x48f8]
mov edi, dword [eax]
add esp, 0x14
cmp edi, eax
je 0x41b8a0
mov esi, dword [edi + 8]
cmp dword [esi + 0x4d4], 0
mov edi, dword [edi]
jne 0x41c3f0
mov eax, dword [esi + 0x4b0]
test eax, eax
je 0x41c3d1
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, esi
call fcn.0041c6e0
mov byte [esi + 0x4d0], 1
mov esi, dword [esi + 0x4b0]
test esi, esi
je 0x41c3f0
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x3274]
cmp edi, dword [ecx + 0x48f8]
jne 0x41c3b2
mov edi, ecx
jmp 0x41b8a6
push str.list_T__too_long
call dword [sym.imp.MSVCP100.dll_void___cdecl_std::_Xlength_error_char_const__]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00596083
mov esp, ebp
pop ebp
ret