Function at 0x100406b0
Capabilities:
Terminate thread

Disassembly:
push ebp
lea ebp, [esp - 0x40]
sub esp, 0x40
push 0xffffffffffffffff
push 0x1016cefd
mov eax, dword fs:[0]
push eax
sub esp, 0xf0
mov eax, dword [0x101b01e4]
xor eax, ebp
mov dword [ebp + 0x3c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp + 8], edi
mov dword [edi], 0x10185af4
push 0xffffff
lea ecx, [edi + 0x28]
mov dword [ebp - 4], 3
mov byte [edi + 0x24], 0
call fcn.10015fb0
xor ebx, ebx
cmp dword [edi + 0x1c], ebx
je 0x10040730
mov al, byte [edi + 0x25]
test al, al
jne 0x10040723
mov ecx, dword [edi + 0x1c]
push 1
push ecx
call dword [sym.imp.KERNEL32.DLL_TerminateThread]
mov edx, dword [edi + 0x1c]
push edx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [edi + 0x1c], ebx
push 0xffffffffffffffff
push ebx
lea esi, [edi + 0x58]
push esi
lea ecx, [ebp + 0x20]
mov dword [ebp + 0x38], 0xf
mov dword [ebp + 0x34], ebx
mov byte [ebp + 0x24], bl
call fcn.10001ec0
push 4
push str..bak
lea ecx, [ebp + 0x20]
mov byte [ebp - 4], 4
call fcn.100020b0
push 1
lea eax, [ebp + 0x20]
push eax
push esi
mov byte [ebp - 4], 5
call fcn.100ec29a
add esp, 0xc
push esi
call fcn.100ec22e
add esp, 4
cmp dword [esi + 0x18], 0x10
jb 0x10040786
mov eax, dword [esi + 4]
jmp 0x10040789
lea eax, [esi + 4]
push 1
push 0x40
push 2
push eax
lea ecx, [ebp - 0x98]
call fcn.10040570
cmp dword [ebp - 0x48], ebx
mov byte [ebp - 4], 6
je 0x10040b05
mov eax, dword [edi + 0x14]
mov ebx, dword [eax]
lea esi, [edi + 0x10]
mov dword [ebp + 0x18], ebx
mov dword [ebp + 0x14], esi
test esi, esi
mov ecx, dword [edi + 0x14]
lea eax, [edi + 0x10]
mov dword [ebp - 0xa4], ecx
je 0x100407ca
cmp esi, eax
je 0x100407cf
call fcn.10149775
cmp ebx, dword [ebp - 0xa4]
je 0x1004094f
test esi, esi
jne 0x100407e4
call fcn.10149775
cmp ebx, dword [esi + 4]
jne 0x100407ee
call fcn.10149775
lea eax, [ebx + 0xc]
push eax
lea edx, [ebp + 0xc]
lea ebx, [edi + 4]
push edx
mov ecx, ebx
mov dword [ebp + 0x1c], eax
call fcn.1003ad80
mov eax, dword [ebx + 4]
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x10040817
cmp eax, ebx
je 0x1004081c
call fcn.10149775
mov esi, dword [ebp + 0x10]
cmp esi, dword [ebp - 0x9c]
jne 0x100408da
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
cmp edx, dword [ecx + 4]
jne 0x1004083b
call fcn.10149775
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
cmp eax, dword [ecx + 4]
jne 0x1004084b
call fcn.10149775
mov eax, dword [ebp + 0x1c]
lea edx, [eax + 0x1c]
push edx
push eax
lea ecx, [ebp - 0xe0]
call fcn.1003aeb0
push eax
lea eax, [ebp - 0xfc]
push eax
mov ecx, ebx
mov byte [ebp - 4], 7
call fcn.1003ba30
mov esi, 0x10
cmp dword [ebp - 0xac], esi
mov byte [ebp - 4], 6
jb 0x10040891
mov ecx, dword [ebp - 0xc0]
push ecx
call fcn.10149646
add esp, 4
cmp dword [ebp - 0xc8], esi
mov dword [ebp - 0xac], 0xf
mov dword [ebp - 0xb0], 0
mov byte [ebp - 0xc0], 0
jb 0x1004093c
mov edx, dword [ebp - 0xdc]
push edx
call fcn.10149646
add esp, 4
lea ecx, [ebp + 0x14]
call fcn.10085870
mov ebx, dword [ebp + 0x18]
mov esi, dword [ebp + 0x14]
jmp 0x100407b6
cmp dword [ebp + 0xc], 0
jne 0x100408e5
call fcn.10149775
mov eax, dword [ebp + 0xc]
cmp esi, dword [eax + 4]
jne 0x100408f2
call fcn.10149775
cmp dword [esi + 0x40], 0x10
jb 0x100408fd
mov eax, dword [esi + 0x2c]
jmp 0x10040900
lea eax, [esi + 0x2c]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x1004093c
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
cmp ecx, dword [edx + 4]
jne 0x1004091c
call fcn.10149775
mov eax, dword [ebp + 0xc]
cmp esi, dword [eax + 4]
jne 0x10040929
call fcn.10149775
mov edx, dword [ebp + 0x1c]
push 0xffffffffffffffff
push 0
add edx, 0x1c
lea ecx, [esi + 0x28]
push edx
call fcn.10001ec0
lea ecx, [ebp + 0x14]
call fcn.10085870
mov ebx, dword [ebp + 0x18]
mov esi, dword [ebp + 0x14]
jmp 0x100407b6
mov eax, dword [edi + 8]
mov ebx, dword [eax]
lea esi, [edi + 4]
mov dword [ebp + 0x1c], 0
mov dword [ebp + 4], ebx
mov dword [ebp], esi
test esi, esi
mov ecx, dword [edi + 8]
lea eax, [edi + 4]
mov dword [ebp - 0x9c], ecx
je 0x10040978
cmp esi, eax
je 0x1004097d
call fcn.10149775
cmp ebx, dword [ebp - 0x9c]
je 0x10040a23
test esi, esi
jne 0x10040992
call fcn.10149775
cmp ebx, dword [esi + 4]
jne 0x1004099c
call fcn.10149775
cmp dword [ebx + 0x40], 0x10
lea eax, [ebx + 0xc]
mov dword [ebp + 0x18], eax
jb 0x100409ad
mov eax, dword [eax + 0x20]
jmp 0x100409b0
add eax, 0x20
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x10040a10
add dword [ebp + 0x1c], 1
cmp ebx, dword [esi + 4]
jne 0x100409d4
call fcn.10149775
cmp ebx, dword [esi + 4]
jne 0x100409d4
call fcn.10149775
mov esi, dword [ebp + 0x18]
lea edx, [ebp - 0x98]
push esi
push edx
call fcn.10011f80
add esp, 8
push 0x10185ae8
push eax
call fcn.10011d70
add esp, 8
add esi, 0x1c
push esi
push eax
call fcn.10011f80
add esp, 8
push 0x10185ae4
push eax
call fcn.10011d70
add esp, 8
lea ecx, [ebp]
call fcn.10085870
mov ebx, dword [ebp + 4]
mov esi, dword [ebp]
jmp 0x10040964
cmp dword [ebp - 0x48], 0
lea esi, [ebp - 0x94]
jne 0x10040a35
xor esi, esi
xor ebx, ebx
jmp 0x10040a5a
lea ecx, [ebp - 0x94]
call fcn.1003e8a0
xor ebx, ebx
test al, al
jne 0x10040a48
xor esi, esi
mov eax, dword [ebp - 0x48]
push eax
call fcn.1014acff
add esp, 4
test eax, eax
je 0x10040a5a
xor esi, esi
cmp esi, ebx
lea ecx, [ebp - 0x8c]
mov dword [ebp - 0x84], ecx
lea edx, [ebp - 0x88]
lea eax, [ebp - 0x7c]
lea ecx, [ebp - 0x78]
mov dword [ebp - 0x80], edx
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], ecx
mov ecx, dword [0x101b16d4]
lea edx, [ebp - 0x6c]
lea eax, [ebp - 0x68]
mov byte [ebp - 0x4c], 0
mov byte [ebp - 0x53], 0
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x88], ebx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x58], ebx
jne 0x10040ae3
mov edx, dword [ebp - 0x98]
mov ecx, dword [edx + 4]
mov eax, dword [ebp + ecx - 0x90]
lea ecx, [ebp + ecx - 0x98]
or eax, 2
cmp dword [ecx + 0x28], ebx
jne 0x10040adc
or eax, 4
push ebx
push eax
call fcn.10007dc0
mov eax, dword [ebp + 0x1c]
cmp eax, dword [edi + 0x18]
jb 0x10040af9
lea ecx, [ebp + 0x20]
push ecx
call fcn.100ec22e
add esp, 4
jmp 0x10040b14
push 1
lea edx, [edi + 0x58]
push edx
lea eax, [ebp + 0x20]
push eax
jmp 0x10040b0c
push 1
push esi
lea ecx, [ebp + 0x20]
push ecx
call fcn.100ec29a
add esp, 0xc
mov eax, dword [ebp - 0x98]
mov ecx, dword [eax + 4]
lea edx, [ebp - 0x44]
xor esi, esi
mov dword [ebp + 0x18], edx
mov dword [ebp + ecx - 0x98], 0x10185a9c
lea edx, [ebp - 0x94]
mov dword [ebp + 0x1c], edx
mov dword [ebp - 0x94], 0x10185a64
cmp byte [ebp - 0x4c], 0
mov byte [ebp - 4], 9
je 0x10040bc1
cmp dword [ebp - 0x48], esi
je 0x10040b65
mov ecx, edx
call fcn.1003e8a0
mov eax, dword [ebp - 0x48]
push eax
call fcn.1014acff
add esp, 4
lea ecx, [ebp - 0x8c]
mov dword [ebp - 0x84], ecx
lea edx, [ebp - 0x88]
lea eax, [ebp - 0x7c]
lea ecx, [ebp - 0x78]
mov dword [ebp - 0x80], edx
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], ecx
mov ecx, dword [0x101b16d4]
lea edx, [ebp - 0x6c]
lea eax, [ebp - 0x68]
mov byte [ebp - 0x4c], 0
mov byte [ebp - 0x53], 0
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x88], esi
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x8c], esi
mov dword [ebp - 0x7c], esi
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x58], esi
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 8
call fcn.10006850
mov edx, dword [ebp - 0x98]
mov eax, dword [edx + 4]
lea ecx, [ebp - 0x44]
mov dword [ebp + eax - 0x98], 0x10184634
push ecx
mov byte [ebp - 4], 5
mov dword [ebp - 0x44], 0x10184638
call fcn.10148c29
add esp, 4
mov dword [ebp - 4], 4
jmp 0x10040c29
xor ebx, ebx
cmp dword [ebp + 0x38], 0x10
jb 0x10040c3d
mov ecx, dword [ebp + 0x24]
push ecx
call fcn.10149646
add esp, 4
cmp dword [edi + 0x70], 0x10
mov esi, 0xf
mov dword [ebp + 0x38], esi
mov dword [ebp + 0x34], ebx
mov byte [ebp + 0x24], 0
jb 0x10040c5e
mov eax, dword [edi + 0x5c]
push eax
call fcn.10149646
add esp, 4
mov dword [edi + 0x70], esi
mov dword [edi + 0x6c], ebx
mov byte [edi + 0x5c], 0
mov edx, dword [edi + 0x4c]
push edx
mov dword [edi + 0x48], 0x101850b4
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [edi + 0x30]
mov esi, 0x10186684
mov dword [edi + 0x48], esi
push eax
mov dword [edi + 0x2c], 0x1018458c
call dword [sym.imp.KERNEL32.DLL_DeleteCriticalSection]
mov dword [edi + 0x2c], esi
mov eax, dword [edi + 0x14]
mov ecx, dword [eax]
lea esi, [edi + 0x10]
push eax
push esi
push ecx
push esi
lea ecx, [ebp - 0xf0]
push ecx
mov ecx, esi
mov byte [ebp - 4], 0
call fcn.1008fbe0
mov eax, dword [esi + 4]
push eax
call fcn.10149646
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov eax, dword [edi + 8]
mov ecx, dword [eax]
add esp, 4
lea esi, [edi + 4]
push eax
push esi
push ecx
push esi
lea edx, [ebp - 0xe8]
push edx
mov ecx, esi
mov dword [ebp - 4], 0xffffffff
call fcn.1008fbe0
mov eax, dword [esi + 4]
push eax
call fcn.10149646
add esp, 4
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x3c]
xor ecx, ebp
call fcn.10149c5e
add ebp, 0x40
mov esp, ebp
pop ebp
ret