Function at 0x401c5e
Capabilities:
Print debug messages
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x948
push ebx
xor ebx, ebx
cmp dword [0x410a70], ebx
push esi
push edi
jne 0x401fb4
call fcn.00401fef
mov dl, byte [0x410940]
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x307]
mov byte [ebp - 0x308], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x203]
mov byte [ebp - 0x204], dl
mov esi, 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x308]
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x140
lea eax, [ebp - 0x548]
push ebx
push eax
call fcn.004077e0
add esp, 0xc
lea eax, [ebp - 0x548]
push eax
lea eax, [ebp - 0x308]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, ebx
je 0x401cf7
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp - 0x51c]
push esi
push eax
lea eax, [ebp - 0x204]
push eax
call fcn.00405013
push 1
lea eax, [ebp - 0x204]
push 0x2e
push eax
call fcn.00404fd6
test eax, eax
je 0x401d32
push 1
lea eax, [ebp - 0x204]
push 0x2e
push eax
call fcn.00404fd6
and byte [eax], 0
mov al, byte [0x410940]
push 0x3f
mov byte [ebp - 0x100], al
pop ecx
xor eax, eax
lea edi, [ebp - 0xff]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, 0x100
lea eax, [ebp - 0x100]
push edi
push eax
push dword [ebp + 8]
call fcn.00402090
cmp byte [ebp - 0x100], 0
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
jne 0x401d91
mov eax, dword [ebp + 8]
push dword [ebp + 8]
and eax, 0xffff
xor ecx, ecx
push eax
call fcn.00401fbd
push eax
lea eax, [ebp - 0x100]
push eax
call esi
add esp, 0x10
mov ecx, dword [ebp + 0xc]
test ecx, ecx
mov ebx, ecx
je 0x401dc1
cmp byte [ecx], 0
je 0x401dc1
cmp dword [ebp + 0x10], 0xfffffffe
je 0x401dab
cmp dword [ebp + 0x10], 0xfffffffd
jne 0x401dc1
push edi
lea edx, [ebp - 0x408]
call fcn.0040202c
test eax, eax
je 0x401dc1
lea ebx, [ebp - 0x408]
push 0x7fffffff
lea eax, [ebp - 0x948]
push ebx
push eax
call fcn.00405013
cmp dword [ebp + 0x10], 0
lea edi, [ebp + eax - 0x948]
jle 0x401df6
push dword [ebp + 0x10]
push str.__u_
push edi
call esi
add esp, 0xc
push edi
call fcn.00405193
add edi, eax
mov eax, dword [ebp + 8]
and eax, 0xffff
push eax
push str._:_error__u:
push edi
call esi
add esp, 0xc
push edi
call fcn.00405193
add edi, eax
lea eax, [ebp - 0x100]
push 0x7fffffff
push eax
push edi
call fcn.00405013
lea eax, [ebp - 0x948]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [ebp - 0x100]
push eax
push 1
pop ecx
call fcn.00401fbd
push eax
lea eax, [ebp - 0x948]
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x948]
push eax
call fcn.00405193
lea edi, [ebp + eax - 0x948]
lea eax, [ebp - 0x308]
push eax
push 2
pop ecx
call fcn.00401fbd
push eax
push edi
call esi
add esp, 0xc
push edi
call fcn.00405193
add edi, eax
test ebx, ebx
je 0x401ed8
cmp byte [ebx], 0
je 0x401ed8
mov eax, dword [ebp + 0x10]
cmp eax, 0xfffffffc
je 0x401ec0
cmp eax, 0xfffffffd
je 0x401ebb
cmp eax, 0xfffffffe
je 0x401eb6
cmp eax, 0xffffffff
je 0x401eb1
push eax
push ebx
push 3
pop ecx
call fcn.00401fbd
push eax
push edi
call esi
add esp, 0x10
jmp 0x401ed0
push ebx
push 4
jmp 0x401ec3
push ebx
push 5
jmp 0x401ec3
push ebx
push 6
jmp 0x401ec3
push ebx
push 0xb
pop ecx
call fcn.00401fbd
push eax
push edi
call esi
add esp, 0xc
push edi
call fcn.00405193
add edi, eax
cmp dword [ebp + 8], 0x85100000
mov eax, dword [ebp + 0x14]
jne 0x401ef2
test eax, eax
jne 0x401eed
mov eax, 0x410940
push eax
push 7
jmp 0x401efe
test eax, eax
jne 0x401efb
mov eax, 0x410940
push eax
push 8
pop ecx
call fcn.00401fbd
push eax
push edi
call esi
add esp, 0xc
push edi
call fcn.00405193
xor ebx, ebx
add edi, eax
cmp dword [ebp + 0x18], ebx
push 0x7fffffff
je 0x401f23
push 0xa
jmp 0x401f25
push 9
pop ecx
call fcn.00401fbd
push eax
push edi
call fcn.00405013
mov eax, dword [ebp + 0x18]
neg eax
sbb eax, eax
and eax, 2
inc eax
or eax, 0x52010
push eax
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x948]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, eax
call fcn.00402020
cmp dword [ebp + 0x18], ebx
je 0x401f6e
cmp esi, 7
jne 0x401f6e
push 1
pop eax
jmp 0x401fb6
cmp esi, 2
jne 0x401f74
int3
push 1
call fcn.004021f5
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test eax, 0x80000000
je 0x401fa8
lea eax, [ebp + 0x10]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x401fa8
cmp dword [ebp + 0x10], 0x103
jne 0x401fb4
push dword [ebp + 0x1c]
call esi
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x18