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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
cmp dword [ebp + 0xc], 0
jne 0x10163301
jmp 0x10163af2
lea eax, [ebp - 0x24]
push eax
call fcn.10197f30
add esp, 4
mov ecx, dword [ebp + 0xc]
movzx edx, word [ecx + 0x74]
mov dword [ebp - 0x14], edx
cmp dword [ebp - 0x14], 0x7b
je 0x1016331f
jmp 0x10163321
jmp 0x10163326
jmp 0x10163af2
mov eax, dword [ebp + 8]
cmp dword [eax + 0x1cc], 0
jne 0x1016336e
mov ecx, dword [0x10405c04]
push ecx
call fcn.103212e2
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x10163369
mov edx, 1
mov eax, 0x10405c78
lock xadd dword [eax], edx
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x44], 0
mov edx, dword [ebp - 4]
mov byte [edx + 0x60], 0
jmp 0x101633ee
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1cc]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
cmp dword [edx + 0x48], 0
je 0x10163394
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x48]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x4c]
mov dword [ecx + 0x4c], eax
jmp 0x101633a3
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x4c]
mov dword [ecx + 0x1d0], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x4c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x48]
mov dword [edx], ecx
xor edx, edx
jne 0x1016337a
or eax, 0xffffffff
mov ecx, 0x10405c90
lock xadd dword [ecx], eax
mov edx, dword [ebp - 4]
mov byte [edx + 0x60], 0
mov eax, 1
mov ecx, 0x10405f54
lock xadd dword [ecx], eax
mov edx, dword [ebp + 8]
mov ax, word [edx + 0x49a]
sub ax, 1
mov ecx, dword [ebp + 8]
mov word [ecx + 0x49a], ax
cmp dword [ebp - 4], 0
jne 0x10163422
mov edx, dword [0x10406108]
and edx, 0x80
je 0x10163419
cmp dword [0x1040613c], 0
je 0x10163419
push str.Gak__cant_get_a_chunk_for_hb_n
call dword [0x1040613c]
add esp, 4
xor eax, eax
jne 0x101633f4
jmp 0x10163af2
mov ecx, dword [ebp - 4]
mov byte [ecx + 0x65], 0
mov edx, dword [ebp - 4]
mov byte [edx], 4
mov eax, dword [ebp - 4]
mov byte [eax + 1], 1
xor ecx, ecx
mov edx, dword [ebp - 4]
mov word [edx + 0x56], cx
mov eax, dword [ebp + 8]
add eax, 0x30
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x30], eax
mov edx, 0x2c
mov eax, dword [ebp - 4]
mov word [eax + 0x58], dx
push 1
push 1
push 1
push 0
mov ecx, dword [ebp - 4]
movzx edx, word [ecx + 0x58]
push edx
call fcn.1017d5d0
add esp, 0x14
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x3c], eax
mov edx, dword [ebp - 4]
cmp dword [edx + 0x3c], 0
jne 0x10163699
mov eax, dword [ebp - 4]
movzx ecx, byte [eax + 0x60]
test ecx, ecx
je 0x101634ac
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 0x5e]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.101990b0
add esp, 0xc
mov eax, dword [ebp - 4]
mov byte [eax + 0x60], 0
cmp dword [ebp + 8], 0
je 0x1016367c
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x44], 0
je 0x101635e1
mov edx, dword [ebp - 4]
cmp dword [edx + 0x44], 0
je 0x101635d7
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x44]
add edx, 0x150
lock xadd dword [edx], eax
cmp eax, 1
jne 0x101635d7
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x44]
cmp dword [ecx + 0x70], 0
je 0x1016355c
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x44]
mov ecx, dword [eax + 0x70]
cmp dword [ecx + 0xc], 1
jg 0x1016351b
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x44]
mov ecx, dword [eax + 0x70]
push ecx
call fcn.101581d0
add esp, 4
jmp 0x1016353a
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x44]
mov ecx, dword [eax + 0x70]
mov edx, dword [ecx + 0xc]
sub edx, 1
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x44]
mov eax, dword [ecx + 0x70]
mov dword [eax + 0xc], edx
xor ecx, ecx
jne 0x1016351b
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x44]
mov dword [eax + 0x70], 0
xor ecx, ecx
jne 0x101634f8
xor edx, edx
jne 0x101634f8
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x44]
mov dword [ecx + 0x70], 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x44]
movzx ecx, byte [eax + 0x1b3]
test ecx, ecx
je 0x10163592
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x44]
mov ecx, dword [eax + 0x90]
push ecx
call fcn.1017e840
add esp, 4
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x44]
mov dword [eax + 0x90], 0
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x44]
mov byte [edx + 0x1b3], 0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x44]
movzx edx, word [ecx + 0x1a4]
and edx, 0xfffffffe
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x44]
mov word [ecx + 0x1a4], dx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x44]
push eax
call fcn.103201db
add esp, 4
or ecx, 0xffffffff
mov edx, 0x10405c74
lock xadd dword [edx], ecx
mov eax, dword [ebp - 4]
mov dword [eax + 0x44], 0
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x49a]
cmp edx, dword [0x10406048]
ja 0x10163600
mov eax, dword [0x10405c90]
cmp eax, dword [0x10406044]
jbe 0x1016361a
mov ecx, dword [ebp - 4]
push ecx
call fcn.103201db
add esp, 4
or edx, 0xffffffff
mov eax, 0x10405c78
lock xadd dword [eax], edx
jmp 0x1016367a
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x48], 0
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1d0]
mov dword [edx + 0x4c], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x1d0]
mov ecx, dword [ebp - 4]
mov dword [eax], ecx
mov edx, dword [ebp - 4]
add edx, 0x48
mov eax, dword [ebp + 8]
mov dword [eax + 0x1d0], edx
xor ecx, ecx
jne 0x1016361a
mov edx, dword [ebp + 8]
mov ax, word [edx + 0x49a]
add ax, 1
mov ecx, dword [ebp + 8]
mov word [ecx + 0x49a], ax
mov edx, 1
mov eax, 0x10405c90
lock xadd dword [eax], edx
jmp 0x10163694
mov ecx, dword [ebp - 4]
push ecx
call fcn.103201db
add esp, 4
or edx, 0xffffffff
mov eax, 0x10405c78
lock xadd dword [eax], edx
jmp 0x10163af2
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x3c]
mov eax, dword [edx + 8]
add eax, 0x20
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x3c]
mov dword [edx + 8], eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ebp - 4]
movzx eax, word [edx + 0x58]
mov dword [ecx + 0xc], eax
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x50], 0
xor edx, edx
mov eax, dword [ebp - 4]
mov word [eax + 0x54], dx
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 0x44], edx
mov eax, 1
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x44]
add edx, 0x150
lock xadd dword [edx], eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ecx + 8]
mov dword [ebp - 8], edx
push 0x2c
push 0
mov eax, dword [ebp - 8]
push eax
call fcn.103170a0
add esp, 0xc
mov ecx, dword [ebp - 8]
mov byte [ecx], 4
mov edx, dword [ebp - 8]
mov byte [edx + 1], 0
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 0x58]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [ebp - 8]
mov word [edx + 2], ax
push 1
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp - 8]
mov word [ecx + 4], ax
push 0x28
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [ebp - 8]
mov word [edx + 6], ax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x24]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x20]
mov dword [edx + 0xc], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov al, byte [edx + 0x74]
mov byte [ecx + 0x18], al
mov ecx, dword [ebp + 0xc]
movzx edx, word [ecx + 0x74]
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x18], 0x7b
je 0x1016377b
jmp 0x10163784
mov eax, dword [ebp - 8]
mov byte [eax + 0x19], 8
jmp 0x1016378b
mov ecx, dword [ebp - 8]
mov byte [ecx + 0x19], 0
mov edx, dword [ebp + 0xc]
movzx eax, word [edx + 0x1a4]
and eax, 0x200
je 0x101637f8
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
add edx, 0xd8
push edx
call fcn.10173180
add esp, 4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 0x10], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0xc]
mov dword [edx + 0x184], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
add edx, 0xd8
push edx
call fcn.10173180
add esp, 4
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
mov dword [eax + 0x14], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x10]
mov dword [edx + 0x188], eax
jmp 0x10163826
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x10], 0
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x184], 0
mov eax, dword [ebp - 8]
mov dword [eax + 0x14], 0
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x188], 0
mov edx, dword [ebp + 0xc]
movzx eax, word [edx + 0x74]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0x7b
je 0x10163838
jmp 0x10163855
push 4
mov ecx, dword [ebp + 0xc]
add ecx, 0x78
push ecx
mov edx, dword [ebp - 8]
add edx, 0x1c
push edx
call fcn.10316b20
add esp, 0xc
jmp 0x10163a8b
mov eax, dword [ebp - 4]
cmp dword [eax + 0x3c], 0
je 0x10163877
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x3c]
push edx
call fcn.10156940
add esp, 4
mov eax, dword [ebp - 4]
mov dword [eax + 0x3c], 0
mov ecx, dword [ebp - 4]
movzx edx, byte [ecx + 0x60]
test edx, edx
je 0x101638a1
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 4]
movzx edx, word [ecx + 0x5e]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.101990b0
add esp, 0xc
mov ecx, dword [ebp - 4]
mov byte [ecx + 0x60], 0
cmp dword [ebp + 8], 0
je 0x10163a71
mov edx, dword [ebp - 4]
cmp dword [edx + 0x44], 0
je 0x101639d5
mov eax, dword [ebp - 4]
cmp dword [eax + 0x44], 0
je 0x101639cb
or ecx, 0xffffffff
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x44]
add eax, 0x150
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x101639cb
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x44]
cmp dword [edx + 0x70], 0
je 0x10163950
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x44]
mov edx, dword [ecx + 0x70]
cmp dword [edx + 0xc], 1
jg 0x1016390f
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x44]
mov edx, dword [ecx + 0x70]
push edx
call fcn.101581d0
add esp, 4
jmp 0x1016392e
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x44]
mov edx, dword [ecx + 0x70]
mov eax, dword [edx + 0xc]
sub eax, 1
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x44]
mov ecx, dword [edx + 0x70]
mov dword [ecx + 0xc], eax
xor edx, edx
jne 0x1016390f
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x44]
mov dword [ecx + 0x70], 0
xor edx, edx
jne 0x101638ec
xor eax, eax
jne 0x101638ec
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x44]
mov dword [edx + 0x70], 0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x44]
movzx edx, byte [ecx + 0x1b3]
test edx, edx
je 0x10163986
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x44]
mov edx, dword [ecx + 0x90]
push edx
call fcn.1017e840
add esp, 4
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x44]
mov dword [ecx + 0x90], 0
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x44]
mov byte [eax + 0x1b3], 0
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x44]
movzx eax, word [edx + 0x1a4]
and eax, 0xfffffffe
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x44]
mov word [edx + 0x1a4], ax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x44]
push ecx
call fcn.103201db
add esp, 4
or edx, 0xffffffff
mov eax, 0x10405c74
lock xadd dword [eax], edx
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x44], 0
mov edx, dword [ebp + 8]
movzx eax, word [edx + 0x49a]
cmp eax, dword [0x10406048]
ja 0x101639f5
mov ecx, dword [0x10405c90]
cmp ecx, dword [0x10406044]
jbe 0x10163a0f
mov edx, dword [ebp - 4]
push edx
call fcn.103201db
add esp, 4
or eax, 0xffffffff
mov ecx, 0x10405c78
lock xadd dword [ecx], eax
jmp 0x10163a6f
mov edx, dword [ebp - 4]
mov dword [edx + 0x48], 0
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x1d0]
mov dword [eax + 0x4c], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1d0]
mov edx, dword [ebp - 4]
mov dword [ecx], edx
mov eax, dword [ebp - 4]
add eax, 0x48
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x1d0], eax
xor edx, edx
jne 0x10163a0f
mov eax, dword [ebp + 8]
mov cx, word [eax + 0x49a]
add cx, 1
mov edx, dword [ebp + 8]
mov word [edx + 0x49a], cx
mov eax, 1
mov ecx, 0x10405c90
lock xadd dword [ecx], eax
jmp 0x10163a89
mov edx, dword [ebp - 4]
push edx
call fcn.103201db
add esp, 4
or eax, 0xffffffff
mov ecx, 0x10405c78
lock xadd dword [ecx], eax
jmp 0x10163af2
mov edx, dword [ebp + 0xc]
mov byte [edx + 0x1b1], 0
mov eax, dword [ebp - 4]
mov dword [eax + 0x48], 0
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x1d8]
mov dword [ecx + 0x4c], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x1d8]
mov eax, dword [ebp - 4]
mov dword [edx], eax
mov ecx, dword [ebp - 4]
add ecx, 0x48
mov edx, dword [ebp + 8]
mov dword [edx + 0x1d8], ecx
xor eax, eax
jne 0x10163a95
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x36c]
add edx, 1
mov eax, dword [ebp + 8]
mov dword [eax + 0x36c], edx
mov ecx, 1
mov edx, 0x10405e0c
lock xadd dword [edx], ecx
mov esp, ebp
pop ebp
ret