Function at 0x100c9020
Capabilities:
Get socket status
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x303c
call fcn.10193290
mov eax, dword [0x101d2014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x100c9670
mov ecx, dword [eax + 0xe0]
mov edx, ecx
and edx, 0x1002
cmp edx, 2
je 0x100c96b0
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x100c96c2
mov eax, dword [ebp + 8]
xor esi, esi
test edx, edx
mov dword [ebp - 0x3044], 0
mov dword [ebp - 0x1014], esi
mov dword [ebp - 0x2018], esi
mov dword [ebp - 0x301c], esi
lea ecx, [eax + edx*8]
mov edx, 0
mov dword [ebp - 0x3034], eax
mov dword [ebp - 0x3048], ecx
jle 0x100c928a
xor ebx, ebx
xor esi, esi
mov ecx, eax
xor edx, edx
mov dword [ebp - 0x3044], 0
xor eax, eax
mov dword [ebp - 0x3040], ebx
mov word [ebp - 0x3024], ax
mov word [ebp - 0x3028], ax
mov edi, dword [ecx]
test edi, edi
je 0x100c9684
movzx ebx, word [ecx + 4]
test bx, bx
je 0x100c9684
test bl, 1
mov dword [ebp - 0x3038], esi
mov dword [ebp - 0x3030], ecx
je 0x100c94a0
mov eax, dword [edi]
and ebx, 0xfffd
mov esi, ebx
mov ecx, dword [eax + 0x54]
cmp ecx, 0x100d19d0
jne 0x100c9250
mov word [ebp - 0x3024], 0
mov ecx, dword [ebp - 0x3030]
movzx ebx, word [ecx + 4]
mov edi, dword [ebp + 8]
test bl, 2
mov dword [ebp - 0x303c], edx
jne 0x100c9414
xor eax, eax
movzx ecx, word [ebp - 0x3024]
mov ebx, dword [ebp - 0x3040]
test cx, si
jne 0x100c9510
test word [ebp - 0x3028], ax
jne 0x100c9510
mov ecx, dword [ebp - 0x3030]
mov word [ecx + 6], 0
mov ecx, dword [ecx]
test ecx, ecx
je 0x100c9557
movzx edx, si
movzx eax, ax
mov esi, ecx
cmp dword [esi + 0x14], 0
je 0x100c9194
mov esi, dword [esi + 8]
test esi, esi
jne 0x100c9182
jmp 0x100c9546
mov ecx, esi
mov ecx, dword [ecx + 4]
cmp dword [ecx], 0xaaaaaaaa
jne 0x100c9557
test ebx, ebx
jne 0x100c9659
mov ecx, dword [ecx + 0x18]
test dl, 1
je 0x100c9495
mov esi, dword [ebp - 0x3030]
mov word [esi + 6], 1
mov esi, dword [ebp - 0x1014]
cmp esi, 0x3ff
ja 0x100c91e3
lea edi, [esi + 1]
mov dword [ebp - 0x1014], edi
mov dword [ebp + esi*4 - 0x1010], ecx
mov esi, dword [ebp - 0x3038]
inc esi
test dl, 2
jne 0x100c94d9
test al, 1
jne 0x100c94a7
test al, 2
jne 0x100c9446
mov eax, dword [ebp - 0x3030]
xor ebx, ebx
test byte [eax + 4], 4
je 0x100c965f
mov eax, dword [ebp - 0x301c]
cmp eax, 0x3ff
ja 0x100c9232
lea edx, [eax + 1]
mov dword [ebp - 0x301c], edx
mov dword [ebp + eax*4 - 0x3018], ecx
mov edx, dword [ebp - 0x303c]
mov ecx, dword [ebp - 0x3030]
inc edx
add ecx, 8
cmp ecx, dword [ebp - 0x3048]
jb 0x100c90bf
jmp 0x100c9282
mov ebx, edx
cmp ecx, 0x100c8ff0
movsx esi, si
jne 0x100c9265
mov edi, dword [edi + 8]
mov eax, dword [edi]
mov ecx, dword [eax + 0x54]
call dword [section..00cfg]
lea eax, [ebp - 0x3024]
push eax
push esi
push edi
call ecx
add esp, 0xc
mov esi, eax
mov edx, ebx
jmp 0x100c9123
test ebx, ebx
jne 0x100c96d2
mov eax, dword [ebp - 0x3044]
cmp edx, 0x400
jg 0x100c969c
cmp esi, 0x400
jg 0x100c969c
cmp eax, 0x401
jge 0x100c969c
test esi, esi
lea ecx, [ebp - 0x1014]
lea ebx, [ebp - 0x2018]
lea edi, [ebp - 0x301c]
cmove ecx, esi
test eax, eax
mov dword [ebp - 0x3030], ecx
mov ecx, dword [ebp + 0x10]
cmove ebx, eax
test edx, edx
cmove edi, edx
or eax, esi
or eax, edx
je 0x100c96c7
xor esi, esi
cmp ecx, 0xffffffff
jne 0x100c93da
push esi
push edi
push ebx
push dword [ebp - 0x3030]
push 0
call sub.wsock32.dll_select
test eax, eax
jle 0x100c958c
cmp dword [ebp + 0xc], 0
mov edi, dword [ebp + 8]
jle 0x100c96d0
xor ebx, ebx
mov eax, dword [edi]
mov dword [ebp - 0x3040], ebx
test eax, eax
je 0x100c9695
cmp word [edi + 4], 0
je 0x100c9695
mov ecx, eax
cmp dword [ecx + 0x14], 0
je 0x100c935b
mov ecx, dword [ecx + 8]
test ecx, ecx
jne 0x100c9336
jmp 0x100c9353
mov eax, dword [eax + 0xc]
cmp dword [eax + 0x14], 0
jne 0x100c9350
jmp 0x100c935d
mov eax, ecx
mov eax, dword [eax + 4]
mov ebx, dword [eax + 0x18]
lea eax, [ebp - 0x1014]
push eax
push ebx
call sub.wsock32.dll___WSAFDIsSet
test eax, eax
je 0x100c93d6
movzx esi, word [edi + 6]
mov eax, esi
shr esi, 1
and eax, 1
and esi, 2
or esi, eax
lea eax, [ebp - 0x2018]
push eax
push ebx
call sub.wsock32.dll___WSAFDIsSet
test eax, eax
jne 0x100c9478
lea eax, [ebp - 0x301c]
push eax
push ebx
call sub.wsock32.dll___WSAFDIsSet
movzx ecx, si
test eax, eax
lea edx, [ecx + 4]
cmovne ecx, edx
mov ebx, dword [ebp - 0x3040]
cmp cx, 1
mov word [edi + 6], cx
sbb ebx, 0xffffffff
add edi, 8
cmp edi, dword [ebp - 0x3048]
jb 0x100c9319
jmp 0x100c96d2
xor esi, esi
jmp 0x100c9384
cmp dword [0x101d4d40], 0
je 0x100c96e9
mov edx, 0x10624dd3
mov eax, ecx
lea esi, [ebp - 0x3024]
mul edx
shr edx, 6
imul eax, edx, 0x3e8
mov dword [esi], edx
sub ecx, eax
push ecx
call sym.nss3.dll_PR_IntervalToMicroseconds
add esp, 4
mov dword [esi + 4], eax
jmp 0x100c92f2
mov edi, dword [ecx]
and ebx, 0xfffe
mov eax, dword [edi]
mov ecx, dword [eax + 0x54]
call dword [section..00cfg]
movsx eax, bx
lea edx, [ebp - 0x3028]
push edx
push eax
push edi
mov edi, dword [ebp + 8]
call ecx
mov edx, dword [ebp - 0x303c]
add esp, 0xc
jmp 0x100c9141
mov eax, dword [ebp - 0x3030]
or byte [eax + 6], 8
mov eax, dword [ebp - 0x2018]
cmp eax, 0x3ff
ja 0x100c946d
lea edx, [eax + 1]
mov dword [ebp - 0x2018], edx
mov dword [ebp + eax*4 - 0x2014], ecx
inc dword [ebp - 0x3044]
jmp 0x100c9203
movzx eax, si
movzx esi, word [edi + 6]
mov ecx, esi
shr esi, 2
shr ecx, 1
and esi, 2
and ecx, 1
or esi, eax
or esi, ecx
jmp 0x100c9399
mov esi, dword [ebp - 0x3038]
jmp 0x100c91ea
xor esi, esi
jmp 0x100c912d
mov edx, dword [ebp - 0x3030]
mov edi, esi
or byte [edx + 6], 4
mov edx, dword [ebp - 0x1014]
cmp edx, 0x3ff
ja 0x100c94d1
lea esi, [edx + 1]
mov dword [ebp - 0x1014], esi
mov dword [ebp + edx*4 - 0x1010], ecx
mov esi, edi
inc esi
jmp 0x100c91fb
mov edx, dword [ebp - 0x3030]
mov edi, esi
or byte [edx + 6], 2
mov edx, dword [ebp - 0x2018]
cmp edx, 0x3ff
ja 0x100c9503
lea esi, [edx + 1]
mov dword [ebp - 0x2018], esi
mov dword [ebp + edx*4 - 0x2014], ecx
inc dword [ebp - 0x3044]
mov esi, edi
jmp 0x100c91f3
mov esi, dword [ebp - 0x3030]
test ebx, ebx
jne 0x100c952d
cmp esi, edi
jbe 0x100c952d
mov eax, edi
mov word [eax + 6], 0
add eax, 8
cmp eax, esi
jb 0x100c9520
or cx, word [ebp - 0x3028]
inc ebx
mov word [esi + 6], cx
mov ecx, esi
mov esi, dword [ebp - 0x3038]
jmp 0x100c923f
cmp dword [ecx + 0x14], 0
je 0x100c96f6
mov ecx, dword [ecx + 0xc]
test ecx, ecx
jne 0x100c9546
mov ecx, dword [ebp - 0x3030]
test ebx, ebx
jne 0x100c9574
cmp ecx, edi
jbe 0x100c9574
mov eax, edi
mov word [eax + 6], 0
add eax, 8
cmp eax, ecx
jb 0x100c9567
mov esi, dword [ebp - 0x3038]
mov edx, dword [ebp - 0x303c]
inc ebx
mov word [ecx + 6], 0x10
jmp 0x100c923f
mov ebx, eax
cmp eax, 0xffffffff
jne 0x100c96d2
call sub.wsock32.dll_WSAGetLastError
cmp eax, 0x2736
jne 0x100c9703
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x302c], 4
jle 0x100c970e
xor esi, esi
lea edi, [ebp - 0x302c]
lea ebx, [ebp - 0x3028]
mov eax, dword [ebp - 0x3034]
mov word [eax + 6], 0
mov eax, dword [eax]
test eax, eax
je 0x100c9622
mov ecx, dword [ebp - 0x3034]
cmp word [ecx + 4], 0
je 0x100c9622
mov ecx, eax
cmp dword [ecx + 0x14], 0
je 0x100c9604
mov ecx, dword [ecx + 8]
test ecx, ecx
jne 0x100c95ea
jmp 0x100c95fc
mov eax, dword [eax + 0xc]
cmp dword [eax + 0x14], 0
jne 0x100c95f9
jmp 0x100c9606
mov eax, ecx
mov eax, dword [eax + 4]
push edi
push ebx
push 0x1008
push 0xffff
push dword [eax + 0x18]
call sub.wsock32.dll_getsockopt
cmp eax, 0xffffffff
je 0x100c963e
mov eax, dword [ebp - 0x3034]
add eax, 8
cmp eax, dword [ebp - 0x3048]
mov dword [ebp - 0x3034], eax
jb 0x100c95c9
jmp 0x100c9710
call sub.wsock32.dll_WSAGetLastError
cmp eax, 0x2736
jne 0x100c9622
mov eax, dword [ebp - 0x3034]
inc esi
mov word [eax + 6], 0x10
jmp 0x100c9622
mov esi, dword [ebp - 0x3038]
mov edx, dword [ebp - 0x303c]
mov ecx, dword [ebp - 0x3030]
jmp 0x100c923f
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
jmp 0x100c904e
mov ebx, dword [ebp - 0x3040]
mov word [ecx + 6], 0
jmp 0x100c923f
xor ecx, ecx
jmp 0x100c93b1
push 0
push 0xffffe89d
call sym.nss3.dll_PR_SetError
add esp, 8
xor ebx, ebx
dec ebx
jmp 0x100c96d2
and ecx, 0xfffffffd
mov dword [eax + 0xe0], ecx
push 0
push 0xffffe897
jmp 0x100c96a3
push dword [ebp + 0x10]
jmp 0x100c96c8
push ecx
call sym.nss3.dll_PR_Sleep
add esp, 4
xor ebx, ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10192ef0
mov eax, ebx
add esp, 0x303c
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.100da0a0
mov ecx, dword [ebp + 0x10]
jmp 0x100c93e7
test ecx, ecx
jne 0x100c9196
jmp 0x100c9557
push eax
call fcn.100d6ae0
add esp, 4
jmp 0x100c96ab
xor esi, esi
mov ebx, esi
jmp 0x100c96d2