Function at 0x100d82c0
Capabilities:
Check for time delay via gettickcount
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x48
mov eax, dword [0x102ac760]
xor eax, esp
mov dword [esp + 0x44], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x7c]
push edi
push 1
push 1
xor ebx, ebx
push ebx
push 1
push 1
push ebx
push 0xbb8
push ebx
push str.wait_for_device
mov dword [esp + 0x50], esi
call fcn.100d5700
add esp, 0x24
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0xffffffffffffffff
mov dword [esp + 0x38], eax
push ebx
xor eax, eax
push 0x102addf0
lea ecx, [esp + 0x44]
mov dword [esp + 0x5c], 7
mov dword [esp + 0x58], ebx
mov word [esp + 0x48], ax
call fcn.10004580
push 4
mov byte [0x102b194c], bl
call fcn.100b2134
add esp, 4
cmp eax, ebx
je 0x100d8347
lea ecx, [esp + 0x14]
mov dword [eax], ecx
mov dword [esp + 0x14], eax
jmp 0x100d834b
mov dword [esp + 0x14], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
cmp esi, ebx
je 0x100d8364
cmp byte [esi], 1
je 0x100d8696
push 1
lea edx, [esp + 0x18]
push 1
push edx
call fcn.100d7d90
mov esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
add esp, 0xc
cmp esi, eax
jbe 0x100d838a
call fcn.100b2342
mov eax, dword [esp + 0x24]
mov ebp, dword [esp + 0x14]
mov edi, esi
mov esi, eax
cmp dword [esp + 0x20], eax
jbe 0x100d839d
call fcn.100b2342
cmp ebp, ebx
je 0x100d83a7
cmp ebp, dword [esp + 0x14]
je 0x100d83ac
call fcn.100b2342
cmp edi, esi
je 0x100d8546
cmp ebp, ebx
jne 0x100d8408
call fcn.100b2342
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x100d83c9
call fcn.100b2342
mov eax, dword [edi + 4]
push str.offline
push eax
call fcn.100b375b
add esp, 8
test eax, eax
jne 0x100d840d
push ebx
push 0xbb8
push ebx
push str.kill_server
call fcn.100d55b0
push ebx
push 0x4e20
push ebx
push str.start_server
call fcn.100d55b0
add esp, 0x20
jmp 0x100d8513
mov eax, dword [ebp]
jmp 0x100d83bf
cmp ebp, ebx
jne 0x100d8534
call fcn.100b2342
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x100d8426
call fcn.100b2342
mov edx, dword [edi]
mov eax, edx
lea esi, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x100d8430
sub eax, esi
sar eax, 1
push eax
push edx
mov ecx, 0x102addf0
call fcn.10004210
mov eax, dword [0x102b0b9c]
mov edx, dword [eax + 0xc]
mov ecx, 0x102b0b9c
call edx
add eax, 0x10
mov dword [esp + 0x10], eax
xor esi, esi
push 1
push 1
push ebx
push 1
push 1
push ebx
push 0x4e20
lea eax, [esp + 0x2c]
push eax
push 0x1027ca1c
call fcn.100d5700
mov eax, dword [esp + 0x34]
add esp, 0x24
cmp dword [eax - 0xc], ebx
jl 0x100d84bb
push str.protocol_fault
push eax
call fcn.100b2ecd
add esp, 8
cmp eax, ebx
je 0x100d84bb
sub eax, dword [esp + 0x10]
sar eax, 1
js 0x100d84bb
push ebx
push 0x3e8
call fcn.100d8a10
inc esi
add esp, 8
cmp esi, 0xa
jl 0x100d8463
cmp ebp, ebx
jne 0x100d853c
call fcn.100b2342
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x100d84d0
call fcn.100b2342
mov eax, dword [edi + 4]
push str.recovery
push eax
call fcn.100b375b
add esp, 8
test eax, eax
je 0x100d857c
cmp byte [esp + 0x78], bl
je 0x100d857c
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100d8513
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp ebp, ebx
jne 0x100d8541
call fcn.100b2342
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x100d8528
call fcn.100b2342
mov eax, dword [esp + 0x24]
add edi, 8
jmp 0x100d8390
mov eax, dword [ebp]
jmp 0x100d841c
mov eax, dword [ebp]
jmp 0x100d84c6
mov eax, dword [ebp]
jmp 0x100d851e
cmp dword [esp + 0x7c], 0xffffffff
je 0x100d8561
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x34]
cmp eax, dword [esp + 0x7c]
ja 0x100d8696
mov ecx, dword [esp + 0x2c]
push ecx
push 0x1388
call fcn.100d8a10
mov esi, dword [esp + 0x34]
add esp, 8
jmp 0x100d8357
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x100d859c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.100d5e30
mov edx, dword [0x102b195c]
mov esi, dword [edx - 0x10]
cmp dword [edx - 0xc], ebx
lea eax, [edx - 0x10]
je 0x100d8600
cmp dword [eax + 0xc], ebx
lea ecx, [eax + 0xc]
jge 0x100d85d9
cmp dword [edx - 8], ebx
jge 0x100d85c9
push 0x80070057
call fcn.10005490
mov dword [edx - 0xc], ebx
mov edx, dword [0x102b195c]
xor ecx, ecx
mov word [edx], cx
jmp 0x100d8600
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100d85ef
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
add eax, 0x10
mov dword [0x102b195c], eax
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x100d862a
mov ecx, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x20]
push edx
push ecx
push eax
call fcn.100d5430
mov edx, dword [esp + 0x30]
push edx
call fcn.100b1e2a
add esp, 0x14
mov eax, dword [esp + 0x14]
push eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call fcn.100b1e2a
mov esi, 8
add esp, 4
cmp dword [esp + 0x50], esi
jb 0x100d865b
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.100b1e2a
add esp, 4
xor edx, edx
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], ebx
mov word [esp + 0x3c], dx
cmp dword [esp + 0x74], esi
jb 0x100d8681
mov eax, dword [esp + 0x60]
push eax
call fcn.100b1e2a
add esp, 4
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.100b2738
add esp, 0x48
ret
mov edx, dword [esp + 0x3c]
mov edi, 8
cmp dword [esp + 0x50], edi
jae 0x100d86a9
lea edx, [esp + 0x3c]
mov eax, edx
lea esi, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x100d86b0
sub eax, esi
sar eax, 1
push eax
push edx
mov ecx, 0x102addf0
call fcn.10004210
mov ecx, dword [0x102b195c]
mov esi, dword [ecx - 0x10]
cmp dword [ecx - 0xc], ebx
lea eax, [ecx - 0x10]
je 0x100d872a
cmp dword [eax + 0xc], ebx
lea edx, [eax + 0xc]
jge 0x100d8703
cmp dword [ecx - 8], ebx
jge 0x100d86f3
push 0x80070057
call fcn.10005490
mov dword [ecx - 0xc], ebx
mov edx, dword [0x102b195c]
xor ecx, ecx
mov word [edx], cx
jmp 0x100d872a
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x100d8719
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
add eax, 0x10
mov dword [0x102b195c], eax
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x100d8754
mov ecx, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x20]
push edx
push ecx
push eax
call fcn.100d5430
mov edx, dword [esp + 0x30]
push edx
call fcn.100b1e2a
add esp, 0x14
mov eax, dword [esp + 0x14]
push eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call fcn.100b1e2a
add esp, 4
cmp dword [esp + 0x50], edi
jb 0x100d8780
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.100b1e2a
add esp, 4
xor edx, edx
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], ebx
mov word [esp + 0x3c], dx
cmp dword [esp + 0x74], edi
jb 0x100d87a6
mov eax, dword [esp + 0x60]
push eax
call fcn.100b1e2a
add esp, 4
mov ecx, dword [esp + 0x54]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor al, al
call fcn.100b2738
add esp, 0x48
ret