Function at 0x40a440
Capabilities:
Print debug messages
Terminate process

Disassembly:
mov eax, dword [0x42a274]
sub esp, 0xd54
test eax, eax
push ebp
push esi
push edi
jne 0x40aa31
mov eax, dword [0x42a268]
test eax, eax
jne 0x40aa31
mov dword [0x42a268], 1
call fcn.0040a3f0
push 0x104
lea eax, [esp + 0x220]
push eax
push 0
mov byte [esp + 0x228], 0
mov byte [esp + 0x124], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
xor eax, eax
mov ecx, 0x50
lea edi, [esp + 0xb20]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xb20]
push ecx
lea edx, [esp + 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
test eax, eax
je 0x40a4c8
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x104
lea eax, [esp + 0xb50]
push eax
lea ecx, [esp + 0x120]
push ecx
call fcn.00409b20
push 0x2e
lea edx, [esp + 0x11c]
push edx
call fcn.00409a60
test eax, eax
je 0x40a507
push 0x2e
lea eax, [esp + 0x11c]
push eax
call fcn.00409a60
mov byte [eax], 0
mov ebp, dword [esp + 0xd64]
push 0x100
lea ecx, [esp + 0x1c]
push ecx
push ebp
mov byte [esp + 0x24], 0
call fcn.0040af00
mov al, byte [esp + 0x18]
test al, al
jne 0x40a54f
mov edx, ebp
push ebp
and edx, 0xffff
push edx
xor ecx, ecx
call fcn.0040a310
push eax
lea eax, [esp + 0x24]
push 0x100
push eax
call fcn.00409f10
add esp, 0x14
mov ecx, dword [esp + 0xd68]
test ecx, ecx
mov edi, ecx
push ebx
mov dword [esp + 0x14], edi
je 0x40a59b
cmp byte [ecx], 0
je 0x40a59b
mov ebx, dword [esp + 0xd70]
cmp ebx, 0xfffffffe
je 0x40a577
cmp ebx, 0xfffffffd
jne 0x40a5a2
push 0x100
lea edx, [esp + 0xc68]
call fcn.0040aac0
test eax, eax
je 0x40a5a2
lea ecx, [esp + 0xc64]
mov dword [esp + 0x14], ecx
mov edi, ecx
jmp 0x40a5a2
mov ebx, dword [esp + 0xd70]
test edi, edi
lea esi, [esp + 0x324]
je 0x40a5c7
push 0x800
push edi
lea edx, [esp + 0x32c]
push edx
call fcn.00409b20
lea esi, [esp + eax + 0x324]
test ebx, ebx
jle 0x40a5ec
push ebx
lea eax, [esp + 0xb28]
push str.__u_
sub eax, esi
push eax
push esi
call fcn.00409f10
add esp, 0x10
push esi
call fcn.00409cc0
add esi, eax
mov ecx, ebp
and ecx, 0xffff
push ecx
lea edx, [esp + 0xb28]
push str._:_error__u:
sub edx, esi
push edx
push esi
call fcn.00409f10
add esp, 0x10
push esi
call fcn.00409cc0
add esi, eax
lea eax, [esp + 0xb24]
sub eax, esi
push eax
lea ecx, [esp + 0x20]
push ecx
push esi
call fcn.00409b20
lea edx, [esp + 0x324]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [esp + 0x1c]
push eax
mov ecx, 1
call fcn.0040a310
push eax
lea ecx, [esp + 0x32c]
push 0x800
push ecx
call fcn.00409f10
add esp, 0x10
lea edx, [esp + 0x324]
push edx
call fcn.00409cc0
lea esi, [esp + eax + 0x324]
lea eax, [esp + 0x220]
push eax
mov ecx, 2
call fcn.0040a310
push eax
lea ecx, [esp + 0xb2c]
sub ecx, esi
push ecx
push esi
call fcn.00409f10
add esp, 0x10
push esi
call fcn.00409cc0
add esi, eax
test edi, edi
je 0x40a779
cmp byte [edi], 0
je 0x40a779
lea eax, [ebx + 5]
cmp eax, 4
ja case.default.0x40a6bc
jmp dword [eax*4 + 0x40aa40]
push edi
mov ecx, 4
call fcn.0040a310
push eax
lea edx, [esp + 0xb2c]
sub edx, esi
push edx
push esi
call fcn.00409f10
add esp, 0x10
jmp 0x40a771
mov ecx, 5
jmp 0x40a735
push edi
mov ecx, 6
call fcn.0040a310
push eax
lea ecx, [esp + 0xb2c]
sub ecx, esi
push ecx
push esi
call fcn.00409f10
add esp, 0x10
jmp 0x40a771
push edi
mov ecx, 0xb
call fcn.0040a310
push eax
lea edx, [esp + 0xb2c]
sub edx, esi
push edx
push esi
call fcn.00409f10
add esp, 0x10
jmp 0x40a771
mov ecx, 0xe
push edi
call fcn.0040a310
push eax
lea eax, [esp + 0xb2c]
sub eax, esi
push eax
push esi
call fcn.00409f10
add esp, 0x10
jmp 0x40a771
push ebx
push edi
mov ecx, 3
call fcn.0040a310
push eax
lea ecx, [esp + 0xb30]
sub ecx, esi
push ecx
push esi
call fcn.00409f10
add esp, 0x14
push esi
call fcn.00409cc0
add esi, eax
cmp ebp, 0x85100000
mov eax, dword [esp + 0xd74]
jne 0x40a7a9
test eax, eax
jne 0x40a791
mov eax, 0x42773c
push eax
mov ecx, 7
call fcn.0040a310
lea edx, [esp + 0xb28]
push eax
sub edx, esi
push edx
jmp 0x40a7c8
test eax, eax
jne 0x40a7b2
mov eax, 0x42773c
push eax
mov ecx, 8
call fcn.0040a310
push eax
lea eax, [esp + 0xb2c]
sub eax, esi
push eax
push esi
call fcn.00409f10
add esp, 0x10
push esi
call fcn.00409cc0
add esi, eax
call fcn.0040ab70
test eax, eax
mov eax, dword [esp + 0xd78]
je 0x40a854
test eax, eax
je 0x40a826
lea ecx, [esp + 0xb24]
sub ecx, esi
push ecx
mov ecx, 0xd
call fcn.0040a310
push eax
push esi
call fcn.00409b20
mov ecx, 0x30
mov eax, 0x103
mov edx, 7
mov edi, 2
mov ebx, 6
jmp 0x40a8b6
lea edx, [esp + 0xb24]
sub edx, esi
push edx
mov ecx, 0xc
call fcn.0040a310
push eax
push esi
call fcn.00409b20
mov eax, 0x104
mov edx, 7
xor edi, edi
mov ebx, 6
jmp 0x40a8b1
test eax, eax
je 0x40a88b
lea eax, [esp + 0xb24]
sub eax, esi
push eax
mov ecx, 0xa
call fcn.0040a310
push eax
push esi
call fcn.00409b20
mov ecx, 0x30
mov eax, 0x101
mov edx, 2
mov edi, 1
xor ebx, ebx
jmp 0x40a8b6
lea ecx, [esp + 0xb24]
sub ecx, esi
push ecx
mov ecx, 9
call fcn.0040a310
push eax
push esi
call fcn.00409b20
xor eax, eax
xor edi, edi
mov edx, 1
xor ebx, ebx
mov ecx, 0x10
or eax, ecx
or eax, 0x52000
test edi, edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], edi
jne 0x40a8cd
mov dword [esp + 0x10], edx
mov eax, dword [0x42a258]
xor edx, edx
test eax, eax
setle dl
dec edx
and edx, eax
mov ebp, edx
test ebp, ebp
jle 0x40a91b
mov eax, dword [esp + 0xd74]
test eax, eax
jne 0x40a8f2
mov eax, 0x42773c
mov ecx, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0xd74]
push eax
mov eax, dword [esp + 0xd70]
push ecx
lea edx, [esp + 0x28]
push edx
push eax
call dword [ebp + 8]
test eax, eax
je 0x40a95e
mov ebp, dword [ebp + 4]
test ebp, ebp
jg 0x40a8e2
call fcn.004105b0
mov ebp, eax
test ebp, ebp
je 0x40a93e
push ebp
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40a93c
push ebp
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
jne 0x40a93e
xor ebp, ebp
mov ecx, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x120]
push edx
lea eax, [esp + 0x32c]
push eax
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [esp + 0x10], eax
call fcn.0040a430
mov eax, dword [0x42a6cc]
xor ebp, ebp
cmp eax, ebp
jne 0x40a9a7
push 0x42a238
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebp, dword [0x42a27c]
push 0x42a238
mov dword [0x42a27c], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, ebp
lea ecx, [esp + 0x324]
mov byte [esi], 0
call fcn.0040abb0
xor ebp, ebp
mov eax, dword [esp + 0x10]
cmp eax, ebx
pop ebx
jne 0x40a9cc
call fcn.0040aa60
pop edi
pop esi
mov dword [0x42a268], ebp
mov eax, 1
pop ebp
add esp, 0xd54
ret 0x18
cmp eax, edi
jne 0x40a9e7
pop edi
pop esi
mov dword [0x42a268], ebp
mov eax, 1
pop ebp
add esp, 0xd54
ret 0x18
push 1
call fcn.0040b150
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
jns 0x40aa1a
lea ecx, [esp + 0x14]
push ecx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x40aa1a
cmp dword [esp + 0x14], 0x103
jne 0x40aa2b
mov edx, dword [esp + 0xd78]
push edx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x42a268], ebp
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0xd54
ret 0x18