Function at 0x404ea0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
mov eax, dword [0x4543e4]
xor eax, esp
mov dword [esp + 8], eax
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0x5c]
mov dword [esp + 0x10], eax
movzx eax, word [ebp + 8]
cmp eax, 0x401
jg 0x404fbe
je 0x404f55
sub eax, 2
je 0x404f0b
sub eax, 0x3fa
jne 0x404fc7
mov ecx, dword [edi + 0x64]
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
test al, al
je 0x40505b
mov eax, dword [edi + 0x5c]
test eax, eax
je 0x40505b
dec eax
mov dword [edi + 0x5c], eax
jmp 0x40505b
mov ecx, dword [edi + 4]
push 0xfffffffffffffff0
push ecx
call dword [sym.imp.USER32.dll_GetWindowLongW]
test eax, 0x80000
je 0x40505b
mov ecx, dword [edi + 0x64]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
test al, al
je 0x40505b
mov esi, dword [0x456d48]
mov ecx, 0x642
call fcn.0040d260
push 0x40b
mov esi, edi
call fcn.00404400
jmp 0x40505b
mov ecx, dword [edi + 0x64]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
test al, al
jne 0x404f75
mov eax, dword [0x456d48]
call fcn.0040a020
test al, al
je 0x40505b
mov eax, dword [edi + 0x60]
cmp eax, 0xffffffff
je 0x404f8c
mov dword [edi + 0x5c], eax
mov dword [edi + 0x60], 0xffffffff
jmp 0x40505b
mov ecx, dword [edi + 0x50]
sub ecx, dword [edi + 0x4c]
mov eax, dword [edi + 0x5c]
sar ecx, 2
dec ecx
cmp eax, ecx
jae 0x404fa6
inc eax
mov dword [edi + 0x5c], eax
jmp 0x40505b
mov edx, dword [edi + 4]
push 0
push edx
call dword [sym.imp.USER32.dll_EndDialog]
mov dword [edi + 0x10], 0x40b
jmp 0x405057
mov ebx, 0x40b
cmp eax, ebx
je 0x404ff1
mov edi, dword [edi + 0x38]
test edi, edi
je 0x404fdb
cmp dword [ebp + 0xc], edi
jne 0x404fdb
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 8]
xor ecx, esp
call fcn.0042e4c9
mov esp, ebp
pop ebp
ret 8
mov eax, dword [0x456d48]
call fcn.0040a020
test al, al
je 0x40501c
cmp byte [edi + 0x68], 0
jne 0x405048
mov ecx, dword [edi + 0x50]
sub ecx, dword [edi + 0x4c]
mov eax, dword [edi + 0x5c]
sar ecx, 2
dec ecx
cmp eax, ecx
jae 0x40505b
inc eax
mov dword [edi + 0x5c], eax
jmp 0x40505b
cmp byte [edi + 0x68], 0
je 0x40502a
mov edx, dword [edi + 4]
push 0
push edx
jmp 0x40504e
mov ecx, dword [edi + 0x64]
mov eax, dword [ecx]
mov edx, dword [eax + 0x14]
call edx
test al, al
je 0x40505b
mov esi, dword [0x456d48]
mov ecx, 0x642
call fcn.0040d260
mov eax, dword [edi + 4]
push 0
push eax
call dword [sym.imp.USER32.dll_EndDialog]
mov dword [edi + 0x10], ebx
mov byte [edi + 0xc], 1
mov ecx, dword [esp + 0x10]
cmp ecx, dword [edi + 0x5c]
je 0x4050af
mov edx, dword [edi + 4]
mov esi, dword [sym.imp.USER32.dll_GetDlgItem]
push 0x3fc
push edx
call esi
mov ebx, dword [sym.imp.USER32.dll_EnableWindow]
xor ecx, ecx
cmp ecx, dword [edi + 0x5c]
sbb edx, edx
neg edx
push edx
push eax
call ebx
mov eax, dword [edi + 4]
push 0x401
push eax
call esi
mov ecx, dword [edi + 0x50]
sub ecx, dword [edi + 0x4c]
sar ecx, 2
dec ecx
cmp dword [edi + 0x5c], ecx
sbb edx, edx
neg edx
push edx
push eax
call ebx
mov esi, edi
call fcn.00404550
mov ecx, dword [esp + 0x14]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0042e4c9
mov esp, ebp
pop ebp
ret 8