Function at 0x40361c
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff60
mov eax, 0x7c8d04
call fcn.007b7c14
cmp byte [0x7c8511], 0
jne 0x4038c8
mov word [ebp - 0x8c], 0x18
mov dword [0x7e968c], 0x7c8510
mov eax, 0x7e96b4
call fcn.00404318
add dword [ebp - 0x80], 2
mov eax, 0x7e96b8
call fcn.00404318
add dword [ebp - 0x80], 2
mov eax, 0x7e96bc
call fcn.00404318
add dword [ebp - 0x80], 2
push 0x7e96dc
call fcn.0040434c
pop ecx
inc dword [ebp - 0x80]
mov eax, 0x7e9708
call fcn.00404318
add dword [ebp - 0x80], 2
mov edx, dword [0x7e968c]
mov byte [edx], 1
mov word [ebp - 0x8c], 0x24
mov edx, 0x7c8660
lea eax, [ebp - 4]
call fcn.004043c8
add dword [ebp - 0x80], 2
lea edx, [ebp - 4]
mov eax, 0x7e9708
call fcn.00404408
test al, al
setne cl
and ecx, 1
push ecx
sub dword [ebp - 0x80], 2
lea eax, [ebp - 4]
mov edx, 2
call fcn.00402554
pop ecx
mov word [ebp - 0x8c], 0x18
test ecx, ecx
je 0x40380f
push 0x100
call fcn.007ae9c8
pop ecx
mov dword [ebp - 0xa0], eax
push 0x100
push dword [ebp - 0xa0]
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
mov word [ebp - 0x8c], 0x30
lea eax, [ebp - 0x10]
call fcn.00404424
push eax
inc dword [ebp - 0x80]
lea eax, [ebp - 8]
mov edx, dword [ebp - 0xa0]
call fcn.004043c8
mov edx, eax
add dword [ebp - 0x80], 2
lea eax, [ebp - 0xc]
call fcn.00404454
inc dword [ebp - 0x80]
mov eax, dword [eax]
pop edx
call fcn.004a4128
lea ecx, [ebp - 0x10]
push ecx
lea eax, [ebp - 0x18]
call fcn.00404424
push eax
inc dword [ebp - 0x80]
mov edx, 0x7c8661
lea eax, [ebp - 0x14]
call fcn.007c61ac
inc dword [ebp - 0x80]
lea edx, [ebp - 0x14]
pop ecx
pop eax
call fcn.007c6378
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x1c]
call fcn.00404494
add dword [ebp - 0x80], 2
lea edx, [ebp - 0x1c]
mov eax, 0x7e9708
call fcn.004044d4
sub dword [ebp - 0x80], 2
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.00402554
dec dword [ebp - 0x80]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.007c633c
dec dword [ebp - 0x80]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.007c633c
dec dword [ebp - 0x80]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.007c633c
dec dword [ebp - 0x80]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.007c633c
sub dword [ebp - 0x80], 2
lea eax, [ebp - 8]
mov edx, 2
call fcn.00402554
mov word [ebp - 0x8c], 0x18
push dword [ebp - 0xa0]
call fcn.007a2b38
pop ecx
jmp 0x40386e
mov eax, 0x7e9708
call fcn.004044f4
mov edx, eax
mov eax, 0x7e9708
call fcn.00404514
movsx edx, byte [eax]
cmp edx, 0x5c
je 0x40386e
mov word [ebp - 0x8c], 0x3c
mov edx, 0x7c8663
lea eax, [ebp - 0x20]
call fcn.004043c8
add dword [ebp - 0x80], 2
lea edx, [ebp - 0x20]
mov eax, 0x7e9708
call fcn.00404544
sub dword [ebp - 0x80], 2
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.00402554
mov word [ebp - 0x8c], 0x18
push 0
push 0
push 1
push 0
call sub.KERNEL32.DLL_CreateEventA
mov dword [0x7e96b0], eax
push 0
push 0
push 0
push 0
call sub.KERNEL32.DLL_CreateEventA
mov dword [0x7e96a8], eax
push 0x7e96c0
call sub.KERNEL32.DLL_InitializeCriticalSection
push 0
push 0
push 0x7e968c
push 0x4042fc
push 0
push 0
call fcn.007c2a54
add esp, 0x18
mov dword [0x7e96ac], eax
inc dword [ebp - 0x80]
sub dword [ebp - 0x80], 0xa
inc byte [0x7c8511]
cmp byte [0x7c8510], 0
jne 0x403990
push 0x7c8665
call sub.KERNEL32.DLL_OutputDebugStringA
lea ecx, [ebp - 0x9c]
push ecx
push 0
push 0
push 0
push 1
push 0x4046d4
push 0
mov word [ebp - 0x8c], 0x54
add esp, 0xfffffff8
push esp
call fcn.00404764
pop ecx
lea eax, [ebp - 0x78]
push eax
call fcn.00404788
add esp, 0xc
push 0
push 0
lea edx, [ebp - 0x78]
push edx
call fcn.00404640
add esp, 0xc
push 0x7c8678
lea ecx, [ebp - 0x78]
push ecx
call fcn.004047bc
add esp, 8
inc dword [ebp - 0x80]
lea eax, [ebp - 0x50]
push eax
call fcn.00404850
pop ecx
inc dword [ebp - 0x80]
mov edx, 0x7c91a8
mov dword [ebp - 0x50], edx
lea ecx, [ebp - 0x78]
push ecx
lea eax, [ebp - 0x48]
push eax
call fcn.00404880
add esp, 8
inc dword [ebp - 0x80]
inc dword [ebp - 0x80]
dec dword [ebp - 0x80]
push 0
push 1
lea edx, [ebp - 0x78]
push edx
call fcn.00404640
add esp, 0xc
mov word [ebp - 0x8c], 0x48
lea ecx, [ebp - 0x50]
push ecx
push 0x4045dc
call fcn.007c47b4
add esp, 0x24
mov eax, 0x7e968c
mov edx, dword [ebp - 0x9c]
mov dword fs:[0], edx
mov esp, ebp
pop ebp
ret