Function at 0x1003a0a0
Capabilities:
Create thread
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100837c6
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x100a7070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x254], edi
mov dword [edi], 0
mov dword [ebp - 0x258], edi
mov dword [edi + 0x40], 0
mov dword [edi + 0x44], 0
mov dword [edi + 0x48], 0
mov dword [ebp - 4], 0
call fcn.100138c0
mov ecx, eax
test ecx, ecx
jne 0x1003a113
push 0x80004005
call fcn.100142e0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x10097a44
jne 0x1003a128
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x1003a12a
call edx
add eax, 0x10
mov dword [edi + 0x4c], eax
lea ecx, [edi + 0x50]
mov byte [ebp - 4], 1
call fcn.10036ea0
lea eax, [edi + 0x10]
mov byte [ebp - 4], 2
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push eax
call esi
lea eax, [edi + 0x28]
push eax
call esi
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.1005d9b0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0x10000000
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
cmp word [ebp - 0x218], ax
jne 0x1003a1a9
xor ecx, ecx
jmp 0x1003a1c1
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1003a1b2
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x230]
call fcn.10013bc0
sub esp, 8
mov byte [ebp - 4], 3
lea eax, [ebp - 0x24c]
mov dword [ebp - 0x24c], 0x5c
lea ecx, [ebp - 0x230]
push eax
call fcn.1002dc60
mov esi, eax
call fcn.10031b90
mov ecx, dword [eax + 0xc]
cmp ecx, 0x64
sete al
mov byte [edi + 0x5c], al
cmp ecx, 0x64
jne 0x1003a21a
push str.run_in_dl_
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp esi, 0xffffffff
je 0x1003a3ab
push esi
push ecx
lea eax, [ebp - 0x248]
push eax
lea ecx, [ebp - 0x230]
call fcn.1002ca90
mov esi, eax
lea eax, [ebp - 0x230]
cmp eax, esi
je 0x1003a28a
mov eax, dword [ebp - 0x21c]
cmp eax, 8
jb 0x1003a261
inc eax
lea ecx, [ebp - 0x230]
push eax
push dword [ebp - 0x230]
call fcn.10013d30
xor eax, eax
mov dword [ebp - 0x21c], 7
push esi
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
call fcn.10013cc0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x234]
cmp eax, 8
jb 0x1003a2ac
inc eax
lea ecx, [ebp - 0x248]
push eax
push dword [ebp - 0x248]
call fcn.10013d30
call fcn.10031b90
cmp dword [eax + 0xc], 0x65
jne 0x1003a3ab
push 8
push str.cfg.dat
lea ecx, [ebp - 0x230]
call fcn.1002f5f0
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x250]
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x250], 0
cmovae ecx, dword [ebp - 0x230]
lea edx, [ebp - 0x24c]
push eax
mov dword [ebp - 0x24c], 0
call fcn.10036fe0
mov eax, dword [ebp - 0x250]
add esp, 4
test eax, eax
je 0x1003a3ab
add eax, 2
push eax
mov dword [ebp - 0x254], eax
call fcn.10044ce6
mov ebx, dword [ebp - 0x24c]
mov esi, eax
add esp, 4
test esi, esi
je 0x1003a354
push dword [ebp - 0x254]
push 0
push esi
call fcn.1005d9b0
push dword [ebp - 0x250]
push ebx
push esi
call fcn.1005d430
add esp, 0x18
mov edx, dword [ebp - 0x250]
mov ecx, esi
call fcn.10036d10
test eax, eax
js 0x1003a391
lea eax, [esi + 6]
push eax
lea ecx, [ebp - 0x24c]
call fcn.10018a60
mov byte [ebp - 4], 5
lea ecx, [edi + 0x50]
push dword [ebp - 0x24c]
call fcn.10037080
lea ecx, [ebp - 0x24c]
call fcn.10018360
test esi, esi
je 0x1003a39e
push esi
call fcn.10044ce1
add esp, 4
test ebx, ebx
je 0x1003a3ab
push ebx
call fcn.10044ce1
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0
push 0
push 0
push 0
call esi
push 0
push 0
push 0
push 0
mov dword [edi + 8], eax
call esi
push dword [ebp - 0x258]
mov dword [edi + 0xc], eax
mov edx, dword [edi + 0x44]
push ecx
mov ecx, dword [edi + 0x40]
call fcn.1001a040
mov eax, dword [edi + 0x40]
add esp, 8
mov dword [edi + 0x44], eax
push edi
push 0
push edi
push 0x1003aca0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [ebp - 0x21c]
mov dword [edi + 4], eax
cmp ecx, 8
jb 0x1003a41a
inc ecx
push ecx
push dword [ebp - 0x230]
lea ecx, [ebp - 0x230]
call fcn.10013d30
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1004450b
mov esp, ebp
pop ebp
ret