Function at 0x401410
Capabilities:
Terminate process

Disassembly:
push ebp
push edi
push esi
mov esi, eax
push ebx
mov ebx, edx
sub esp, 0x3c
mov ecx, dword [esi + 0x20]
mov eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x18]
lea edx, [ecx - 0x1c]
cmp eax, edx
je 0x401498
mov edx, dword [ebx]
add eax, 0x1c
mov dword [eax - 0x1c], edx
movzx edx, word [ebx + 8]
mov word [eax - 0x14], dx
movzx edx, byte [ebx + 0xa]
mov dword [eax - 0x18], 0x47f35c
mov byte [eax - 0x12], dl
movzx edx, byte [ebx + 0xb]
mov byte [eax - 0x11], dl
movzx edx, word [ebx + 0x10]
mov word [eax - 0xc], dx
movzx edx, byte [ebx + 0x12]
mov dword [eax - 0x10], 0x47f29c
mov byte [eax - 0xa], dl
mov edx, dword [ebx + 0x14]
mov dword [eax - 8], edx
mov edx, dword [ebx + 0x18]
mov dword [eax - 4], edx
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x2c]
sub eax, dword [sym.imp.cygwin1.dll___stack_chk_guard]
jne 0x401698
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [esi + 0x24]
mov ecx, dword [esi + 0x14]
sub eax, dword [esi + 0x1c]
mov edx, edi
sar eax, 2
sub edx, ecx
mov ebp, edx
mov dword [esp + 0x18], edx
mov edx, dword [esi + 0x10]
sub edx, dword [esi + 8]
sar ebp, 2
sar edx, 2
add eax, edx
mov edx, ebp
imul eax, eax, 0xb6db6db7
cmp edi, 1
adc edx, 0xffffffff
lea edx, [edx + edx*8]
lea eax, [eax + edx*2]
cmp eax, 0x4924924
je 0x40169d
mov eax, dword [esi + 4]
mov edx, edi
mov dword [esp + 0x14], eax
mov eax, dword [esi]
sub edx, eax
mov dword [esp + 0x1c], eax
mov eax, edx
mov edx, dword [esp + 0x14]
sar eax, 2
sub edx, eax
cmp edx, 1
jbe 0x401570
mov dword [esp], 0x1f8
call sub.cygwin1.dll___wrap__Znwj
mov edx, dword [ebx]
mov dword [edi + 4], eax
mov eax, dword [esi + 0x18]
mov dword [eax], edx
movzx edx, word [ebx + 8]
mov word [eax + 8], dx
movzx edx, byte [ebx + 0xa]
mov dword [eax + 4], 0x47f35c
mov byte [eax + 0xa], dl
movzx edx, byte [ebx + 0xb]
mov byte [eax + 0xb], dl
movzx edx, word [ebx + 0x10]
mov word [eax + 0x10], dx
movzx edx, byte [ebx + 0x12]
mov dword [eax + 0xc], 0x47f29c
mov byte [eax + 0x12], dl
mov edx, dword [ebx + 0x14]
mov dword [eax + 0x14], edx
mov edx, dword [ebx + 0x18]
mov dword [eax + 0x18], edx
mov eax, dword [esi + 0x24]
lea edx, [eax + 4]
mov eax, dword [eax + 4]
mov dword [esi + 0x24], edx
lea edx, [eax + 0x1f8]
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], edx
jmp 0x401478
add ebp, 2
mov edx, dword [esp + 0x14]
lea eax, [ebp + ebp]
cmp edx, eax
ja 0x401630
mov edi, dword [esp + 0x14]
mov eax, 1
test edi, edi
cmovne eax, edi
lea edi, [edi + eax + 2]
cmp edi, 0x1fffffff
ja 0x401686
lea eax, [edi*4]
mov dword [esp], eax
call sub.cygwin1.dll___wrap__Znwj
mov edx, dword [esi + 0x14]
mov ecx, eax
mov dword [esp + 0x14], eax
mov eax, edi
sub eax, ebp
shr eax, 1
lea ebp, [ecx + eax*4]
mov eax, dword [esi + 0x24]
add eax, 4
cmp eax, edx
je 0x4015de
sub eax, edx
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp], ebp
call sub.cygwin1.dll_memmove
mov eax, dword [esi + 4]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [esi]
mov dword [esp], eax
call sub.cygstdc_6.dll_operator_delete_void__unsigned_int_
mov eax, dword [esp + 0x14]
mov dword [esi + 4], edi
mov dword [esi], eax
mov eax, dword [ebp]
mov edi, dword [esp + 0x18]
mov dword [esi + 0x14], ebp
mov dword [esi + 0xc], eax
add edi, ebp
add eax, 0x1f8
mov dword [esi + 0x10], eax
mov eax, dword [edi]
mov dword [esi + 0x24], edi
mov dword [esi + 0x1c], eax
add eax, 0x1f8
mov dword [esi + 0x20], eax
jmp 0x4014fc
mov eax, dword [esp + 0x1c]
sub edx, ebp
add edi, 4
shr edx, 1
lea ebp, [eax + edx*4]
mov eax, edi
sub eax, ecx
cmp ecx, ebp
jbe 0x401660
cmp ecx, edi
je 0x4015fb
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], ebp
call sub.cygwin1.dll_memmove
jmp 0x4015fb
cmp ecx, edi
je 0x4015fb
mov edi, dword [esp + 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
lea edx, [edi + 4]
sub edx, eax
lea eax, [ebp + edx]
mov dword [esp], eax
call sub.cygwin1.dll_memmove
jmp 0x4015fb
cmp edi, 0x3fffffff
jbe 0x401693
call fcn.00450fd0
call fcn.00451018
call sub.cygwin1.dll___stack_chk_fail
mov dword [esp], 0x47643c
call fcn.00450ff0
nop
lea esi, [esi]