Function at 0x1023190
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov eax, dword [0x1039004]
xor eax, esp
mov dword [esp + 0x40], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
lea ecx, [edi + 0x8c]
push ecx
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x1023397
xor ecx, ecx
mov eax, ebx
mov edx, 0x4e0
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
je 0x102321b
mov dword [eax], ebx
add ebx, 0xffffffff
lea esi, [eax + 4]
mov dword [esp + 0x18], esi
js 0x102321d
mov ecx, esi
call fcn.0101f1e0
add esi, 0x4e0
sub ebx, 1
jns 0x1023203
mov esi, dword [esp + 0x18]
jmp 0x102321d
xor esi, esi
test esi, esi
mov dword [edi + 0x60], esi
jne 0x1023250
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
push 0
push 0xc04e0004
call fcn.010240e0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.01029f27
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esp + 0x14]
mov dword [edi + 0x64], 0
mov dword [esp + 0x10], eax
cmp word [eax], 0
je 0x1023337
mov ebx, 2
mov ecx, dword [edi + 0x1c]
test bl, cl
mov dword [esp + 0x14], 0x17
jne 0x102323a
mov esi, dword [edi + 0x64]
mov ecx, dword [esp + 0x10]
imul esi, esi, 0x4e0
add esi, dword [edi + 0x60]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x20]
push eax
push 0
push ecx
call sub.instapi.dll_GetSQLServiceByName
test eax, eax
je 0x10233b0
mov eax, dword [esp + 0x10]
push eax
mov eax, edi
mov word [esp + 0x4c], 0
call fcn.01022220
test eax, eax
jne 0x102330b
test byte [0x103a4fc], bl
je 0x10232f6
mov ecx, dword [0x103b32c]
test ecx, ecx
je 0x10232f6
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x103b32c]
mov ecx, dword [0x103b134]
push eax
push 0x25e800
push ecx
call fcn.01024ec0
add esp, 0x14
push 0
push 0
lea edx, [esp + 0x18]
push edx
push 1
push 0xc04e0002
call fcn.010241e0
add dword [edi + 0x64], 1
mov edx, dword [esp + 0x10]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, ebx
test cx, cx
jne 0x1023318
sub eax, esi
sar eax, 1
lea eax, [edx + eax*2 + 2]
mov dword [esp + 0x10], eax
cmp word [eax], cx
jne 0x102326e
mov eax, dword [edi + 0x88]
mov ecx, eax
shl ecx, 6
sub ecx, eax
cmp ecx, dword [edi + 0x64]
jge 0x1023397
mov esi, dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
mov edx, dword [edi + 0x84]
push edx
call esi
push 0
push 0
push edi
push 0x1029350
push 0
push 0
call ebx
test eax, eax
je 0x102322c
mov eax, dword [edi + 0x84]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [edi + 0x88]
mov ecx, eax
shl ecx, 6
sub ecx, eax
cmp ecx, dword [edi + 0x64]
jl 0x1023355
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.01029f27
mov esp, ebp
pop ebp
ret 8
test byte [0x103a4fc], bl
je 0x102330f
mov edx, dword [0x103b328]
test edx, edx
je 0x102330f
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x103b328]
mov edx, dword [0x103b130]
push eax
push ecx
push 0x25bc00
push edx
call fcn.01024ec0
add esp, 0x14
jmp 0x102330f