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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x528173
mov eax, dword fs:[0]
push eax
sub esp, 0xe8
mov eax, dword [0x55609c]
xor eax, esp
mov dword [esp + 0xe0], eax
push ebx
push esi
push edi
mov eax, dword [0x55609c]
xor eax, esp
push eax
lea eax, [esp + 0xf8]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x10], ebx
mov edi, edx
add ebx, 0xa84
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], ebx
jmp 0x4812e0
mov eax, dword [ebx + 4]
mov esi, dword [eax]
mov dword [esp + 0x8c], eax
lea esp, [esp]
cmp ebx, ebx
je 0x4812fa
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp esi, dword [esp + 0x8c]
je 0x481338
cmp esi, dword [ebx + 4]
jne 0x48130e
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [esi + 0x2c]
lea ecx, [eax + 4]
mov eax, dword [eax]
push ecx
lea edx, [esp + 0x94]
push edx
add eax, 0x14
mov ecx, edi
call fcn.00437ee0
cmp esi, dword [ebx + 4]
jne 0x481334
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov esi, dword [esi]
jmp 0x4812f0
call fcn.0048a3c0
mov esi, dword [esp + 0x10]
mov byte [esi + 0xcd8], 0
mov dword [edi], 0
call fcn.005147f0
mov dword [edi + 4], eax
cmp byte [esi + 0xbb8], 0
jne 0x481d77
mov ebx, dword [esp + 0x10]
xor eax, eax
mov edi, esi
add edi, 0xa4c
mov dword [esp + 0x50], eax
mov edx, 2
mov dword [esp + 0x54], eax
mov dword [esp + 0x18], edi
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 word [esp + 0x50], dx
mov word [esp + 0x52], ax
mov dword [esp + 0x54], eax
mov ecx, 7
lea esi, [esp + 0x50]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
lea edi, [ebx + 0xa68]
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 word [esp + 0x6c], dx
mov word [esp + 0x6e], ax
mov dword [esp + 0x70], eax
mov ecx, 7
lea esi, [esp + 0x6c]
add ebx, 0xa30
rep movsd dword es:[edi], dword [esi]
push ebx
lea esi, [esp + 0x9c]
mov dword [esp + 0x38], ebx
call fcn.00439710
mov ecx, esi
call fcn.004d21d0
test al, al
mov byte [esp + 0xd4], 0
je 0x48179d
xor eax, eax
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], eax
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc8], eax
mov dword [esp + 0xcc], eax
mov dword [esp + 0xd0], eax
mov dword [esp + 0xd8], eax
mov dword [esp + 0xdc], eax
mov dword [esp + 0x100], eax
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
mov dword [esp + 0xb0], eax
movzx eax, word [ebx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [ebp + 8]
movzx ecx, ax
mov eax, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
push edx
push 0
add eax, 0xa2c
push eax
sub esp, 0x1c
mov esi, esp
lea edi, [esp + 0xc4]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x48], esp
call fcn.00439600
mov ecx, dword [esp + 0x3c]
lea edx, [esp + 0xe0]
call fcn.00480da0
cmp dword [esp + 0xd8], 0
je 0x481542
cmp word [ebx], 2
jne 0x481504
mov eax, dword [esp + 0xd0]
push eax
jmp 0x48150c
mov ecx, dword [esp + 0xd0]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [esp + 0x20]
mov word [ebx + 2], ax
mov esi, dword [edx + 4]
mov ecx, dword [esi + 4]
lea eax, [esp + 0xb4]
push eax
push ecx
push esi
call fcn.0048b350
mov ecx, dword [esp + 0x20]
mov edi, eax
call fcn.0048b390
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
call fcn.004d23f0
test al, al
je 0x4815ff
xor eax, eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
mov dword [esp + 0xb0], eax
movzx eax, word [ebx + 2]
push eax
mov dword [esp + 0x9c], 1
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x34]
movzx ecx, ax
mov eax, dword [ebp + 8]
push eax
push 1
push edx
sub esp, 0x1c
mov esi, esp
lea edi, [esp + 0xc4]
mov dword [esp + 0x48], esp
call fcn.00439600
mov ecx, dword [esp + 0x3c]
lea edx, [esp + 0xe0]
call fcn.00480da0
cmp dword [esp + 0xd8], 0
je 0x4815ff
mov eax, dword [esp + 0x20]
mov esi, dword [eax + 4]
mov edx, dword [esi + 4]
lea ecx, [esp + 0xb4]
push ecx
push edx
push esi
call fcn.0048b350
mov ecx, dword [esp + 0x20]
mov edi, eax
call fcn.0048b390
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
mov dword [eax], edi
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x38]
call fcn.004ff660
mov byte [esp + 0x100], 1
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x40]
cmp esi, edi
jbe 0x481626
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp esi, edi
lea eax, [esp + 0x38]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], esi
jbe 0x48163c
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov dword [esp + 0x4c], edi
mov eax, dword [esp + 0x28]
xor edi, edi
cmp eax, edi
je 0x481652
lea ecx, [esp + 0x38]
cmp eax, ecx
je 0x481658
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp esi, dword [esp + 0x4c]
je 0x48172f
cmp dword [esp + 0x28], edi
jne 0x48166e
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edx, dword [esp + 0x28]
cmp esi, dword [edx + 8]
jb 0x48167d
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp dword [esi], 1
jne 0x4816be
mov ecx, esi
call fcn.004d2000
test al, al
jne 0x4816be
push esi
call fcn.004d2110
add esp, 4
test al, al
jne 0x4816be
movzx eax, word [ebx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov edi, dword [esp + 0x2c]
movzx ecx, ax
lea esi, [esp + 0x98]
call fcn.00439600
mov edi, dword [esp + 0x18]
jmp 0x481702
cmp dword [esi], edi
jne 0x481714
mov ecx, esi
call fcn.004d2000
test al, al
jne 0x481714
push esi
call fcn.004d2110
add esp, 4
test al, al
jne 0x481714
movzx eax, word [ebx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov edi, dword [esp + 0x2c]
movzx ecx, ax
lea esi, [esp + 0x98]
call fcn.00439600
mov edi, dword [esp + 0x10]
add edi, 0xa68
mov ecx, 7
lea esi, [esp + 0x98]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
cmp esi, dword [eax + 8]
jb 0x481723
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
add esi, 0x7c
mov dword [esp + 0x2c], esi
jmp 0x481640
mov eax, dword [esp + 0x3c]
cmp eax, edi
je 0x481740
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [esp + 0x100], 0xffffffff
mov esi, dword [esp + 0xdc]
cmp esi, edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
je 0x4818cf
lea ecx, [esi + 4]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x4818cf
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
lea eax, [esi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x4818cf
mov edx, dword [esi]
mov eax, dword [edx + 8]
mov ecx, esi
call eax
jmp 0x4818cf
xor eax, eax
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], eax
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc8], eax
mov dword [esp + 0xcc], eax
mov dword [esp + 0xd0], eax
mov dword [esp + 0xd8], eax
mov dword [esp + 0xdc], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [ebp + 8]
push ecx
push edx
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [eax + 0xa2c]
push ecx
mov dword [esp + 0x40], ecx
sub esp, 0x1c
mov dword [esp + 0x12c], 2
mov edi, esp
mov ecx, 7
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0xe0]
mov ecx, eax
mov dword [esp + 0x48], esp
call fcn.00480da0
cmp dword [esp + 0xd8], 0
je 0x48188f
mov eax, dword [esp + 0x20]
mov esi, dword [eax + 4]
mov edx, dword [esi + 4]
lea ecx, [esp + 0xb4]
push ecx
push edx
push esi
call fcn.0048b350
mov ecx, dword [esp + 0x20]
mov edi, eax
call fcn.0048b390
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
push ebx
lea esi, [esp + 0x9c]
mov dword [eax], edi
call fcn.00439710
cmp dword [esp + 0x98], 1
mov ecx, 7
mov esi, ebx
jne 0x481883
mov edi, dword [esp + 0x18]
jmp 0x48188d
mov edi, dword [esp + 0x10]
add edi, 0xa68
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x100], 0xffffffff
mov esi, dword [esp + 0xdc]
test esi, esi
je 0x4818cf
lea eax, [esi + 4]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x4818cf
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
lea ecx, [esi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x4818cf
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov ecx, esi
call edx
movzx eax, word [ebx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
push ebx
lea esi, [esp + 0x9c]
movzx edi, ax
call fcn.00439710
mov ecx, edi
mov edi, esi
lea esi, [esp + 0xb4]
call fcn.00439600
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
mov eax, esi
push eax
add ecx, 0xd20
push ecx
call fcn.004f9120
mov edx, ebx
mov eax, dword [edx]
neg eax
sbb eax, eax
test eax, fcn.004b2590
je 0x481a1d
mov edi, dword [esp + 0x30]
cmp dword [edi], 0
jle 0x48195e
mov esi, dword [esp + 0x34]
movzx eax, word [esi + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
add eax, 1
movzx eax, ax
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 2], ax
add dword [edi], 0xffffffff
mov edi, ebx
mov ebx, dword [esp + 0x20]
jmp 0x4812e0
mov ebx, dword [esp + 0x10]
add ebx, 0x380
lea esi, [ebx + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 0x10]
cmp eax, dword [ebx + 0x30]
push esi
jb 0x481986
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x481b85
test byte [ebx + 0x2c], 0x41
setne byte [esp + 0x2b]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [esp + 0x27], 0
je 0x481b85
mov ecx, dword [0x55dcc8]
mov esi, dword [esp + 0x10]
mov edx, dword [0x55dccc]
mov dword [esp + 0xbc], ecx
add esi, 0xa30
mov ecx, 7
lea edi, [esp + 0xc4]
mov dword [esp + 0xc0], edx
mov dword [esp + 0xb4], vtable.libtorrent::listen_failed_alert.0
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x14]
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [esp + 0xe0], eax
mov dword [esp + 0xe4], ecx
lea edx, [esp + 0xb4]
push edx
push ebx
mov dword [esp + 0x108], 3
call fcn.004cd100
mov dword [esp + 0x100], 0xffffffff
jmp 0x481b89
mov ebx, dword [esp + 0x10]
movzx eax, word [ebx + 0xe3e]
mov dword [ebx + 0xd1c], eax
cmp word [ebx + 0xa30], 2
movzx eax, word [ebx + 0xa32]
push eax
jne 0x481a4a
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
call esi
jmp 0x481a56
call dword [sym.imp.WS2_32.dll_ntohs]
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
movzx eax, word [ebx + 0xa32]
push eax
call esi
movzx eax, ax
movzx ecx, di
mov edi, dword [ebx + 0x10d4]
test edi, edi
movzx edx, ax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x30], edx
je 0x481af1
mov eax, dword [ebx + 0x10e8]
cmp eax, 0xffffffff
je 0x481ad3
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x3c]
push ecx
call fcn.004f4730
test al, al
je 0x481abc
mov edx, dword [esp + 0x30]
cmp dword [esp + 0x34], edx
jne 0x481abc
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x28], eax
jne 0x481abc
cmp dword [esp + 0x1c], 1
je 0x481af1
mov edi, dword [ebx + 0x10e8]
mov esi, dword [ebx + 0x10d4]
call fcn.004f4920
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x30]
mov eax, dword [ebx + 0x10d4]
push ecx
push edx
push 1
push eax
call fcn.004f4a00
mov dword [ebx + 0x10e8], eax
movzx eax, word [ebx + 0xa32]
push eax
call esi
movzx edi, ax
movzx eax, word [ebx + 0xa32]
push eax
call esi
movzx eax, ax
movzx eax, ax
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x10d8]
test eax, eax
movzx esi, di
je 0x481b85
mov edi, dword [ebx + 0x10ec]
cmp edi, 0xffffffff
je 0x481b6c
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x24]
push ecx
call fcn.004e92c0
test al, al
je 0x481b59
mov edx, dword [esp + 0x18]
cmp dword [esp + 0x1c], edx
jne 0x481b59
cmp dword [esp + 0x28], esi
jne 0x481b59
cmp dword [esp + 0x34], 1
je 0x481b85
mov eax, dword [ebx + 0x10ec]
mov ecx, dword [ebx + 0x10d8]
push eax
push ecx
call fcn.004e90a0
mov edx, dword [esp + 0x18]
mov ecx, dword [ebx + 0x10d8]
push esi
push edx
push 1
call fcn.004e8d30
mov dword [ebx + 0x10ec], eax
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
movsx ecx, byte [eax + 0x164]
mov edi, dword [eax + 0xd64]
cmp edi, 0xffffffff
mov dword [esp + 0x18], ecx
jne 0x481baa
mov edi, 0x2719
jmp 0x481bdc
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 4
lea edx, [esp + 0x1c]
push edx
push 3
push 0
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
call fcn.005147f0
mov ebx, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
mov dword [esi], eax
mov dword [esi + 4], ebx
jne 0x481be6
call fcn.005147f0
mov dword [esi + 4], eax
mov dword [esi], edi
mov eax, dword [esp + 0x10]
mov edi, dword [eax + 0xdd4]
cmp edi, 0xffffffff
jne 0x481bfc
mov edi, 0x2719
jmp 0x481c2e
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.005147f0
mov ebx, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test edi, edi
mov dword [esi], eax
mov dword [esi + 4], ebx
jne 0x481c38
call fcn.005147f0
mov dword [esi + 4], eax
mov dword [esi], edi
mov dword [esi], 0
call fcn.005147f0
mov edi, dword [esp + 0x20]
mov dword [esi + 4], eax
mov edx, dword [edi + 4]
mov esi, dword [edx]
mov eax, edx
mov dword [esp + 0x4c], eax
cmp edi, edi
mov ebx, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
je 0x481c61
call ebx
cmp esi, dword [esp + 0x4c]
je 0x481c92
cmp esi, dword [edi + 4]
jne 0x481c75
call ebx
cmp esi, dword [edi + 4]
jne 0x481c75
call ebx
movzx ecx, byte [esi + 0x28]
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esi + 0x2c]
push edx
call fcn.00482720
cmp esi, dword [edi + 4]
jne 0x481c8e
call ebx
mov esi, dword [esi]
jmp 0x481c55
mov esi, dword [esp + 0x10]
mov ecx, esi
call fcn.00481e60
mov ecx, esi
call fcn.00482100
cmp dword [esi + 0xa8c], 0
je 0x481d77
mov eax, dword [edi + 4]
mov esi, dword [eax]
cmp esi, eax
jne 0x481cbc
call ebx
mov ecx, dword [esi + 0x2c]
mov edx, dword [esp + 0x14]
add ecx, 4
lea ebx, [esp + 0x98]
call fcn.0048af90
mov ecx, dword [esp + 0x14]
cmp dword [ecx], 0
jne 0x481d77
cmp word [esp + 0x98], 2
jne 0x481cf4
mov edx, dword [esp + 0x9a]
push edx
jmp 0x481cfc
mov eax, dword [esp + 0x9a]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ebx, dword [esp + 0x10]
movzx eax, ax
movzx esi, ax
mov eax, dword [ebx + 0x10d4]
test eax, eax
mov dword [esp + 0x1c], esi
je 0x481d46
mov edi, dword [ebx + 0x10e0]
cmp edi, 0xffffffff
je 0x481d30
mov esi, eax
call fcn.004f4920
mov esi, dword [esp + 0x1c]
mov eax, dword [ebx + 0x10d4]
push esi
push esi
push 2
push eax
call fcn.004f4a00
mov dword [ebx + 0x10e0], eax
mov ecx, dword [ebx + 0x10d8]
test ecx, ecx
je 0x481d77
mov eax, dword [ebx + 0x10e4]
cmp eax, 0xffffffff
je 0x481d62
push eax
push ecx
call fcn.004e90a0
mov ecx, dword [ebx + 0x10d8]
push esi
push esi
push 2
call fcn.004e8d30
mov dword [ebx + 0x10e4], eax
mov ecx, dword [esp + 0xf8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe0]
xor ecx, esp
call fcn.00515015
mov esp, ebp
pop ebp
ret 4