Function at 0x40347c
Capabilities:
Resume thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x47
push 0
push 0
dec ecx
jne 0x403484
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004019ac
xor eax, eax
push ebp
push 0x4038c2
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x105
lea eax, [ebp - 0x20d]
push eax
push 0
call sub.kernel32.dll_GetModuleHandleA_1
push eax
call sub.kernel32.dll_GetModuleFileNameA_1
lea eax, [ebp - 0x28]
lea edx, [ebp - 0x20d]
mov ecx, 0x105
call fcn.0040180c
push 0x4038d4
push 0x4038e0
call sub.kernel32.dll_GetModuleHandleA_1
push eax
call sub.kernel32.dll_GetProcAddress
mov ebx, eax
push 0x4038f0
push 0x4038e0
call sub.kernel32.dll_GetModuleHandleA_1
push eax
call sub.kernel32.dll_GetProcAddress
mov esi, eax
mov byte [ebp - 5], 0
lea edx, [ebp - 0x218]
mov eax, dword [ebp - 0x28]
call fcn.004033dc
mov eax, dword [ebp - 0x218]
call fcn.004019bc
mov edx, eax
lea eax, [ebp - 0x214]
call fcn.004017d0
mov eax, dword [ebp - 0x214]
push eax
mov eax, dword [ebp - 4]
call fcn.004019bc
mov edx, eax
lea eax, [ebp - 0x21c]
call fcn.004017d0
mov eax, dword [ebp - 0x21c]
lea ecx, [ebp - 0x3c]
pop edx
call fcn.00402b18
test al, al
je 0x403874
mov byte [ebp - 6], 0
mov eax, dword [ebp - 0x30]
push eax
push 0
push 0x1f03ff
mov eax, dword [0x405084]
mov eax, dword [eax]
call eax
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x34]
push eax
push 0
push 0x1f0fff
call ebx
mov dword [ebp - 0x3c], eax
xor edx, edx
push ebp
push 0x40386a
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0x220]
mov edx, dword [ebp - 0x28]
call fcn.00401ca4
mov eax, dword [ebp - 0x220]
call fcn.00401cb4
mov ebx, eax
mov dword [ebp - 0x20], ebx
lea eax, [ebp - 0x228]
mov edx, ebx
call fcn.00401c68
mov eax, dword [ebp - 0x228]
call fcn.00401cb4
mov edx, eax
lea eax, [ebp - 0x224]
call fcn.00401c68
mov eax, dword [ebp - 0x224]
call fcn.00401cc4
mov word [ebp - 0x24], ax
mov dword [ebp - 0x108], 0x10002
lea eax, [ebp - 0x108]
push eax
mov eax, dword [ebp - 0x38]
push eax
call sub.kernel32.dll_GetThreadContext
test eax, eax
je 0x40374a
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x64]
add eax, 8
push eax
mov eax, dword [ebp - 0x3c]
push eax
mov eax, dword [0x405080]
mov eax, dword [eax]
call eax
test eax, eax
je 0x40374a
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00403374
test eax, eax
jl 0x40374a
test edi, edi
je 0x40374a
mov eax, dword [edi + 0x3c]
add eax, edi
mov dword [ebp - 0x18], eax
push 4
push 0x3000
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x50]
push eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x34]
push eax
mov eax, dword [ebp - 0x3c]
push eax
mov eax, dword [0x40507c]
mov eax, dword [eax]
call eax
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40374a
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x54]
push eax
push edi
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x3c]
push eax
mov eax, dword [0x405078]
mov eax, dword [eax]
call eax
test eax, eax
je 0x40374a
mov eax, dword [ebp - 0x18]
call fcn.00403368
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
movzx eax, word [eax + 6]
dec eax
test eax, eax
jb 0x403700
inc eax
mov dword [ebp - 0x2c], eax
xor ebx, ebx
lea edx, [ebp - 0x14]
push edx
lea eax, [ebx + ebx*4]
mov edx, dword [ebp - 0x1c]
mov edx, dword [edx + eax*8 + 0x10]
push edx
mov edx, dword [ebp - 0x1c]
mov edx, dword [edx + eax*8 + 0x14]
add edx, edi
push edx
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + eax*8 + 0xc]
add eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x3c]
push eax
mov eax, dword [0x405078]
mov eax, dword [eax]
call eax
inc ebx
dec dword [ebp - 0x2c]
jne 0x4036c9
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x64]
add eax, 8
push eax
mov eax, dword [ebp - 0x3c]
push eax
mov eax, dword [0x405078]
mov eax, dword [eax]
call eax
test eax, eax
je 0x40374a
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x28]
add eax, dword [ebp - 0xc]
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x108]
push eax
mov eax, dword [ebp - 0x38]
push eax
call esi
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 6], al
mov al, byte [ebp - 6]
mov byte [ebp - 5], al
cmp byte [ebp - 6], 0
je 0x40375b
lea edx, [ebp - 0x24]
mov eax, dword [ebp - 0x3c]
call fcn.00402e04
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403874
cmp byte [ebp - 6], 0
jne 0x40377e
push 0
mov eax, dword [ebp - 0x3c]
push eax
call sub.kernel32.dll_TerminateProcess
jmp 0x403857
mov eax, dword [ebp - 0x38]
push eax
call sub.kernel32.dll_ResumeThread
mov eax, 0x4061a8
mov edx, 0x403904
xor ecx, ecx
mov cl, byte [eax]
inc ecx
call fcn.00401394
jne 0x403857
mov eax, 0x4061dd
mov edx, 0x403904
xor ecx, ecx
mov cl, byte [eax]
inc ecx
call fcn.00401394
jne 0x403847
lea edx, [ebp - 0x22c]
mov eax, 0x403910
call fcn.00403924
mov eax, dword [ebp - 0x22c]
call fcn.00401848
mov ebx, eax
inc ebx
lea edx, [ebp - 0x230]
mov eax, 0x403910
call fcn.00403924
lea eax, [ebp - 0x230]
mov edx, 0x403920
call fcn.00401850
mov eax, dword [ebp - 0x230]
push eax
lea eax, [ebp - 0x234]
push eax
lea edx, [ebp - 0x238]
mov eax, dword [ebp - 0x28]
call fcn.004033dc
mov eax, dword [ebp - 0x238]
mov ecx, ebx
mov edx, 1
call fcn.00401a18
mov edx, dword [ebp - 0x234]
pop eax
call fcn.00401908
jne 0x403857
mov eax, dword [ebp - 0x28]
call fcn.004019bc
mov edx, dword [ebp - 0x34]
call fcn.00402780
jmp 0x403857
mov eax, dword [ebp - 0x28]
call fcn.004019bc
mov edx, dword [ebp - 0x34]
call fcn.00402780
mov eax, dword [ebp - 0x3c]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x38]
push eax
call sub.kernel32.dll_CloseHandle
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4038c9
lea eax, [ebp - 0x238]
mov edx, 4
call fcn.004016c0
lea eax, [ebp - 0x228]
mov edx, 3
call fcn.00401b94
lea eax, [ebp - 0x21c]
mov edx, 3
call fcn.004016c0
lea eax, [ebp - 0x28]
call fcn.0040169c
lea eax, [ebp - 4]
call fcn.0040169c
ret