Function at 0x401a66
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
test byte [0x406010], 0x40
jne 0x401ab6
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
mov dword [esp], eax
call fcn.00401211
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebx]
mov ebx, dword [ecx + 0x24]
xor ebx, edx
xor eax, dword [ecx + 0x20]
or ebx, eax
jne 0x401ab6
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
mov dword [esp], eax
call fcn.004011e9
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov ecx, 0
cmp eax, dword [edx + 0x18]
je 0x401d94
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.004011b7
mov edi, dword [ebp + 0xc]
mov ecx, dword [edi]
cmp dword [ecx + 0xc], edx
jl 0x401ade
jg 0x401ad4
cmp dword [ecx + 8], eax
jbe 0x401ade
mov eax, 0xffffffff
jmp 0x401cfa
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebx]
cmp dword [ecx + 0xc], edx
jg 0x401af9
jl 0x401aef
cmp dword [ecx + 8], eax
jae 0x401af9
mov eax, 1
jmp 0x401cfa
mov edi, dword [ebp + 0xc]
mov eax, dword [edi]
cmp dword [eax + 0x10], 0
jne 0x401b72
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00401956
mov esi, eax
mov ecx, 0
test eax, eax
je 0x401d94
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax]
cld
mov ecx, 0xffffffff
mov al, 0
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
mov dword [esp], ecx
call sub.cygwin1.dll_malloc
mov dword [ebx + 0x10], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
cmp dword [eax + 0x10], 0
jne 0x401b5e
mov dword [esp], str.out_of_memory_n
call fcn.00401050
mov dword [esp], 1
call sub.cygwin1.dll_exit
mov dword [esp + 4], esi
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
mov dword [esp], eax
call sub.cygwin1.dll_strcpy
mov ebx, dword [ebp + 0x10]
cmp dword [ebx + 0x10], 0
jne 0x401bde
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00401956
mov esi, eax
mov ecx, 0
test eax, eax
je 0x401d94
cld
mov ecx, 0xffffffff
mov al, 0
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
mov dword [esp], ecx
call sub.cygwin1.dll_malloc
mov edx, dword [ebp + 0x10]
mov dword [edx + 0x10], eax
test eax, eax
jne 0x401bcc
mov dword [esp], str.out_of_memory_n
call fcn.00401050
mov dword [esp], 1
call sub.cygwin1.dll_exit
mov dword [esp + 4], esi
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 0x10]
mov dword [esp], eax
call sub.cygwin1.dll_strcpy
mov edi, dword [ebp + 0xc]
mov ebx, dword [edi]
mov eax, dword [ebx + 0x10]
mov dword [esp + 4], eax
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x10]
mov dword [esp], eax
call sub.cygwin1.dll_strcmp
test eax, eax
jne 0x401cfa
cmp dword [ebx + 0x14], 0
jne 0x401c74
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00401933
mov esi, eax
mov ecx, 0
test eax, eax
je 0x401d94
mov ecx, dword [ebp + 0xc]
mov ebx, dword [ecx]
cld
mov ecx, 0xffffffff
mov al, 0
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
mov dword [esp], ecx
call sub.cygwin1.dll_malloc
mov dword [ebx + 0x14], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
cmp dword [eax + 0x14], 0
jne 0x401c60
mov dword [esp], str.out_of_memory_n
call fcn.00401050
mov dword [esp], 1
call sub.cygwin1.dll_exit
mov dword [esp + 4], esi
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
mov eax, dword [eax + 0x14]
mov dword [esp], eax
call sub.cygwin1.dll_strcpy
mov ebx, dword [ebp + 0x10]
cmp dword [ebx + 0x14], 0
jne 0x401ce0
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00401933
mov esi, eax
mov ecx, 0
test eax, eax
je 0x401d94
cld
mov ecx, 0xffffffff
mov al, 0
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
mov dword [esp], ecx
call sub.cygwin1.dll_malloc
mov edx, dword [ebp + 0x10]
mov dword [edx + 0x14], eax
test eax, eax
jne 0x401cce
mov dword [esp], str.out_of_memory_n
call fcn.00401050
mov dword [esp], 1
call sub.cygwin1.dll_exit
mov dword [esp + 4], esi
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 0x14]
mov dword [esp], eax
call sub.cygwin1.dll_strcpy
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
mov eax, dword [eax + 0x14]
mov dword [esp + 4], eax
mov edi, dword [ebp + 0x10]
mov eax, dword [edi + 0x14]
mov dword [esp], eax
call sub.cygwin1.dll_strcmp
test eax, eax
jns 0x401d40
mov eax, dword [ebp + 0xc]
cmp dword [eax + 4], 0
je 0x401d24
mov edx, dword [ebp + 0x10]
mov dword [esp + 8], edx
mov eax, dword [eax + 4]
mov dword [esp + 4], eax
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call fcn.00401a66
mov ecx, eax
jmp 0x401d94
mov edi, dword [ebp + 0x10]
mov dword [esp + 4], edi
mov eax, dword [ebp + 0xc]
add eax, 4
mov dword [esp], eax
call fcn.004019fd
mov ecx, 0
jmp 0x401d94
test eax, eax
jle 0x401d86
mov eax, dword [ebp + 0xc]
cmp dword [eax + 8], 0
je 0x401d6a
mov edx, dword [ebp + 0x10]
mov dword [esp + 8], edx
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call fcn.00401a66
mov ecx, eax
jmp 0x401d94
mov edi, dword [ebp + 0x10]
mov dword [esp + 4], edi
mov eax, dword [ebp + 0xc]
add eax, 8
mov dword [esp], eax
call fcn.004019fd
mov ecx, 0
jmp 0x401d94
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call fcn.004019b3
mov ecx, dword [ebp + 0xc]
mov eax, ecx
add esp, 0xc
pop ebx
pop esi
pop edi
pop ebp
ret