Function at 0x4013e0
Capabilities:
Terminate process

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
xor ebx, ebx
push ecx
sub esp, 0x28
mov esi, dword [sym.imp.kernel32.dll_Sleep]
mov eax, dword fs:[0x18]
mov edi, dword [eax + 4]
jmp 0x4011a4
cmp edi, eax
je 0x401320
mov dword [esp], 0x3e8
call esi
sub esp, 4
mov eax, ebx
lock cmpxchg dword [0x4af15c], edi
test eax, eax
jne 0x401190
mov eax, dword [0x4af160]
xor ebx, ebx
cmp eax, 1
je 0x401333
mov eax, dword [0x4af160]
test eax, eax
je 0x4013a0
mov dword [0x4af008], 1
mov eax, dword [0x4af160]
cmp eax, 1
je 0x40134d
test ebx, ebx
je 0x401373
mov eax, dword [entry2]
test eax, eax
je 0x401214
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov dword [esp], 0
call eax
sub esp, 0xc
call fcn.004545a0
mov dword [esp], 0x454940
call dword [sym.imp.kernel32.dll_SetUnhandledExceptionFilter]
sub esp, 4
mov dword [0x4af198], eax
mov dword [esp], section..text
call sub.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler
call fcn.004543d0
mov esi, dword [0x4af01c]
lea edi, [esi*4 + 4]
mov dword [esp], edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov ebx, dword [0x4af018]
mov ecx, eax
test esi, esi
jle 0x4013c8
lea edx, [edi - 4]
mov esi, eax
mov dword [ebp - 0x20], ecx
lea eax, [ebx + edx]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x1c], eax
lea esi, cs:[esi]
lea esi, [esi]
mov eax, dword [ebx]
add esi, 4
add ebx, 4
mov dword [esp], eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
lea edi, [eax + 1]
mov dword [esp], edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov dword [esi - 4], eax
mov ecx, dword [ebx - 4]
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
cmp dword [ebp - 0x1c], ebx
jne 0x401280
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
add edx, ecx
mov dword [edx], 0
mov dword [0x4af018], ecx
call fcn.00454220
mov eax, dword [0x4af014]
mov edx, dword [0x45609c]
mov dword [edx], eax
mov dword [esp + 8], eax
mov eax, dword [0x4af018]
mov dword [esp + 4], eax
mov eax, dword [0x4af01c]
mov dword [esp], eax
call fcn.0040df40
mov ecx, dword [0x4af00c]
mov dword [0x4af010], eax
test ecx, ecx
je 0x4013cf
mov edx, dword [0x4af008]
test edx, edx
je 0x401380
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov eax, dword [0x4af160]
mov ebx, 1
cmp eax, 1
jne 0x4011c2
mov dword [esp], 0x1f
call fcn.00453f50
mov eax, dword [0x4af160]
cmp eax, 1
jne 0x4011e7
mov dword [esp + 4], 0x4b2008
mov dword [esp], section..CRT
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
mov dword [0x4af160], 2
test ebx, ebx
jne 0x4011ef
xchg dword [0x4af15c], ebx
jmp 0x4011ef
call sub.api_ms_win_crt_runtime_l1_1_0.dll__cexit
mov eax, dword [0x4af010]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [0x4af160], 1
mov dword [esp + 4], 0x4b2014
mov dword [esp], 0x4b200c
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
jmp 0x4011d9
mov edx, eax
jmp 0x4012be
mov dword [esp], eax
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
lea esi, cs:[esi]
nop
mov dword [0x4af180], 1
jmp 0x401160