Function at 0x10021fe0
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0x28
xor edx, edx
push edi
xor edi, edi
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
cmp esi, edx
je 0x10022da0
cmp dword [esi + 0x8814], 0xc0dedbad
jne 0x10022da0
push ebp
push ebx
xor ebx, ebx
mov ebp, 2
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ebx
cmp dword [esi + 0x8710], edx
je 0x1002205f
mov eax, dword [esi + 0x8718]
push eax
push esi
push str.Pipe_broke:_handle__p__url___s_n
push esi
call fcn.1000a240
mov eax, dword [esi + 0xc]
add esp, 0x10
cmp eax, 0x10
jge 0x1002204f
cmp eax, ebp
je 0x1002204a
mov dword [esi + 0xc], ebp
or ebx, 0xffffffff
xor edi, edi
xor eax, eax
mov dword [esi + 0x8710], eax
mov dword [esi + 8], eax
jmp 0x10022d5e
mov ecx, dword [esi + 8]
lea ebx, [esi + 8]
cmp ecx, edx
jne 0x1002207d
mov eax, dword [esi + 0xc]
cmp eax, ebp
jle 0x10022079
cmp eax, 0xf
jl 0x10022d6a
cmp ecx, edx
je 0x1002208b
mov eax, dword [esi + 0xc]
cmp eax, ebp
jle 0x1002208b
cmp eax, 0x10
jge 0x1002208b
mov dword [ecx], esi
cmp dword [ebx], edx
je 0x100221d2
mov eax, dword [esi + 0xc]
cmp eax, ebp
jl 0x100221d2
cmp eax, 0x10
jge 0x100221d2
xor ecx, ecx
cmp eax, 7
setle cl
lea edx, [esp + 0x3c]
push ecx
push edx
push esi
call fcn.1001edb0
add esp, 0xc
test eax, eax
jge 0x100221d2
mov eax, dword [esi + 0xc]
cmp eax, 3
jne 0x100220ff
mov eax, dword [esi + 0x544]
mov ecx, dword [esi + 0x540]
mov edx, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x40]
push ecx
push edx
push eax
call fcn.10001930
push eax
push str.Resolving_timed_out_after__ld_milliseconds
push esi
call fcn.1000a2d0
add esp, 0x1c
jmp 0x100221b1
cmp eax, 4
jne 0x10022132
mov ecx, dword [esi + 0x544]
mov edx, dword [esi + 0x540]
mov eax, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x40]
push edx
push eax
push ecx
call fcn.10001930
push eax
push str.Connection_timed_out_after__ld_milliseconds
push esi
call fcn.1000a2d0
add esp, 0x1c
jmp 0x100221b1
mov eax, dword [esi + 0x50]
mov ecx, dword [esi + 0x54]
mov edx, eax
and edx, ecx
cmp edx, 0xffffffff
mov edx, dword [esi + 0x544]
je 0x10022180
push ecx
mov ecx, dword [esi + 0x70]
push eax
mov eax, dword [esi + 0x74]
push eax
mov eax, dword [esi + 0x540]
push ecx
mov ecx, dword [esi + 0x94]
push edx
mov edx, dword [esi + 0x90]
push eax
push ecx
push edx
call fcn.10001930
add esp, 0x10
push eax
push str.Operation_timed_out_after__ld_milliseconds_with__I64d_out_of__I64d_bytes_received
push esi
call fcn.1000a2d0
add esp, 0x1c
jmp 0x100221b1
mov eax, dword [esi + 0x74]
mov ecx, dword [esi + 0x70]
push eax
mov eax, dword [esi + 0x540]
push ecx
mov ecx, dword [esp + 0x48]
push edx
mov edx, dword [esp + 0x48]
push eax
push ecx
push edx
call fcn.10001930
add esp, 0x10
push eax
push str.Operation_timed_out_after__ld_milliseconds_with__I64d_bytes_received
push esi
call fcn.1000a2d0
add esp, 0x14
cmp dword [esi + 0xc], 8
jle 0x100221c8
mov ecx, dword [ebx]
mov eax, 1
mov dword [ecx + 0x250], eax
mov dword [esp + 0x10], eax
mov edi, 0x1c
jmp case.0x100221de.1
mov eax, dword [esi + 0xc]
cmp eax, 0x11
ja case.default.0x100221de
jmp dword [eax*4 + 0x10022dac]
push esi
call fcn.1001bbe0
mov edi, eax
add esp, 4
test edi, edi
jne case.0x100221de.1
cmp dword [esi + 0xc], ebp
je 0x10022200
mov dword [esi + 0xc], ebp
push 1
push esi
call fcn.10002860
mov dword [esp + 0x14], 0xffffffff
jmp 0x10022c29
push ebp
push esi
call fcn.10002860
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x38]
push eax
push ebx
push esi
call fcn.10015cd0
mov edi, eax
add esp, 0x18
cmp edi, 0x59
jne 0x1002226a
mov eax, 1
cmp dword [esi + 0xc], eax
je 0x10022244
mov dword [esi + 0xc], eax
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx + 0x18]
mov edx, dword [eax + 4]
push esi
push edx
push eax
call fcn.100202b0
add esp, 0xc
mov edi, eax
neg edi
sbb edi, edi
and edi, 0xffffffe5
add edi, 0x1b
jmp case.0x100221de.1
test edi, edi
jne case.0x100221de.1
mov eax, dword [ebx]
push eax
push esi
call fcn.10032d10
mov edi, eax
add esp, 8
test edi, edi
jne 0x1002253e
cmp dword [esp + 0x2c], eax
je 0x100222a4
cmp dword [esi + 0xc], 3
je case.0x100221de.1
mov dword [esi + 0xc], 3
jmp case.0x100221de.1
cmp dword [esp + 0x14], 0
mov dword [esp + 0xc], 0xffffffff
je 0x100222cd
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx + 0x30]
neg eax
sbb eax, eax
add eax, 8
mov ecx, esi
call fcn.10020a70
jmp case.0x100221de.1
mov edx, dword [ebx]
cmp dword [edx + 0x5c0], 1
jne 0x1002243d
cmp dword [esi + 0xc], 5
je case.0x100221de.1
mov dword [esi + 0xc], 5
jmp case.0x100221de.1
cmp dword [esi + 0x48], 0
mov ebp, dword [ebx]
mov dword [esp + 0x18], 0
je 0x1002230f
push 2
push 3
push esi
call fcn.10023440
add esp, 0xc
mov eax, dword [ebp + 0xb0]
mov ecx, dword [ebp + 0x98]
push eax
push ecx
push ebp
call fcn.10001f40
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
je 0x1002235a
mov ecx, 1
add dword [eax + 0x10], ecx
mov edx, dword [esp + 0x18]
push str.Hostname_was_found_in_DNS_cache_n
push esi
mov dword [ebp + 0x4e0], edx
mov dword [ebp + 0x4e4], ecx
xor edi, edi
call fcn.1000a240
mov eax, dword [esp + 0x20]
add esp, 8
cmp dword [esi + 0x48], 0
je 0x1002236f
push 3
push esi
call fcn.10023480
mov eax, dword [esp + 0x20]
add esp, 8
test eax, eax
jne 0x10022385
mov ecx, dword [ebx]
lea eax, [esp + 0x18]
push eax
push ecx
call fcn.10031050
add esp, 8
mov edi, eax
mov ebp, dword [esp + 0x38]
push esi
push ebp
call fcn.10021b60
add esp, 8
cmp dword [esp + 0x18], 0
je 0x100223f7
mov eax, dword [ebx]
lea edx, [esp + 0x14]
push edx
push eax
call fcn.10024e30
mov edi, eax
add esp, 8
test edi, edi
je 0x100223b8
mov dword [ebx], 0
jmp 0x100223f7
cmp dword [esp + 0x14], 0
mov dword [esp + 0xc], 0xffffffff
je 0x100223da
mov eax, dword [ebp + 0x30]
neg eax
sbb eax, eax
add eax, 8
mov ecx, esi
call fcn.10020a70
jmp 0x100223f7
mov ecx, dword [ebx]
cmp dword [ecx + 0x5c0], 1
mov eax, 5
je 0x100223ef
mov eax, 4
cmp dword [esi + 0xc], eax
je 0x100223f7
mov dword [esi + 0xc], eax
test edi, edi
je case.0x100221de.1
mov dword [esp + 0x10], 1
jmp case.0x100221de.1
mov eax, dword [ebx]
lea edx, [esp + 0x14]
push edx
push eax
call fcn.10007460
mov ebx, dword [ebx]
add esp, 8
cmp dword [ebx + 0x2a8], 0
mov edi, eax
jne 0x1002248f
test edi, edi
jne case.0x100221de.1
cmp dword [ebx + 0x5c0], ebp
jne case.0x100221de.1
cmp dword [esi + 0xc], 4
je case.0x100221de.1
mov dword [esi + 0xc], 4
jmp case.0x100221de.1
mov edx, dword [ebx]
lea ecx, [esp + 0x24]
push ecx
push 0
push edx
call fcn.1001fec0
add esp, 0xc
cmp dword [esp + 0x24], 0
mov edi, eax
je 0x10022484
test edi, edi
jne 0x10022484
mov ecx, dword [ebx]
lea eax, [esp + 0x14]
push eax
push ecx
call fcn.10010140
add esp, 8
mov edi, eax
mov ebx, dword [ebx]
cmp dword [ebx + 0x2a8], 0
je 0x100224aa
xor edi, edi
mov dword [esp + 0xc], 0xffffffff
cmp dword [esi + 0xc], ebp
je case.0x100221de.1
mov dword [esi + 0xc], ebp
jmp case.0x100221de.1
test edi, edi
je 0x100224bb
mov dword [esp + 0x10], 1
jmp case.0x100221de.1
cmp dword [esp + 0x24], 0
je case.0x100221de.1
cmp dword [esp + 0x14], 0
jne 0x1002250a
cmp dword [ebx + 0x5c0], 1
jne 0x100224e0
mov eax, 5
jmp 0x10022580
mov eax, 6
jmp 0x10022580
mov ecx, dword [ebx]
lea eax, [esp + 0x14]
push eax
push ecx
call fcn.100100c0
mov edi, eax
add esp, 8
test edi, edi
jne 0x1002252c
cmp dword [esp + 0x14], eax
je case.0x100221de.1
mov edx, dword [esp + 0x38]
mov eax, dword [edx + 0x30]
neg eax
sbb eax, eax
add eax, 8
mov ecx, esi
call fcn.10020a70
mov dword [esp + 0xc], 0xffffffff
jmp case.0x100221de.1
push esi
call fcn.10035f30
push 1
push edi
push ebx
call fcn.10014cd0
add esp, 0x10
mov dword [esp + 0x10], 1
jmp case.0x100221de.1
mov ebp, dword [ebx]
cmp dword [ebp + 0x338], 0
jne case.0x100221de.1
mov eax, dword [ebp + 0x33c]
push esi
call fcn.100213d0
add esp, 4
test eax, eax
je case.0x100221de.1
mov dword [ebp + 0x338], 1
mov eax, 8
cmp dword [esi + 0xc], eax
je 0x10022588
mov dword [esi + 0xc], eax
mov dword [esp + 0xc], 0xffffffff
jmp case.0x100221de.1
xor edi, edi
cmp dword [esi + 0x370], edi
je 0x100225ac
mov eax, dword [ebx]
mov dword [eax + 0x250], edi
lea eax, [edi + 0xf]
jmp 0x10022580
lea ecx, [esp + 0x1c]
push ecx
push ebx
call fcn.100115d0
mov edi, eax
xor ebp, ebp
add esp, 8
cmp edi, ebp
jne 0x10022632
cmp dword [esp + 0x1c], ebp
jne 0x10022608
cmp dword [esi + 0x45c], ebp
je 0x100225f2
mov eax, dword [esi + 0x8750]
cmp eax, 6
je 0x100225e0
cmp eax, 4
jne 0x100225f2
push ebp
push ebp
push ebx
call fcn.10014cd0
add esp, 0xc
mov eax, 0xf
jmp 0x10022580
mov eax, 9
cmp dword [esi + 0xc], eax
je 0x1002261f
mov dword [esi + 0xc], eax
mov dword [esp + 0xc], ebp
jmp case.0x100221de.1
mov edx, dword [ebx]
cmp dword [edx + 0x270], ebp
je 0x10022628
mov eax, 0xa
cmp dword [esi + 0xc], eax
je 0x1002261f
mov dword [esi + 0xc], eax
mov dword [esp + 0xc], ebp
jmp case.0x100221de.1
mov eax, 0xb
jmp 0x10022580
cmp edi, 0x37
jne 0x1002270b
mov eax, dword [ebx]
cmp dword [eax + 0x254], ebp
je 0x1002270b
lea ecx, [esp + 0x18]
push ecx
xor ebp, ebp
push eax
mov dword [esp + 0x20], ebp
call fcn.1001c2a0
add esp, 8
test eax, eax
je 0x1002266d
mov edi, eax
mov dword [esp + 0x10], 1
jmp 0x10022678
xor edx, edx
cmp dword [esp + 0x18], edx
setne dl
mov ebp, edx
push esi
call fcn.10035f30
push 0
push edi
push ebx
call fcn.10014cd0
add esp, 0x10
test ebp, ebp
je 0x100226f0
test eax, eax
je 0x100226ac
cmp eax, 0x37
je 0x100226ac
mov edi, eax
mov eax, dword [esp + 0x18]
push eax
call dword [0x1004403c]
add esp, 4
jmp case.0x100221de.1
mov ecx, dword [esp + 0x18]
mov edi, 2
push edi
push ecx
push esi
call fcn.1001bf50
add esp, 0xc
test eax, eax
jne 0x100226db
cmp dword [esi + 0xc], edi
je 0x100226cc
mov dword [esi + 0xc], edi
mov dword [esp + 0xc], 0xffffffff
xor edi, edi
jmp case.0x100221de.1
mov edx, dword [esp + 0x18]
push edx
mov edi, eax
call dword [0x1004403c]
add esp, 4
jmp case.0x100221de.1
mov eax, dword [esp + 0x18]
push eax
mov dword [esp + 0x14], 1
call dword [0x1004403c]
add esp, 4
jmp case.0x100221de.1
push esi
call fcn.10035f30
add esp, 4
cmp dword [ebx], ebp
je 0x10022723
push ebp
push edi
push ebx
call fcn.10014cd0
add esp, 0xc
mov dword [esp + 0x10], 1
jmp case.0x100221de.1
mov edx, dword [ebx]
lea ecx, [esp + 0x1c]
push ecx
push edx
call fcn.10010100
mov edi, eax
add esp, 8
test edi, edi
jne 0x10022773
cmp dword [esp + 0x1c], eax
je case.0x100221de.1
mov eax, dword [ebx]
mov eax, dword [eax + 0x270]
neg eax
sbb eax, eax
add eax, 0xb
mov ecx, esi
call fcn.10020a70
mov dword [esp + 0xc], 0xffffffff
jmp case.0x100221de.1
push esi
call fcn.10035f30
push 0
jmp 0x10022534
mov edx, dword [ebx]
lea ecx, [esp + 0x30]
push ecx
push edx
call fcn.10011660
mov edi, eax
add esp, 8
test edi, edi
jne 0x10022773
mov eax, dword [esp + 0x30]
test eax, eax
je 0x100227c0
xor ecx, ecx
cmp eax, 1
sete cl
lea ecx, [ecx + ecx + 9]
mov eax, ecx
mov ecx, esi
call fcn.10020a70
mov dword [esp + 0xc], 0xffffffff
jmp case.0x100221de.1
mov dword [esp + 0xc], 0
jmp case.0x100221de.1
mov edx, dword [ebx]
push edx
push esi
call fcn.10032d60
mov eax, dword [esp + 0x40]
push eax
call fcn.10021790
mov eax, dword [ebx]
or ecx, 0xffffffff
add esp, 0xc
cmp dword [eax + 0x2d0], ecx
jne 0x100227fb
cmp dword [eax + 0x2d4], ecx
lea eax, [ecx + 0x10]
je 0x10022800
mov eax, 0xc
cmp dword [esi + 0xc], eax
je 0x10022808
mov dword [esi + 0xc], eax
mov dword [esp + 0xc], ecx
jmp case.0x100221de.1
mov ebp, dword [ebx]
cmp dword [ebp + 0x334], 0
jne case.0x100221de.1
mov eax, dword [ebp + 0x340]
push esi
call fcn.100213d0
add esp, 4
test eax, eax
je case.0x100221de.1
mov dword [ebp + 0x334], 1
mov eax, 0xd
jmp 0x10022580
mov ecx, dword [ebx]
push ecx
call fcn.10002ad0
add esp, 4
test eax, eax
je 0x10022861
mov edi, 0x2a
jmp 0x10022876
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
push edx
push eax
push esi
call fcn.100161a0
add esp, 0xc
mov edi, eax
mov ecx, dword [esi + 0x208]
mov eax, dword [esi + 0x20c]
mov edx, ecx
or edx, eax
je 0x100228a6
mov edx, dword [esi + 0x504]
cmp edx, eax
jg case.0x100221de.1
jl 0x100228a6
mov eax, dword [esi + 0x500]
cmp eax, ecx
jae case.0x100221de.1
mov ecx, dword [esi + 0x210]
mov eax, dword [esi + 0x214]
mov edx, ecx
or edx, eax
je 0x100228d6
mov edx, dword [esi + 0x4fc]
cmp edx, eax
jg case.0x100221de.1
jl 0x100228d6
mov eax, dword [esi + 0x4f8]
cmp eax, ecx
jae case.0x100221de.1
cmp dword [esi + 0xc], 0xd
je case.0x100221de.1
mov dword [esi + 0xc], 0xd
jmp case.0x100221de.1
mov eax, dword [esi + 0x20c]
mov ebp, dword [esi + 0x208]
xor ecx, ecx
cmp eax, ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x28], ecx
jl 0x10022951
jg 0x1002290c
cmp ebp, ecx
jbe 0x10022951
mov edx, dword [esi + 0x504]
cmp edx, eax
mov ebx, dword [esi + 0x500]
jl 0x10022951
jg 0x10022922
cmp ebx, ebp
jbe 0x10022951
mov ecx, dword [esi + 0x2bc]
mov dword [esi + 0xc], 0xe
test ecx, ecx
jne 0x10022938
mov ecx, 0x4000
push ecx
push edx
push ebx
push eax
push ebp
call fcn.1001bb10
push eax
push esi
call fcn.10021630
add esp, 0x1c
jmp case.0x100221de.1
mov eax, dword [esi + 0x214]
mov ebx, dword [esi + 0x210]
test eax, eax
jl 0x100229ac
jg 0x10022967
test ebx, ebx
jbe 0x100229ac
mov edx, dword [esi + 0x4fc]
cmp edx, eax
mov ebp, dword [esi + 0x4f8]
jl 0x100229ac
jg 0x1002297d
cmp ebp, ebx
jbe 0x100229ac
mov ecx, dword [esi + 0x2bc]
mov dword [esi + 0xc], 0xe
test ecx, ecx
jne 0x10022993
mov ecx, 0x4000
push ecx
push edx
push ebp
push eax
push ebx
call fcn.1001bb10
push eax
push esi
call fcn.10021630
add esp, 0x1c
jmp case.0x100221de.1
mov edx, dword [esi + 8]
lea ecx, [esp + 0x20]
lea ebx, [esi + 8]
push ecx
push edx
call fcn.1001b760
add esp, 8
test byte [esi + 0xf8], 1
mov edi, eax
jne 0x100229d7
mov eax, dword [ebx]
mov dword [eax + 0x334], 0
test byte [esi + 0xf8], 2
jne 0x100229ec
mov ecx, dword [ebx]
mov dword [ecx + 0x338], 0
cmp dword [esp + 0x20], 0
jne 0x100229f8
cmp edi, 0x38
jne 0x10022a27
mov eax, dword [ebx]
lea edx, [esp + 0x18]
push edx
push eax
call fcn.1001c2a0
add esp, 8
test eax, eax
jne 0x10022a27
xor ecx, ecx
cmp dword [esp + 0x18], ecx
setne cl
mov ebp, ecx
test ebp, ebp
je 0x10022a2b
xor edi, edi
mov dword [esp + 0x20], 1
jmp 0x10022a7b
mov ebp, dword [esp + 0x28]
test edi, edi
je 0x10022a74
mov eax, dword [ebx]
mov edx, dword [eax + 0x2c4]
test byte [edx + 0x40], 2
jne 0x10022a47
mov dword [eax + 0x250], 1
push esi
call fcn.10035f30
push 0
push edi
push ebx
call fcn.10014cd0
add esp, 0x10
mov eax, dword [esp + 0x18]
test eax, eax
je case.0x100221de.1
push eax
call dword [0x1004403c]
add esp, 4
jmp case.0x100221de.1
cmp dword [esp + 0x20], 0
je 0x10022a59
push esi
call fcn.10035f30
mov eax, dword [ebx]
mov ecx, dword [eax + 0x340]
push ecx
push esi
call fcn.1000fd20
mov edx, dword [ebx]
mov eax, dword [edx + 0x340]
add esp, 0xc
cmp dword [eax], 0
je 0x10022aaf
mov eax, dword [eax]
mov ecx, dword [eax]
push 1
push ecx
call fcn.10021630
add esp, 8
mov edx, dword [esp + 0x38]
push edx
call fcn.10021790
add esp, 4
cmp dword [esi + 0x10c], 0
jne 0x10022b35
test ebp, ebp
jne 0x10022b66
cmp dword [esi + 0x108], ebp
je 0x10022b1b
mov eax, dword [esp + 0x18]
test eax, eax
je 0x10022ae7
push eax
call dword [0x1004403c]
add esp, 4
mov eax, dword [esi + 0x108]
push 1
push eax
push esi
mov dword [esp + 0x24], eax
mov dword [esi + 0x108], 0
call fcn.1001bf50
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x10022b13
mov dword [esp + 0x18], eax
jmp 0x10022b1b
mov dword [esp + 0x10], 1
mov eax, 0xf
cmp dword [esi + 0xc], eax
je 0x10022b28
mov dword [esi + 0xc], eax
mov dword [esp + 0xc], 0xffffffff
jmp 0x10022a59
test ebp, ebp
jne 0x10022b66
mov eax, dword [esp + 0x18]
test eax, eax
je 0x10022b4b
push eax
call dword [0x1004403c]
add esp, 4
mov eax, dword [esi + 0x10c]
mov dword [esp + 0x18], eax
mov dword [esi + 0x10c], 0
mov ebp, 3
jmp 0x10022b6b
mov ebp, 2
push 0
push 0
push ebx
call fcn.10014cd0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x10022a59
mov ecx, dword [esp + 0x18]
push ebp
push ecx
push esi
call fcn.1001bf50
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x10022a59
lea eax, [edi + 2]
jmp 0x10022580
mov eax, dword [ebx]
mov dword [esp + 0xc], 0xffffffff
test eax, eax
je 0x10022be5
mov edx, dword [eax + 0x340]
push edx
push esi
call fcn.1000fd20
mov eax, dword [esp + 0x40]
push eax
call fcn.10021790
push 0
push edi
push ebx
call fcn.10014cd0
add esp, 0x18
test edi, edi
jne 0x10022bda
mov edi, eax
cmp dword [ebx], 0
je 0x10022be5
mov dword [ebx], 0
cmp dword [esi + 0x45c], 0
je 0x10022c06
cmp dword [esi + 0x8750], 6
je 0x10022c06
cmp dword [esi + 0xc], 0
je case.0x100221de.1
mov dword [esi + 0xc], 0
jmp case.0x100221de.1
cmp dword [esi + 0xc], 0x10
je case.0x100221de.1
mov eax, dword [esi + 0x40]
mov dword [esi + 0xc], 0x10
dec dword [eax + 0x10]
jmp case.0x100221de.1
push 0
push esi
mov dword [ebx], 0
call fcn.10021490
add esp, 8
mov ecx, dword [esi + 0xc]
mov ebp, 0x10
cmp ecx, ebp
jge 0x10022d18
mov eax, dword [esi + 8]
xor ebx, ebx
cmp edi, ebx
je 0x10022cd1
mov dword [esi + 0x8710], ebx
cmp eax, ebx
je 0x10022caf
mov dword [eax + 0x338], ebx
mov ecx, dword [esi + 8]
mov dword [ecx + 0x334], ebx
mov edx, dword [esi + 8]
mov eax, dword [edx + 0x33c]
push eax
push esi
call fcn.1000fd20
mov ecx, dword [esi + 8]
mov edx, dword [ecx + 0x340]
push edx
push esi
call fcn.1000fd20
mov eax, dword [esp + 0x48]
push eax
call fcn.10021790
add esp, 0x14
cmp dword [esp + 0x10], ebx
je 0x10022cbd
mov edx, dword [esi + 8]
xor ecx, ecx
cmp edi, 0x1c
sete cl
push ecx
push edx
call fcn.10013f80
add esp, 8
mov dword [esi + 8], ebx
jmp 0x10022cbd
cmp ecx, 2
jne 0x10022cbd
push esi
call fcn.10035f30
add esp, 4
mov ebx, dword [esp + 0xc]
cmp dword [esi + 0xc], ebp
je 0x10022d21
mov eax, dword [esi + 0x40]
mov dword [esi + 0xc], ebp
dec dword [eax + 0x10]
jmp 0x10022d1c
cmp eax, ebx
je 0x10022d18
push eax
call fcn.10002ad0
add esp, 4
test eax, eax
je 0x10022d18
mov eax, dword [esi + 8]
xor ecx, ecx
mov dword [eax + 0x250], 1
mov eax, dword [esi + 0xc]
cmp eax, 0xf
setge cl
mov edi, 0x2a
add ecx, 0xf
cmp eax, ecx
je 0x10022d13
mov dword [esi + 0xc], ecx
cmp ecx, ebp
jne 0x10022d13
mov eax, dword [esi + 0x40]
dec dword [eax + 0x10]
or ebx, 0xffffffff
jmp 0x10022d1c
mov ebx, dword [esp + 0xc]
cmp dword [esi + 0xc], ebp
jne 0x10022d5e
mov ecx, dword [esp + 0x38]
lea eax, [esi + 0x14]
mov dword [eax], 1
mov dword [eax + 4], esi
mov dword [eax + 8], edi
mov ecx, dword [ecx + 0x14]
mov edx, dword [ecx + 4]
push eax
push edx
push ecx
call fcn.100202b0
mov ebx, eax
add esp, 0xc
neg ebx
sbb ebx, ebx
and ebx, 0xfffffffd
mov eax, 0x11
add ebx, 3
cmp dword [esi + 0xc], eax
je 0x10022d5e
mov dword [esi + 0xc], eax
cmp ebx, 0xffffffff
jne 0x10022d88
xor edx, edx
jmp 0x1002200e
mov eax, dword [esi + 0xc]
push eax
push str.In_state__d_with_no_easy_conn__bail_out__n
push esi
call fcn.1000a2d0
add esp, 0xc
pop ebx
pop ebp
mov eax, 4
pop edi
add esp, 0x28
ret
mov eax, ebx
pop ebx
pop ebp
mov dword [esi + 0x10], edi
pop edi
add esp, 0x28
ret
pop ebx
pop ebp
mov dword [esi + 0x10], edi
xor eax, eax
pop edi
add esp, 0x28
ret
mov eax, 2
pop edi
add esp, 0x28
ret