Function at 0x403870
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4fbad9
mov eax, dword fs:[0]
push eax
sub esp, 0x68
push ebx
push esi
push edi
mov eax, dword [0x52a51c]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x14], ebx
mov eax, dword [ebp + 8]
test eax, eax
jne 0x4038d6
lea eax, [esp + 0x38]
mov dword [esp + 0x38], str.num_service_is_0
push eax
lea ecx, [esp + 0x4c]
call fcn.004c8ad6
push 0x528620
lea eax, [esp + 0x4c]
mov dword [esp + 0x4c], vtable.std::runtime_error.0
push eax
call fcn.004cdbcb
mov dword [esp + 0x38], 0
test eax, eax
jle 0x403e47
push 0xc
call fcn.004c96bf
mov esi, eax
mov dword [esp + 0x30], eax
add esp, 4
mov dword [esp + 0x3c], esi
mov dword [esp + 0x80], 0
test esi, esi
je 0x403957
push 1
mov ecx, esi
call fcn.00404650
push 0x20
mov byte [esp + 0x84], 1
call fcn.004c96bf
add esp, 4
mov dword [esp + 0x34], eax
mov byte [esp + 0x80], 2
test eax, eax
je 0x40394a
push 0xffffffffffffffff
push ecx
push esi
mov ecx, eax
call fcn.00405410
mov dword [esi + 4], eax
mov eax, dword [eax + 0x1c]
mov dword [esi + 8], eax
jmp 0x40395d
xor eax, eax
mov dword [esi + 4], eax
mov eax, dword [eax + 0x1c]
mov dword [esi + 8], eax
jmp 0x40395d
xor esi, esi
mov dword [esp + 0x2c], esi
mov edi, esi
mov dword [esp + 0x1c], edi
push 4
mov dword [esp + 0x84], 3
call fcn.004c96bf
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
je 0x403995
mov ecx, dword [esi + 8]
mov dword [eax], ecx
add ecx, 0x18
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x28]
jmp 0x40399b
xor eax, eax
mov dword [esp + 0x28], eax
mov esi, eax
mov dword [esp + 0x18], esi
mov byte [esp + 0x80], 4
mov dword [esp + 0x34], 0
lea ecx, [esp + 0x54]
call fcn.004c796f
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x54], vtable.._AV___LaunchPad_V___Bind__0A_XV___Bind__00XU___Pmf_wrap_P8IoServicePool__AEXPAVio_service_asio___ZXV1_PAV23__std__QAVIoServicePool__PAVio_service_asio___std_____V_std___std__.0
mov dword [esp + 0x64], 0x404480
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], ebx
lea eax, [esp + 0x40]
mov byte [esp + 0x80], 5
push eax
lea ecx, [esp + 0x58]
call fcn.004c7a67
lea ecx, [esp + 0x54]
call fcn.004c79e0
mov byte [esp + 0x80], 6
lea eax, [esp + 0x40]
mov ecx, dword [ebx + 4]
cmp eax, ecx
jae 0x403ab6
mov eax, dword [ebx]
lea edx, [esp + 0x40]
cmp eax, edx
ja 0x403ab6
mov ebx, edx
mov edx, dword [esp + 0x14]
sub ebx, eax
sar ebx, 3
mov edx, dword [edx + 8]
cmp ecx, edx
jne 0x403a8b
mov eax, edx
sub eax, ecx
sar eax, 3
cmp eax, 1
jae 0x403a8b
mov eax, dword [esp + 0x14]
sub ecx, dword [eax]
mov eax, 0x1fffffff
sar ecx, 3
sub eax, ecx
cmp eax, 1
jb 0x403f25
inc ecx
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x14]
sub edx, dword [ecx]
sar edx, 3
mov eax, edx
shr eax, 1
mov dword [esp + 0x30], eax
mov eax, 0x1fffffff
sub eax, dword [esp + 0x30]
cmp eax, edx
jae 0x403a78
xor edx, edx
jmp 0x403a7c
add edx, dword [esp + 0x30]
cmp edx, dword [esp + 0x3c]
cmovb edx, dword [esp + 0x3c]
push edx
call fcn.004050a0
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
lea ecx, [eax + ebx*8]
mov ebx, dword [esp + 0x14]
mov edx, dword [ebx + 4]
test edx, edx
je 0x403b2a
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov dword [ecx + 4], 0
jmp 0x403b2a
mov edx, dword [ebx + 8]
cmp ecx, edx
jne 0x403b0e
mov eax, edx
sub eax, ecx
sar eax, 3
cmp eax, 1
jae 0x403b0e
sub ecx, dword [ebx]
mov eax, 0x1fffffff
sar ecx, 3
sub eax, ecx
cmp eax, 1
jb 0x403f25
sub edx, dword [ebx]
inc ecx
sar edx, 3
mov eax, 0x1fffffff
mov dword [esp + 0x3c], ecx
mov ecx, edx
shr ecx, 1
sub eax, ecx
cmp eax, edx
jae 0x403afb
xor edx, edx
jmp 0x403afd
add edx, ecx
cmp edx, dword [esp + 0x3c]
mov ecx, ebx
cmovb edx, dword [esp + 0x3c]
push edx
call fcn.004050a0
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x403b2a
mov eax, dword [esp + 0x40]
mov dword [ecx], eax
mov eax, dword [esp + 0x44]
mov dword [ecx + 4], eax
mov dword [esp + 0x44], 0
add dword [ebx + 4], 8
mov byte [esp + 0x80], 4
cmp dword [esp + 0x44], 0
jne 0x403f2f
mov eax, dword [esp + 0x34]
inc eax
mov dword [esp + 0x34], eax
cmp eax, 2
jl 0x4039b1
mov edx, dword [ebx + 0x1c]
lea ecx, [ebx + 0x18]
lea eax, [esp + 0x18]
cmp eax, edx
jae 0x403c09
cmp dword [ecx], eax
ja 0x403c09
sub eax, dword [ecx]
sar eax, 2
mov dword [esp + 0x28], eax
mov eax, dword [ecx + 8]
mov dword [esp + 0x3c], eax
cmp edx, eax
jne 0x403bdd
sub eax, edx
sar eax, 2
cmp eax, 1
jae 0x403bdd
sub edx, dword [ecx]
mov eax, 0x3fffffff
sar edx, 2
sub eax, edx
cmp eax, 1
jb 0x403f25
inc edx
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x3c]
sub edx, dword [ecx]
sar edx, 2
mov eax, edx
shr eax, 1
mov dword [esp + 0x34], eax
mov eax, 0x3fffffff
sub eax, dword [esp + 0x34]
cmp eax, edx
jae 0x403bc7
xor edx, edx
jmp 0x403bcb
add edx, dword [esp + 0x34]
cmp edx, dword [esp + 0x30]
cmovb edx, dword [esp + 0x30]
push edx
call fcn.004051d0
lea ecx, [ebx + 0x18]
mov eax, dword [ecx]
mov edx, dword [esp + 0x28]
lea edx, [eax + edx*4]
mov eax, dword [ecx + 4]
mov dword [esp + 0x3c], eax
test eax, eax
je 0x403c83
mov eax, dword [edx]
mov dword [edx], 0
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x18]
mov dword [edx], eax
jmp 0x403c83
mov eax, dword [ecx + 8]
mov dword [esp + 0x3c], eax
cmp edx, eax
jne 0x403c70
sub eax, edx
sar eax, 2
cmp eax, 1
jae 0x403c70
sub edx, dword [ecx]
mov eax, 0x3fffffff
sar edx, 2
sub eax, edx
cmp eax, 1
jb 0x403f25
inc edx
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x3c]
sub edx, dword [ecx]
sar edx, 2
mov eax, edx
shr eax, 1
mov dword [esp + 0x34], eax
mov eax, 0x3fffffff
sub eax, dword [esp + 0x34]
cmp eax, edx
jae 0x403c5a
xor edx, edx
jmp 0x403c5e
add edx, dword [esp + 0x34]
cmp edx, dword [esp + 0x30]
cmovb edx, dword [esp + 0x30]
push edx
call fcn.004051d0
lea ecx, [ebx + 0x18]
mov eax, dword [ecx + 4]
test eax, eax
je 0x403c83
mov edx, dword [esp + 0x28]
xor esi, esi
mov dword [esp + 0x18], esi
mov dword [eax], edx
add dword [ecx + 4], 4
lea edx, [ebx + 0xc]
mov ecx, dword [edx + 4]
lea eax, [esp + 0x1c]
cmp eax, ecx
jae 0x403d3f
cmp dword [edx], eax
ja 0x403d3f
sub eax, dword [edx]
sar eax, 2
mov dword [esp + 0x2c], eax
mov eax, dword [edx + 8]
mov dword [esp + 0x3c], eax
cmp ecx, eax
jne 0x403d13
sub eax, ecx
sar eax, 2
cmp eax, 1
jae 0x403d13
sub ecx, dword [edx]
mov eax, 0x3fffffff
sar ecx, 2
sub eax, ecx
cmp eax, 1
jb 0x403f25
inc ecx
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x3c]
sub ecx, dword [edx]
sar ecx, 2
mov eax, ecx
shr eax, 1
mov dword [esp + 0x34], eax
mov eax, 0x3fffffff
sub eax, dword [esp + 0x34]
cmp eax, ecx
jae 0x403cfb
xor ecx, ecx
jmp 0x403cff
add ecx, dword [esp + 0x34]
cmp ecx, dword [esp + 0x30]
cmovb ecx, dword [esp + 0x30]
push ecx
mov ecx, edx
call fcn.00405140
lea edx, [ebx + 0xc]
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
lea ecx, [eax + ecx*4]
mov eax, dword [edx + 4]
mov dword [esp + 0x3c], eax
test eax, eax
je 0x403dbb
mov eax, dword [ecx]
mov dword [ecx], 0
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x1c]
mov dword [ecx], eax
jmp 0x403dbb
mov eax, dword [edx + 8]
mov dword [esp + 0x3c], eax
cmp ecx, eax
jne 0x403da8
sub eax, ecx
sar eax, 2
cmp eax, 1
jae 0x403da8
sub ecx, dword [edx]
mov eax, 0x3fffffff
sar ecx, 2
sub eax, ecx
cmp eax, 1
jb 0x403f25
inc ecx
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x3c]
sub ecx, dword [edx]
sar ecx, 2
mov eax, ecx
shr eax, 1
mov dword [esp + 0x34], eax
mov eax, 0x3fffffff
sub eax, dword [esp + 0x34]
cmp eax, ecx
jae 0x403d90
xor ecx, ecx
jmp 0x403d94
add ecx, dword [esp + 0x34]
cmp ecx, dword [esp + 0x30]
cmovb ecx, dword [esp + 0x30]
push ecx
mov ecx, edx
call fcn.00405140
lea edx, [ebx + 0xc]
mov eax, dword [edx + 4]
test eax, eax
je 0x403dbb
mov ecx, dword [esp + 0x2c]
xor edi, edi
mov dword [esp + 0x1c], edi
mov dword [eax], ecx
add dword [edx + 4], 4
mov byte [esp + 0x80], 3
test esi, esi
je 0x403df1
mov eax, dword [esi]
mov dword [esp + 0x3c], eax
add eax, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x403de8
mov ecx, dword [esp + 0x3c]
call fcn.00403190
push esi
call fcn.0044bc50
add esp, 4
mov dword [esp + 0x80], 0xffffffff
test edi, edi
je 0x403e35
mov esi, dword [edi + 4]
test esi, esi
je 0x403e17
mov ecx, esi
call fcn.00402b60
push esi
call fcn.0044bc50
add esp, 4
push 0x53af90
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x403e2c
call dword [sym.imp.WS2_32.dll_WSACleanup]
push edi
call fcn.0044bc50
add esp, 4
mov edi, dword [esp + 0x38]
inc edi
mov dword [esp + 0x38], edi
cmp edi, dword [ebp + 8]
jl 0x4038e6
mov dword [esp + 0x30], 0
nop
push 0xc
call fcn.004c96bf
mov edi, eax
add esp, 4
mov dword [esp + 0x28], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x80], 7
test edi, edi
je 0x403f69
push 1
mov ecx, edi
call fcn.00404650
push 0x20
mov byte [esp + 0x84], 8
call fcn.004c96bf
mov esi, eax
add esp, 4
mov dword [esp + 0x38], esi
mov byte [esp + 0x80], 9
test esi, esi
je 0x403f5c
mov ecx, esi
call fcn.00402aa0
mov ecx, dword [0x53af88]
mov edi, eax
test cl, 1
jne 0x403edc
or ecx, 1
mov dword [0x53af9c], 0x50b1f8
push 0x501e00
mov dword [0x53af88], ecx
call fcn.004c95ad
add esp, 4
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], 0x53af9c
test edi, edi
jne 0x404452
mov edi, dword [esp + 0x28]
mov byte [esp + 0x80], 0xa
push 0x58
mov dword [esi + 0x18], edi
call fcn.004c96bf
add esp, 4
mov dword [esp + 0x34], eax
mov byte [esp + 0x80], 0xb
test eax, eax
je 0x403f34
push 0xffffffffffffffff
push edi
mov ecx, eax
call fcn.00402ca0
jmp 0x403f36
push str.vector_T__too_long
call fcn.004c790d
call fcn.004c961c
xor eax, eax
mov dword [esi + 0x1c], eax
mov dword [eax + 4], 0x52d9c0
mov dword [eax + 8], 0
mov eax, dword [esi + 0x1c]
mov dword [eax + 0x10], 0
mov dword [edi + 4], esi
mov eax, dword [esi + 0x1c]
mov dword [edi + 8], eax
jmp 0x403f6f
xor esi, esi
mov dword [edi + 4], esi
mov eax, dword [esi + 0x1c]
mov dword [edi + 8], eax
jmp 0x403f6f
xor edi, edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], edi
push 4
mov dword [esp + 0x84], 0xc
call fcn.004c96bf
mov esi, eax
mov dword [esp + 0x38], eax
add esp, 4
test esi, esi
je 0x403fa7
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx + 8]
mov dword [esi], ecx
add ecx, 0x18
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x403fad
xor esi, esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x20], esi
mov byte [esp + 0x80], 0xd
mov dword [esp + 0x38], 0
lea ecx, [esp + 0x54]
call fcn.004c796f
mov eax, dword [esp + 0x28]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x54], vtable.._AV___LaunchPad_V___Bind__0A_XV___Bind__00XU___Pmf_wrap_P8IoServicePool__AEXPAVio_service_asio___ZXV1_PAV23__std__QAVIoServicePool__PAVio_service_asio___std_____V_std___std__.0
mov dword [esp + 0x64], 0x404480
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x40]
mov byte [esp + 0x80], 0xe
push eax
lea ecx, [esp + 0x58]
call fcn.004c7a67
lea ecx, [esp + 0x54]
call fcn.004c79e0
mov byte [esp + 0x80], 0xf
lea eax, [esp + 0x40]
mov ecx, dword [ebx + 0x2c]
cmp eax, ecx
jae 0x4040bb
mov eax, dword [ebx + 0x28]
lea edx, [esp + 0x40]
cmp eax, edx
ja 0x4040bb
sub edx, eax
sar edx, 3
mov dword [esp + 0x2c], edx
mov edx, dword [ebx + 0x30]
cmp ecx, edx
jne 0x404093
mov eax, edx
sub eax, ecx
sar eax, 3
cmp eax, 1
jae 0x404093
sub ecx, dword [ebx + 0x28]
mov eax, 0x1fffffff
sar ecx, 3
sub eax, ecx
cmp eax, 1
jb 0x403f25
sub edx, dword [ebx + 0x28]
inc ecx
sar edx, 3
mov eax, 0x1fffffff
mov dword [esp + 0x3c], ecx
mov ecx, edx
shr ecx, 1
sub eax, ecx
cmp eax, edx
jae 0x40407f
xor edx, edx
jmp 0x404081
add edx, ecx
cmp edx, dword [esp + 0x3c]
lea ecx, [ebx + 0x28]
cmovb edx, dword [esp + 0x3c]
push edx
call fcn.004050a0
mov eax, dword [ebx + 0x28]
mov ecx, dword [esp + 0x2c]
mov edx, dword [ebx + 0x2c]
lea ecx, [eax + ecx*8]
test edx, edx
je 0x404132
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov dword [ecx + 4], 0
jmp 0x404132
mov edx, dword [ebx + 0x30]
cmp ecx, edx
jne 0x404116
mov eax, edx
sub eax, ecx
sar eax, 3
cmp eax, 1
jae 0x404116
sub ecx, dword [ebx + 0x28]
mov eax, 0x1fffffff
sar ecx, 3
sub eax, ecx
cmp eax, 1
jb 0x403f25
sub edx, dword [ebx + 0x28]
inc ecx
sar edx, 3
mov eax, 0x1fffffff
mov dword [esp + 0x3c], ecx
mov ecx, edx
shr ecx, 1
sub eax, ecx
cmp eax, edx
jae 0x404102
xor edx, edx
jmp 0x404104
add edx, ecx
cmp edx, dword [esp + 0x3c]
lea ecx, [ebx + 0x28]
cmovb edx, dword [esp + 0x3c]
push edx
call fcn.004050a0
mov ecx, dword [ebx + 0x2c]
test ecx, ecx
je 0x404132
mov eax, dword [esp + 0x40]
mov dword [ecx], eax
mov eax, dword [esp + 0x44]
mov dword [ecx + 4], eax
mov dword [esp + 0x44], 0
add dword [ebx + 0x2c], 8
mov byte [esp + 0x80], 0xd
cmp dword [esp + 0x44], 0
jne 0x403f2f
mov eax, dword [esp + 0x38]
inc eax
mov dword [esp + 0x38], eax
cmp eax, 1
jl 0x403fc1
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x20]
mov edx, dword [ecx + 0x44]
lea ebx, [ecx + 0x40]
cmp eax, edx
jae 0x404210
cmp dword [ebx], eax
ja 0x404210
sub eax, dword [ebx]
sar eax, 2
mov dword [esp + 0x34], eax
mov eax, dword [ebx + 8]
mov dword [esp + 0x3c], eax
cmp edx, eax
jne 0x4041e4
sub eax, edx
sar eax, 2
cmp eax, 1
jae 0x4041e4
sub edx, dword [ebx]
mov eax, 0x3fffffff
sar edx, 2
sub eax, edx
cmp eax, 1
jb 0x403f25
mov ecx, dword [esp + 0x3c]
inc edx
sub ecx, dword [ebx]
mov eax, 0x3fffffff
sar ecx, 2
mov dword [esp + 0x38], edx
mov edx, ecx
shr edx, 1
sub eax, edx
cmp eax, ecx
jae 0x4041cd
xor ecx, ecx
jmp 0x4041cf
add ecx, edx
cmp ecx, dword [esp + 0x38]
cmovb ecx, dword [esp + 0x38]
push ecx
mov ecx, ebx
call fcn.004051d0
mov ecx, dword [esp + 0x14]
mov eax, dword [ebx]
mov edx, dword [esp + 0x34]
lea edx, [eax + edx*4]
mov eax, dword [ebx + 4]
mov dword [esp + 0x3c], eax
test eax, eax
je 0x404285
mov eax, dword [edx]
mov dword [edx], 0
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x20]
mov dword [edx], eax
jmp 0x404285
mov eax, dword [ebx + 8]
mov dword [esp + 0x3c], eax
cmp edx, eax
jne 0x404272
sub eax, edx
sar eax, 2
cmp eax, 1
jae 0x404272
sub edx, dword [ebx]
mov eax, 0x3fffffff
sar edx, 2
sub eax, edx
cmp eax, 1
jb 0x403f25
mov ecx, dword [esp + 0x3c]
inc edx
sub ecx, dword [ebx]
mov eax, 0x3fffffff
sar ecx, 2
mov dword [esp + 0x38], edx
mov edx, ecx
shr edx, 1
sub eax, edx
cmp eax, ecx
jae 0x40425b
xor ecx, ecx
jmp 0x40425d
add ecx, edx
cmp ecx, dword [esp + 0x38]
cmovb ecx, dword [esp + 0x38]
push ecx
mov ecx, ebx
call fcn.004051d0
mov ecx, dword [esp + 0x14]
mov eax, dword [ebx + 4]
test eax, eax
je 0x404285
mov edx, dword [esp + 0x34]
xor esi, esi
mov dword [esp + 0x20], esi
mov dword [eax], edx
add dword [ebx + 4], 4
lea eax, [esp + 0x24]
lea ebx, [ecx + 0x34]
mov ecx, dword [ebx + 4]
cmp eax, ecx
jae 0x404326
mov edx, dword [ebx]
cmp edx, eax
ja 0x404326
sub eax, edx
mov edx, dword [ebx + 8]
sar eax, 2
mov dword [esp + 0x38], eax
cmp ecx, edx
jne 0x404306
mov eax, edx
sub eax, ecx
sar eax, 2
cmp eax, 1
jae 0x404306
sub ecx, dword [ebx]
mov eax, 0x3fffffff
sar ecx, 2
sub eax, ecx
cmp eax, 1
jb 0x403f25
sub edx, dword [ebx]
inc ecx
sar edx, 2
mov eax, 0x3fffffff
mov dword [esp + 0x3c], ecx
mov ecx, edx
shr ecx, 1
sub eax, ecx
cmp eax, edx
jae 0x4042f3
xor edx, edx
jmp 0x4042f5
add edx, ecx
cmp edx, dword [esp + 0x3c]
mov ecx, ebx
cmovb edx, dword [esp + 0x3c]
push edx
call fcn.00405140
mov eax, dword [ebx]
mov ecx, dword [esp + 0x38]
mov edx, dword [ebx + 4]
lea ecx, [eax + ecx*4]
test edx, edx
je 0x404391
mov eax, dword [ecx]
mov dword [ecx], 0
mov edi, dword [esp + 0x24]
mov dword [edx], eax
jmp 0x404391
mov edx, dword [ebx + 8]
cmp ecx, edx
jne 0x40437e
mov eax, edx
sub eax, ecx
sar eax, 2
cmp eax, 1
jae 0x40437e
sub ecx, dword [ebx]
mov eax, 0x3fffffff
sar ecx, 2
sub eax, ecx
cmp eax, 1
jb 0x403f25
sub edx, dword [ebx]
inc ecx
sar edx, 2
mov eax, 0x3fffffff
mov dword [esp + 0x3c], ecx
mov ecx, edx
shr ecx, 1
sub eax, ecx
cmp eax, edx
jae 0x40436b
xor edx, edx
jmp 0x40436d
add edx, ecx
cmp edx, dword [esp + 0x3c]
mov ecx, ebx
cmovb edx, dword [esp + 0x3c]
push edx
call fcn.00405140
mov eax, dword [ebx + 4]
test eax, eax
je 0x404391
mov ecx, dword [esp + 0x28]
xor edi, edi
mov dword [esp + 0x24], edi
mov dword [eax], ecx
add dword [ebx + 4], 4
mov byte [esp + 0x80], 0xc
test esi, esi
je 0x4043c1
mov ebx, dword [esi]
lea eax, [ebx + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x4043b8
mov ecx, ebx
call fcn.00403190
push esi
call fcn.0044bc50
add esp, 4
mov dword [esp + 0x80], 0xffffffff
test edi, edi
je 0x40443b
mov ebx, dword [edi + 4]
test ebx, ebx
je 0x40441d
mov esi, dword [ebx + 0x1c]
test esi, esi
je 0x4043ee
mov edi, edi
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov esi, dword [esi + 0x10]
test esi, esi
jne 0x4043e0
cmp dword [ebx + 0x1c], 0
je 0x40440d
mov eax, dword [ebx + 0x1c]
mov ecx, eax
mov esi, dword [eax + 0x10]
test ecx, ecx
je 0x404406
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [ebx + 0x1c], esi
test esi, esi
jne 0x4043f4
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push ebx
call fcn.0044bc50
add esp, 4
push 0x53af90
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x404432
call dword [sym.imp.WS2_32.dll_WSACleanup]
push edi
call fcn.0044bc50
add esp, 4
mov esi, dword [esp + 0x30]
inc esi
mov dword [esp + 0x30], esi
cmp esi, 8
jge 0x404460
mov ebx, dword [esp + 0x14]
jmp 0x403e50
mov edx, str.mutex
lea ecx, [esp + 0x48]
call fcn.004027d0
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4