Function at 0x10091d50
Capabilities:
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x101217b0
mov eax, dword fs:[0]
push eax
sub esp, 0xa8
mov eax, dword [0x1014d0cc]
xor eax, esp
mov dword [esp + 0xa0], eax
push ebx
push esi
push edi
mov eax, dword [0x1014d0cc]
xor eax, esp
push eax
lea eax, [esp + 0xb8]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, ecx
lea ebx, [esi + 0xa6c]
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], ebx
call fcn.1009bb60
mov ebx, dword [esp + 0x10]
xor eax, eax
mov byte [esi + 0xcc0], al
lea edi, [esi + 0xa34]
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov word [esp + 0x58], 2
mov word [esp + 0x5a], ax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x2c], edi
mov ecx, 7
lea esi, [esp + 0x58]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
lea edi, [ebx + 0xa50]
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov word [esp + 0x58], 2
mov word [esp + 0x5a], ax
mov dword [esp + 0x5c], eax
mov ecx, 7
lea esi, [esp + 0x58]
add ebx, 0xa18
rep movsd dword es:[edi], dword [esi]
push ebx
lea esi, [esp + 0x5c]
mov dword [esp + 0x1c], ebx
call fcn.10015480
mov ecx, esi
call fcn.1001ad40
test al, al
je 0x10092180
xor eax, eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
mov byte [esp + 0x94], al
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xc0], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
movzx eax, word [ebx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x14]
movzx ecx, ax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [edx + 0xa14]
push 0
push eax
sub esp, 0x1c
mov esi, esp
lea edi, [esp + 0x84]
mov dword [esp + 0x48], esp
call fcn.10015370
mov ecx, dword [esp + 0x3c]
lea edx, [esp + 0xa0]
call fcn.10091870
cmp dword [esp + 0x98], 0
je 0x10091f79
cmp word [ebx], 2
jne 0x10091f25
mov ecx, dword [esp + 0x90]
push ecx
jmp 0x10091f2d
mov edx, dword [esp + 0x90]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebx + 2], ax
mov eax, dword [esp + 0x24]
mov esi, dword [eax + 4]
mov edx, dword [esi + 4]
lea ecx, [esp + 0x74]
push ecx
push edx
push esi
call fcn.1009d6a0
mov ecx, dword [esp + 0x24]
mov edi, eax
call fcn.1009d6e0
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
mov eax, dword [esp + 0x94]
push eax
lea ecx, [esp + 0x9c]
push ecx
mov ecx, dword [esp + 0x18]
call fcn.10092f40
call fcn.1001af60
test al, al
je 0x1009203d
xor eax, eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
movzx eax, word [ebx + 2]
push eax
mov dword [esp + 0x5c], 1
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x14]
movzx ecx, ax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [edx + 0xa14]
push 1
push eax
sub esp, 0x1c
mov esi, esp
lea edi, [esp + 0x84]
mov dword [esp + 0x48], esp
call fcn.10015370
mov ecx, dword [esp + 0x3c]
lea edx, [esp + 0xa0]
call fcn.10091870
cmp dword [esp + 0x98], 0
je 0x1009203d
mov ecx, dword [esp + 0x24]
mov esi, dword [ecx + 4]
mov eax, dword [esi + 4]
lea edx, [esp + 0x74]
push edx
push eax
push esi
call fcn.1009d6a0
mov ecx, dword [esp + 0x24]
mov edi, eax
call fcn.1009d6e0
mov ecx, dword [esp + 0x94]
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x9c]
push edx
mov dword [eax], edi
call fcn.10092f40
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x58]
call fcn.10037e30
mov byte [esp + 0xc0], 1
mov esi, dword [esp + 0x5c]
mov edi, dword [esp + 0x60]
cmp esi, edi
jbe 0x10092064
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp esi, edi
lea eax, [esp + 0x58]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], esi
jbe 0x1009207a
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov dword [esp + 0x34], edi
mov edi, edi
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10092090
lea ecx, [esp + 0x58]
cmp eax, ecx
je 0x10092096
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp esi, dword [esp + 0x34]
je 0x10092166
cmp dword [esp + 0x1c], 0
jne 0x100920ad
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edx, dword [esp + 0x1c]
cmp esi, dword [edx + 8]
jb 0x100920bc
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp dword [esi], 1
jne 0x100920fa
mov ecx, esi
call fcn.1001ab90
test al, al
jne 0x100920fa
push esi
call fcn.1001ac80
add esp, 4
test al, al
jne 0x100920fa
movzx eax, word [ebx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov edi, dword [esp + 0x20]
movzx ecx, ax
lea esi, [esp + 0x3c]
call fcn.10015370
mov edi, dword [esp + 0x2c]
jmp 0x1009213c
cmp dword [esi], 0
jne 0x1009214b
mov ecx, esi
call fcn.1001ab90
test al, al
jne 0x1009214b
push esi
call fcn.1001ac80
add esp, 4
test al, al
jne 0x1009214b
movzx eax, word [ebx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov edi, dword [esp + 0x20]
movzx ecx, ax
lea esi, [esp + 0x3c]
call fcn.10015370
mov edi, dword [esp + 0x10]
add edi, 0xa50
mov ecx, 7
lea esi, [esp + 0x3c]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
cmp esi, dword [eax + 8]
jb 0x1009215a
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
add esi, 0x7c
mov dword [esp + 0x20], esi
jmp 0x10092080
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x1009227c
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x1009227c
xor eax, eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
mov byte [esp + 0x94], al
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [ebp + 8]
push ecx
push edx
push eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xcc], 2
mov ecx, dword [eax + 0xa14]
push ecx
sub esp, 0x1c
mov edi, esp
mov ecx, 7
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0xa0]
mov ecx, eax
mov dword [esp + 0x48], esp
call fcn.10091870
cmp dword [esp + 0x98], 0
je 0x1009227c
mov edx, dword [esp + 0x24]
mov esi, dword [edx + 4]
mov ecx, dword [esi + 4]
lea eax, [esp + 0x74]
push eax
push ecx
push esi
call fcn.1009d6a0
mov ecx, dword [esp + 0x24]
mov edi, eax
call fcn.1009d6e0
mov edx, dword [esp + 0x94]
mov ecx, dword [esp + 0x10]
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
push edx
lea eax, [esp + 0x9c]
push eax
call fcn.10092f40
push ebx
lea esi, [esp + 0x40]
call fcn.10015480
cmp dword [esp + 0x3c], 1
mov ecx, 7
mov esi, ebx
jne 0x10092270
mov edi, dword [esp + 0x2c]
jmp 0x1009227a
mov edi, dword [esp + 0x10]
add edi, 0xa50
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0xc0], 0xffffffff
mov esi, dword [esp + 0x9c]
test esi, esi
je 0x100922bc
or edx, 0xffffffff
lea ecx, [esi + 4]
lock xadd dword [ecx], edx
jne 0x100922bc
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
or ecx, 0xffffffff
lea eax, [esi + 8]
lock xadd dword [eax], ecx
jne 0x100922bc
mov edx, dword [esi]
mov eax, dword [edx + 8]
mov ecx, esi
call eax
movzx eax, word [ebx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
push ebx
lea esi, [esp + 0x40]
movzx edi, ax
call fcn.10015480
mov ecx, edi
mov edi, esi
lea esi, [esp + 0x58]
call fcn.10015370
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
mov ecx, esi
add eax, 0xd08
push ecx
push eax
mov dword [esp + 0x34], eax
call fcn.100f0840
mov edx, dword [ebx]
neg edx
sbb edx, edx
test edx, fcn.1009bff0
je 0x100923c1
mov edi, dword [esp + 0x10]
add edi, 0x368
lea esi, [edi + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x10]
cmp eax, dword [edi + 0x30]
push esi
jb 0x10092335
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x100924af
test byte [edi + 0x2c], 0x41
setne byte [esp + 0x2f]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [esp + 0x2b], 0
je 0x100924af
mov ecx, dword [0x101556f4]
mov eax, dword [0x101556f0]
mov esi, dword [esp + 0x18]
mov edx, dword [ebx]
mov dword [esp + 0x80], ecx
mov dword [esp + 0x7c], eax
mov eax, dword [ebx + 4]
mov ecx, 7
lea edi, [esp + 0x84]
mov dword [esp + 0x74], vtable.libtorrent::listen_failed_alert.0
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0xa0], edx
mov dword [esp + 0xa4], eax
lea ecx, [esp + 0x74]
push ecx
mov ecx, dword [esp + 0x14]
add ecx, 0x368
mov dword [esp + 0xc4], 3
call fcn.1000dc40
mov dword [esp + 0xc0], 0xffffffff
jmp 0x100924af
mov eax, dword [esp + 0x10]
movzx edx, word [eax + 0xe26]
mov edi, dword [esp + 0x18]
mov dword [eax + 0xd04], edx
cmp word [edi], 2
movzx eax, word [edi + 2]
push eax
jne 0x100923eb
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
call esi
jmp 0x100923f7
call dword [sym.imp.WS2_32.dll_ntohs]
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
movzx ebx, ax
movzx eax, word [edi + 2]
push eax
call esi
movzx eax, ax
movzx ecx, bx
mov ebx, dword [esp + 0x10]
movzx edx, ax
push ecx
push edx
xor eax, eax
call fcn.100993e0
movzx eax, word [edi + 2]
push eax
call esi
movzx ebx, ax
movzx eax, word [edi + 2]
push eax
call esi
mov ecx, dword [esp + 0x10]
movzx eax, ax
movzx eax, ax
mov dword [esp + 0x18], eax
mov eax, dword [ecx + 0x10f0]
test eax, eax
movzx ebx, bx
je 0x100924ab
mov esi, ecx
mov edi, dword [esi + 0x1104]
cmp edi, 0xffffffff
je 0x10092492
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.100f6130
test al, al
je 0x1009247f
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x38], eax
jne 0x1009247f
cmp dword [esp + 0x30], ebx
jne 0x1009247f
cmp dword [esp + 0x1c], 1
je 0x100924ab
mov ecx, dword [esi + 0x1104]
mov edx, dword [esi + 0x10f0]
push ecx
push edx
call fcn.100f5f10
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x10f0]
push ebx
push eax
push 1
call fcn.100f5ba0
mov dword [esi + 0x1104], eax
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x2c]
movsx edx, byte [ecx + 0x14c]
mov edi, dword [eax + 0x44]
cmp edi, 0xffffffff
mov dword [esp + 0x18], edx
jne 0x100924d1
mov esi, 0x2719
jmp 0x10092505
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea ecx, [esp + 0x1c]
push ecx
push 3
push 0
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
call fcn.1010d600
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
mov dword [ebx], eax
mov dword [ebx + 4], esi
jne 0x1009250f
xor esi, esi
call fcn.1010d600
mov dword [ebx + 4], eax
mov dword [ebx], esi
mov edx, dword [esp + 0x2c]
mov esi, dword [edx + 0xb4]
cmp esi, 0xffffffff
jne 0x10092525
mov esi, 0x2719
jmp 0x10092559
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea eax, [esp + 0x1c]
push eax
push 3
push 0
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
call fcn.1010d600
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
mov dword [ebx], eax
mov dword [ebx + 4], esi
jne 0x10092563
xor esi, esi
call fcn.1010d600
mov dword [ebx + 4], eax
mov dword [ebx], esi
mov dword [ebx], 0
call fcn.1010d600
mov esi, dword [esp + 0x10]
mov ecx, esi
mov dword [ebx + 4], eax
call fcn.10092740
mov ecx, esi
call fcn.100929a0
cmp dword [esi + 0xa74], 0
je 0x10092650
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 4]
mov esi, dword [ecx]
cmp esi, ecx
jne 0x100925a3
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ecx, dword [esi + 0x2c]
mov edx, ebx
add ecx, 4
lea ebx, [esp + 0x58]
call fcn.1001c300
mov edx, dword [esp + 0x14]
cmp dword [edx], 0
jne 0x10092650
cmp word [esp + 0x58], 2
jne 0x100925d0
mov eax, dword [esp + 0x5a]
push eax
jmp 0x100925d5
mov ecx, dword [esp + 0x5a]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
mov ebx, dword [esp + 0x10]
movzx eax, ax
movzx esi, ax
mov eax, dword [ebx + 0x10ec]
test eax, eax
mov dword [esp + 0x1c], esi
je 0x1009261f
mov edi, dword [ebx + 0x10f8]
cmp edi, 0xffffffff
je 0x10092609
mov esi, eax
call fcn.10060fd0
mov esi, dword [esp + 0x1c]
mov eax, dword [ebx + 0x10ec]
push esi
push esi
push 2
push eax
call fcn.100610b0
mov dword [ebx + 0x10f8], eax
mov ecx, dword [ebx + 0x10f0]
test ecx, ecx
je 0x10092650
mov eax, dword [ebx + 0x10fc]
cmp eax, 0xffffffff
je 0x1009263b
push eax
push ecx
call fcn.100f5f10
mov ecx, dword [ebx + 0x10f0]
push esi
push esi
push 2
call fcn.100f5ba0
mov dword [ebx + 0x10fc], eax
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa0]
xor ecx, esp
call fcn.1010defb
mov esp, ebp
pop ebp
ret 8