Function at 0x1012420
Capabilities:
Create thread

Disassembly:
push 0x18
mov eax, 0x1039a3f
call fcn.01037317
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 0x1012474
mov eax, dword [section..data]
cmp eax, section..data
je 0x101246a
test byte [eax + 0x1c], 1
je 0x101246a
push 0x1002f90
push 0x6f
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010078b5
mov eax, 0x80070057
jmp 0x1012637
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 0x1012499
cmp esi, edi
jne 0x10124d7
mov ecx, 0x8007000e
mov dword [ebp - 0x14], ecx
mov eax, dword [section..data]
cmp eax, section..data
je 0x1012626
test byte [eax + 0x1c], 1
je 0x1012626
push ecx
push 0x1002f90
push 0x70
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01008600
jmp 0x1012626
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 0x1012544
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.01012360
mov dword [ebp - 0x14], eax
mov dword [esi + 0x10], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x20], edi
jmp 0x1012620
lea eax, [ebp - 0x1c]
push eax
push fcn.01012360
push 4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
test eax, eax
jne 0x101259c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0100968c
mov dword [ebp - 0x14], eax
mov eax, dword [section..data]
cmp eax, section..data
je 0x1012620
test byte [eax + 0x1c], 1
je 0x1012620
push dword [ebp - 0x14]
push 0x1002f90
push 0x71
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01008600
jmp 0x1012620
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x24], eax
cmp dword [ebp + 0x18], edi
je 0x101268c
cmp ebx, edi
je 0x101268c
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 0x10125ea
mov edi, dword [ebp - 0x20]
test edi, edi
jne 0x101263f
mov ecx, 0x8007000e
mov dword [ebp - 0x14], ecx
mov eax, dword [section..data]
cmp eax, section..data
je 0x101261e
test byte [eax + 0x1c], 1
je 0x101261e
push ecx
push 0x1002f90
push 0x72
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01008600
xor edi, edi
push esi
call fcn.01010c29
cmp dword [ebp - 0x1c], edi
je 0x1012634
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x14]
call fcn.010373cb
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 0x101268a
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 0x101267f
add eax, edi
push eax
push ecx
call fcn.01012217
mov dword [ebp - 0x14], eax
test eax, eax
jl 0x10126ad
mov eax, dword [ebp + 0x18]
inc dword [ebp + 0x14]
add edi, 4
cmp dword [ebp + 0x14], ebx
jb 0x1012666
xor edi, edi
cmp dword [ebp + 0x20], edi
je 0x101273b
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 0x10126f6
mov eax, dword [section..data]
cmp eax, section..data
je 0x101261e
test byte [eax + 0x1c], 1
je 0x101261e
push dword [ebp - 0x14]
push dword [ebp + 0x14]
push 0x1002f90
push 0x73
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101726e
jmp 0x101261e
cmp ebx, edi
jne 0x1012729
mov ecx, 0x8007000e
mov dword [ebp - 0x14], ecx
mov eax, dword [section..data]
cmp eax, section..data
je 0x1012620
test byte [eax + 0x1c], 1
je 0x1012620
push ecx
push 0x1002f90
push 0x74
jmp 0x101258c
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 0x101277c
lea eax, [esi + 0x20]
push eax
push dword [ebp + 0x28]
call fcn.01011b62
cmp eax, edi
mov dword [ebp - 0x14], eax
jge 0x101277c
mov eax, dword [section..data]
cmp eax, section..data
je 0x1012620
test byte [eax + 0x1c], 1
je 0x1012620
push dword [ebp - 0x14]
push 0x1002f90
push 0x75
jmp 0x101258c
push edi
push edi
push esi
push fcn.01012360
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 0x10127d6
mov dword [ebp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0100968c
mov dword [ebp - 0x14], eax
mov eax, dword [section..data]
cmp eax, section..data
je 0x1012887
test byte [eax + 0x1c], bl
je 0x1012887
push dword [ebp - 0x14]
push 0x1002f90
push 0x76
jmp 0x101287c
push dword [ebp + 0x2c]
push eax
push 0x10031f4
call fcn.0101632f
cmp eax, edi
je 0x1012848
cmp eax, 0x102
je 0x1012824
cmp eax, 0xffffffff
jne 0x1012887
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0100968c
mov dword [ebp - 0x14], eax
mov eax, dword [section..data]
cmp eax, section..data
je 0x1012887
test byte [eax + 0x1c], bl
je 0x1012887
push dword [ebp - 0x14]
push 0x1002f90
push 0x79
jmp 0x101287c
mov ecx, 0x80070102
mov dword [ebp - 0x14], ecx
mov eax, dword [section..data]
cmp eax, section..data
je 0x1012887
test byte [eax + 0x1c], 2
je 0x1012887
push ecx
push 0x1002f90
push 0x78
jmp 0x101287c
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
jne 0x1012860
mov dword [ebp - 0x14], 0x80070507
mov eax, dword [section..data]
cmp eax, section..data
je 0x1012887
test byte [eax + 0x1c], 8
je 0x1012887
push dword [ebp - 0x14]
push 0x1002f90
push 0x77
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01008600
cmp dword [ebp + 0x18], edi
je 0x1012895
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x24], edi
je 0x1012634
jmp 0x1012620