Function at 0x40c380
Capabilities:
Suspend thread
Terminate process
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x364]
sub esp, 0x364
push 0xffffffffffffffff
push 0x4c8488
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x54e864]
xor eax, ebp
mov dword [ebp + 0x360], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x36c]
mov ebx, ecx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x40c3dc
mov byte [ebp - 0x11], al
cmp dword [ebp + 0x370], eax
je 0x40c3e0
mov byte [ebp - 0x11], 1
mov esi, 1
mov byte [ebp - 0x25], 1
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x3c], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0xfc
mov dword [ebp + 0x260], eax
lea eax, [ebp + 0x264]
push 0
push eax
call sub.MSVCR100.dll_memset
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentThread]
add esp, 0xc
call edi
push 0xfc
lea ecx, [ebp - 0x150]
push 0
push ecx
mov dword [ebp - 0x154], eax
call sub.MSVCR100.dll_memset
add esp, 0xc
push 0
mov dword [ebp - 0x30], 0
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [ebp - 0x34], eax
cmp eax, 0xf
je 0x40c467
call edi
push 0xf
push eax
mov dword [ebp - 0x30], eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
cmp byte [ebp - 0x11], 0
mov dword [ebp - 4], 0
je 0x40c535
lea ecx, [ebp]
call fcn.00405070
cmp dword [ebp + 0x18], 0
mov byte [ebp - 4], 2
je 0x40c511
cmp dword [ebp + 0x14], 0
je 0x40c511
push 0
push 4
call dword [ebp]
mov dword [ebp + 0x1c], eax
cmp eax, 0xffffffff
je 0x40c527
lea edx, [ebp + 0x244]
push edx
push eax
call dword [ebp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_SuspendThread]
test eax, eax
je 0x40c511
mov eax, dword [ebp + 0x250]
cmp eax, dword [ebp - 0x18]
jne 0x40c4f6
mov eax, dword [ebp + 0x24c]
cmp eax, dword [ebp + 0x260]
je 0x40c4f6
push eax
push 0
push 0xa
mov dword [ebp + esi*4 + 0x260], eax
call dword [ebp + 0x14]
mov dword [ebp + esi*4 - 0x154], eax
test eax, eax
je 0x40c4f2
push eax
call edi
inc esi
mov dword [ebp - 0x3c], esi
mov edx, dword [ebp + 0x1c]
lea ecx, [ebp + 0x244]
push ecx
push edx
call dword [ebp + 0x10]
jmp 0x40c4b8
mov eax, dword [ebp + 0x1c]
cmp eax, 0xffffffff
je 0x40c527
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x1c], 0xffffffff
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x40c535
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 0x13d0
call fcn.004c6460
mov edi, esp
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], edi
mov dword [ebp - 4], 0
test edi, edi
jne 0x40c566
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40cb30
mov ecx, dword [ebp - 0x34]
push ecx
jmp 0x40cb29
mov eax, dword [ebx + 0x38]
cmp dword [eax], 0
lea esi, [edi + 0x1104]
lea edx, [edi + 0x1000]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x54], edx
jne 0x40c593
mov ecx, dword [ebx + 0x30]
mov edx, dword [ecx]
mov ecx, dword [ebx + 0x34]
push edx
push ecx
push eax
call fcn.00405aa0
add esp, 0xc
cmp byte [ebp - 0x25], 0
mov dword [ebp - 4], 0
jne 0x40c5b2
cmp dword [ebp - 0x30], 0
je 0x40cb30
mov eax, dword [ebp - 0x30]
jmp 0x40cb25
cmp dword [ebp - 0x24], 0
je 0x40c6ca
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
mov esi, dword [eax + 4]
mov dword [ebp - 0x1c], ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 0x260]
push edx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 4], 0xe
call fcn.0046dd90
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0x260]
add esp, 4
push eax
call fcn.0046dd90
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x260]
add esp, 4
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x4c]
push ecx
push eax
mov eax, dword [esi + 0x8c]
push eax
mov eax, dword [esi + 0x90]
push eax
mov eax, dword [esi + 0x94]
push eax
mov eax, dword [esi + 0x98]
push eax
mov eax, dword [esi + 0xc8]
push eax
mov eax, dword [esi + 0xbc]
push eax
mov eax, dword [esi + 0xc0]
push eax
mov eax, dword [esi + 0xc4]
push eax
mov eax, dword [esi + 0xb4]
push eax
mov eax, dword [esi + 0x9c]
push eax
mov eax, dword [esi + 0xa0]
push eax
mov eax, dword [esi + 0xa8]
push eax
mov eax, dword [esi + 0xac]
push eax
mov eax, dword [esi + 0xa4]
push eax
mov eax, dword [esi + 0xb0]
push eax
mov eax, dword [ebp - 0x50]
push eax
push ecx
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + 0xc]
push eax
push edx
mov ecx, ebx
mov dword [ebp - 0x40], edx
call fcn.00405cb0
mov ecx, dword [ebp - 0x40]
push eax
push ecx
push str.Unhandled_exception_0x_08X___s__caught_at_address_0x_08X_in_the_thread__d__s._r_n____Registers:_r_n________EAX__0x_08X__EBX__0x_08X__ECX__0x_08X__EDX__0x_08X___r_n________ESI__0x_08X__EDI__0x_08X__EBP__0x_08X__ESP__0x_08X___r_n________EFlags__0x_08X__CS__0x_04X__SS__0x_04X__DS__0x_04X__ES__0x_0X__FS__0x_04X__GS__0x_04X_r_n____Last_error:_0x_08X_r_n____Call_stack__thread__d__s_:_r_n
push edi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x64
push edi
mov ecx, ebx
call fcn.0040b390
mov dword [ebp - 4], 0
jmp 0x40c6c7
mov esi, dword [ebp - 0x20]
push 2
mov dword [esi], 0x10007
mov edx, dword [ebx + 0x38]
mov eax, dword [edx]
push 0
push 0
push eax
mov byte [ebp - 4], 0x12
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x24], 0
je 0x40c718
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
mov esi, dword [edx + 4]
mov edi, eax
push 1
mov ecx, 0xb3
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x154]
push ecx
push 0
push eax
push 0xfffffffffffffffe
mov ecx, ebx
call fcn.0040bdc0
mov edi, dword [ebp - 0x18]
jmp 0x40c764
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x40c764
mov edx, dword [ebp + 0x260]
push edx
push str.Deadlock_detected_in_the_thread__d._Call_stack:_r_n
push edi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push edi
mov ecx, ebx
call fcn.0040b390
push 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
mov eax, dword [ebx + 0x88]
mov ecx, dword [eax]
push ecx
push esi
push 0xfffffffffffffffe
mov ecx, ebx
call fcn.0040bdc0
cmp byte [ebp - 0x11], 0
je 0x40c81d
mov dword [ebp - 0x1c], 1
jmp 0x40c780
mov edx, dword [ebp - 0x1c]
cmp edx, dword [ebp - 0x3c]
jae 0x40c81d
mov eax, edx
mov esi, dword [ebp + eax*4 - 0x154]
test esi, esi
je 0x40c803
mov ecx, dword [ebp - 0x20]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x40c803
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp + edx*4 + 0x260]
push eax
call fcn.0046dd90
add esp, 4
push eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp + eax*4 + 0x260]
push eax
push str.____Call_stack__thread__d__s_:_r_n
push edi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0
lea ecx, [ebp - 0x2c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [ebx + 0x38]
push eax
mov eax, dword [edx]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x20]
push 1
push esi
push 0
push ecx
push 0xfffffffffffffffe
mov ecx, ebx
call fcn.0040bdc0
inc dword [ebp - 0x1c]
jmp 0x40c780
mov dword [ebp - 4], 0
mov eax, dword [ebx + 0x38]
mov ecx, dword [eax]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [ebp - 0x18]
push 0
lea edx, [ebp - 0x2c]
push edx
push 0x1d
push str.____Computer_configuration:_r_n
push ecx
mov byte [ebp - 4], 0x14
call edi
push esi
call fcn.00405630
add esp, 4
push 0
lea edx, [ebp - 0x2c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
mov eax, dword [ebx + 0x38]
mov ecx, dword [eax]
push esi
push ecx
call edi
mov edx, dword [ebx + 0x3c]
cmp dword [edx], 0
je 0x40c8ad
mov byte [esi], 0
mov eax, dword [ebx + 0x3c]
mov ecx, dword [eax]
push esi
call ecx
add esp, 4
cmp byte [esi], 0
je 0x40c8ad
mov eax, dword [ebx + 0x38]
mov ecx, dword [eax]
push 0
lea edx, [ebp - 0x2c]
push edx
push 0x1d
push str.____Additional_information:_r_n
push ecx
call edi
push 0
lea edx, [ebp - 0x2c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
mov eax, dword [ebx + 0x38]
mov ecx, dword [eax]
push esi
push ecx
call edi
mov dword [ebp - 4], 0
jmp 0x40c8c6
xor cl, cl
mov byte [ebp - 4], 0x16
xor eax, eax
mov edi, edi
cmp eax, 9
jg 0x40c8e4
mov edx, dword [ebx + 0x20]
test dword [edx + eax*4], 0x800000
jne 0x40c8ec
inc eax
jmp 0x40c8d0
test cl, cl
je 0x40ca00
mov ecx, dword [ebx + 0x38]
mov edx, dword [ecx]
push 0
lea eax, [ebp - 0x2c]
push eax
push 0x16
push str.____Buffered_traces:_r_n
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebx + 0x74]
cmp dword [eax], 0
je 0x40ca00
push 0
mov dword [ebp - 0x40], 0
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [ebp - 0x44], eax
cmp eax, 0xf
je 0x40c93a
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push 0xf
push eax
mov dword [ebp - 0x40], eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, dword [ebx + 0x84]
mov ecx, dword [ebx + 0x7c]
mov dword [ebx + 4], 0xfffffffe
mov edi, dword [eax]
mov edx, dword [ecx]
mov eax, edi
mov byte [ebp - 4], 0x17
mov dword [ebp - 0x18], edx
call fcn.004c6460
mov dword [ebp - 0x10], esp
mov ecx, dword [ebx + 0x74]
mov edx, dword [ecx]
mov esi, esp
push edi
push edx
push esi
call sub.MSVCR100.dll_memcpy
mov eax, dword [ebx + 0x7c]
mov dword [eax], 0
mov ecx, dword [ebx + 0x80]
mov eax, dword [ecx]
mov edx, dword [ebx + 0x84]
mov dword [edx], eax
mov ecx, dword [ebx + 0x78]
mov edx, dword [ecx]
mov eax, dword [ebx + 0x74]
mov ecx, dword [eax]
push edx
push 0
push ecx
call sub.MSVCR100.dll_memset
mov edx, dword [ebx + 0x2c]
mov eax, dword [ebp - 0x18]
mov ecx, dword [edx]
add esp, 0x18
mov dword [ebp - 0x20], ecx
mov ecx, eax
cmp eax, edi
jge 0x40c9b4
cmp byte [esi + ecx], 0
jne 0x40c9c2
lea edx, [edi - 1]
cmp ecx, edx
jge 0x40c9da
cmp byte [esi + ecx + 1], 0
je 0x40c9da
mov cl, byte [eax + esi]
inc eax
test cl, cl
jne 0x40c9c2
mov edx, dword [ebp - 0x20]
push edx
push edi
push eax
push esi
push 0xfffffffffffffffe
mov ecx, ebx
call fcn.00408730
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
push eax
push ecx
push 0
push esi
push 0xfffffffffffffffe
mov ecx, ebx
call fcn.00408730
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x40ca00
mov edx, dword [ebp - 0x44]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov dword [ebp - 4], 0
mov eax, dword [ebx + 0x40]
cmp dword [eax], 0
je 0x40cac7
mov edi, dword [ebp - 0x54]
push 0x104
push edi
push 0
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
cmp byte [edi], 0
mov dword [ebp - 4], 0x19
je 0x40ca6e
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
dec eax
test eax, eax
js 0x40ca53
mov cl, byte [eax + edi]
cmp cl, 0x5c
je 0x40ca53
cmp cl, 0x2f
jne 0x40ca41
lea ecx, [eax + edi + 1]
mov dword [ebp - 0x18], ecx
jmp 0x40ca75
mov dword [ebp - 0x18], 0
mov esi, dword [ebx + 0x34]
test esi, esi
je 0x40caa0
cmp byte [esi], 0
je 0x40caa0
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
dec eax
test eax, eax
js 0x40ca9a
mov cl, byte [esi + eax]
cmp cl, 0x5c
je 0x40ca9a
cmp cl, 0x2f
jne 0x40ca88
lea eax, [esi + eax + 1]
jmp 0x40caa2
xor eax, eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebx + 0x40]
mov edx, dword [edx]
push ecx
mov ecx, dword [ebx + 0x38]
push edi
push eax
mov eax, dword [ebx + 0x34]
push eax
mov eax, dword [ecx]
mov ecx, dword [ebp - 0x24]
push eax
push ecx
call edx
add esp, 0x18
mov dword [ebp - 4], 0
cmp dword [ebp + 0x370], 0
je 0x40cadf
push 1
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp byte [ebp - 0x11], 0
mov esi, dword [ebp - 0x24]
je 0x40cb6a
test esi, esi
jne 0x40cb6e
mov ebx, dword [ebp - 0x3c]
lea edi, [esi + 1]
cmp ebx, edi
jbe 0x40cb1e
mov edi, edi
mov esi, dword [ebp + edi*4 - 0x154]
test esi, esi
je 0x40cb19
push esi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, ebx
jb 0x40cb00
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40cb30
mov edx, dword [ebp - 0x34]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
xor eax, eax
lea esp, [ebp - 0x164]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x360]
xor ecx, ebp
call fcn.004c6212
lea esp, [ebp + 0x364]
pop ebp
ret 8
test esi, esi
je 0x40cb1e
test byte [0x54e884], 1
jne 0x40cb90
or dword [0x54e884], 1
push 0x40cbe0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [0x54e880], eax
jmp 0x40cb95
mov eax, dword [0x54e880]
test eax, eax
je 0x40cb1e
test byte [0x54e884], 1
jne 0x40cbb9
or dword [0x54e884], 1
push 0x40cbe0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [0x54e880], eax
push esi
call eax
mov esi, eax
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40cbd0
mov ecx, dword [ebp - 0x34]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, esi
jmp 0x40cb32