Function at 0x1015100
Capabilities:
Create thread

Disassembly:
push 0x18
mov eax, 0x101a14f
call fcn.01012547
xor edi, edi
mov dword [ebp - 0x14], 0x80004005
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], edi
cmp dword [ebp + 0x14], edi
jne 0x1015154
mov eax, dword [0x101d014]
cmp eax, 0x101d014
je 0x101514a
test byte [eax + 0x1c], 1
je 0x101514a
push 0x1002c38
push 0x6f
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010043b6
mov eax, 0x80070057
jmp 0x1015317
push 0x2c
mov dword [ebp - 4], edi
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
or dword [ebp - 4], 0xffffffff
mov esi, eax
pop ecx
mov dword [ebp - 0x18], esi
jmp 0x1015179
cmp esi, edi
jne 0x10151b7
mov ecx, 0x8007000e
mov dword [ebp - 0x14], ecx
mov eax, dword [0x101d014]
cmp eax, 0x101d014
je 0x1015306
test byte [eax + 0x1c], 1
je 0x1015306
push ecx
push 0x1002c38
push 0x70
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100dc70
jmp 0x1015306
push 0x2c
push edi
push esi
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x1c]
mov dword [esi], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0xc], eax
mov eax, dword [ebp + 0x24]
add esp, 0xc
cmp dword [ebp + 0x2c], 0xffffffff
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], edi
mov dword [esi + 0x24], edi
jne 0x1015224
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0x20]
mov dword [esi + 0x18], eax
mov eax, dword [ebp + 0x28]
push esi
mov dword [esi + 0x20], eax
mov dword [esi + 0x28], edi
call fcn.01015040
mov dword [ebp - 0x14], eax
mov dword [esi + 0x10], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x20], edi
jmp 0x1015300
lea eax, [ebp - 0x1c]
push eax
push fcn.01015040
push 4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
test eax, eax
jne 0x101527c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0100629e
mov dword [ebp - 0x14], eax
mov eax, dword [0x101d014]
cmp eax, 0x101d014
je 0x1015300
test byte [eax + 0x1c], 1
je 0x1015300
push dword [ebp - 0x14]
push 0x1002c38
push 0x71
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100dc70
jmp 0x1015300
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x24], eax
cmp dword [ebp + 0x18], edi
je 0x101536c
cmp ebx, edi
je 0x101536c
xor ecx, ecx
push 4
pop edx
mov eax, ebx
mul edx
seto cl
mov dword [ebp - 4], 2
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
or dword [ebp - 4], 0xffffffff
pop ecx
mov dword [ebp - 0x20], eax
jmp 0x10152ca
mov edi, dword [ebp - 0x20]
test edi, edi
jne 0x101531f
mov ecx, 0x8007000e
mov dword [ebp - 0x14], ecx
mov eax, dword [0x101d014]
cmp eax, 0x101d014
je 0x10152fe
test byte [eax + 0x1c], 1
je 0x10152fe
push ecx
push 0x1002c38
push 0x72
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100dc70
xor edi, edi
push esi
call fcn.01013ff6
cmp dword [ebp - 0x1c], edi
je 0x1015314
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x14]
call fcn.010125fb
ret 0x28
mov eax, ebx
shl eax, 2
push eax
push 0
push edi
call sub.msvcrt.dll_memset
and dword [ebp + 0x14], 0
add esp, 0xc
mov dword [esi + 0x10], edi
test ebx, ebx
jbe 0x101536a
mov edi, dword [ebp + 0x18]
mov eax, dword [ebp - 0x20]
sub eax, edi
mov dword [ebp + 0x18], eax
mov ecx, dword [edi]
test ecx, ecx
je 0x101535f
add eax, edi
push eax
push ecx
call fcn.01014ef7
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x101538d
mov eax, dword [ebp + 0x18]
inc dword [ebp + 0x14]
add edi, 4
cmp dword [ebp + 0x14], ebx
jb 0x1015346
xor edi, edi
cmp dword [ebp + 0x20], edi
je 0x101541b
push dword [ebp + 0x24]
mov dword [ebp - 4], 4
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
or dword [ebp - 4], 0xffffffff
pop ecx
mov ebx, eax
jmp 0x10153d6
mov eax, dword [0x101d014]
cmp eax, 0x101d014
je 0x10152fe
test byte [eax + 0x1c], 1
je 0x10152fe
push dword [ebp - 0x14]
push dword [ebp + 0x14]
push 0x1002c38
push 0x73
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100c7c8
jmp 0x10152fe
cmp ebx, edi
jne 0x1015409
mov ecx, 0x8007000e
mov dword [ebp - 0x14], ecx
mov eax, dword [0x101d014]
cmp eax, 0x101d014
je 0x1015300
test byte [eax + 0x1c], 1
je 0x1015300
push ecx
push 0x1002c38
push 0x74
jmp 0x101526c
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push ebx
call sub.msvcrt.dll_memmove
add esp, 0xc
mov dword [esi + 0x18], ebx
cmp dword [ebp + 0x28], edi
je 0x101545c
lea eax, [esi + 0x20]
push eax
push dword [ebp + 0x28]
call fcn.010149e2
cmp eax, edi
mov dword [ebp - 0x14], eax
jge 0x101545c
mov eax, dword [0x101d014]
cmp eax, 0x101d014
je 0x1015300
test byte [eax + 0x1c], 1
je 0x1015300
push dword [ebp - 0x14]
push 0x1002c38
push 0x75
jmp 0x101526c
push edi
push edi
push esi
push fcn.01015040
xor ebx, ebx
push edi
inc ebx
push edi
mov dword [ebp + 0x24], edi
mov dword [esi + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp + 0x18], eax
cmp eax, edi
jne 0x10154b6
mov dword [ebp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0100629e
mov dword [ebp - 0x14], eax
mov eax, dword [0x101d014]
cmp eax, 0x101d014
je 0x1015567
test byte [eax + 0x1c], bl
je 0x1015567
push dword [ebp - 0x14]
push 0x1002c38
push 0x76
jmp 0x101555c
push dword [ebp + 0x2c]
push eax
push 0x1002e40
call fcn.010167a4
cmp eax, edi
je 0x1015528
cmp eax, 0x102
je 0x1015504
cmp eax, 0xffffffff
jne 0x1015567
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0100629e
mov dword [ebp - 0x14], eax
mov eax, dword [0x101d014]
cmp eax, 0x101d014
je 0x1015567
test byte [eax + 0x1c], bl
je 0x1015567
push dword [ebp - 0x14]
push 0x1002c38
push 0x79
jmp 0x101555c
mov ecx, 0x80070102
mov dword [ebp - 0x14], ecx
mov eax, dword [0x101d014]
cmp eax, 0x101d014
je 0x1015567
test byte [eax + 0x1c], 2
je 0x1015567
push ecx
push 0x1002c38
push 0x78
jmp 0x101555c
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
jne 0x1015540
mov dword [ebp - 0x14], 0x80070507
mov eax, dword [0x101d014]
cmp eax, 0x101d014
je 0x1015567
test byte [eax + 0x1c], 8
je 0x1015567
push dword [ebp - 0x14]
push 0x1002c38
push 0x77
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0100dc70
cmp dword [ebp + 0x18], edi
je 0x1015575
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x24], edi
je 0x1015314
jmp 0x1015300