Function at 0x404f00
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
mov eax, dword [0x4563e4]
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 0x40501e
je 0x404fb5
sub eax, 2
je 0x404f6b
sub eax, 0x3fa
jne 0x405027
mov ecx, dword [edi + 0x64]
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
test al, al
je 0x4050bb
mov eax, dword [edi + 0x5c]
test eax, eax
je 0x4050bb
dec eax
mov dword [edi + 0x5c], eax
jmp 0x4050bb
mov ecx, dword [edi + 4]
push 0xfffffffffffffff0
push ecx
call dword [sym.imp.USER32.dll_GetWindowLongW]
test eax, 0x80000
je 0x4050bb
mov ecx, dword [edi + 0x64]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
test al, al
je 0x4050bb
mov esi, dword [0x458dc8]
mov ecx, 0x642
call fcn.0040d150
push 0x40b
mov esi, edi
call fcn.00404460
jmp 0x4050bb
mov ecx, dword [edi + 0x64]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
test al, al
jne 0x404fd5
mov eax, dword [0x458dc8]
call fcn.00409ee0
test al, al
je 0x4050bb
mov eax, dword [edi + 0x60]
cmp eax, 0xffffffff
je 0x404fec
mov dword [edi + 0x5c], eax
mov dword [edi + 0x60], 0xffffffff
jmp 0x4050bb
mov ecx, dword [edi + 0x50]
sub ecx, dword [edi + 0x4c]
mov eax, dword [edi + 0x5c]
sar ecx, 2
dec ecx
cmp eax, ecx
jae 0x405006
inc eax
mov dword [edi + 0x5c], eax
jmp 0x4050bb
mov edx, dword [edi + 4]
push 0
push edx
call dword [sym.imp.USER32.dll_EndDialog]
mov dword [edi + 0x10], 0x40b
jmp 0x4050b7
mov ebx, 0x40b
cmp eax, ebx
je 0x405051
mov edi, dword [edi + 0x38]
test edi, edi
je 0x40503b
cmp dword [ebp + 0xc], edi
jne 0x40503b
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.0042ee49
mov esp, ebp
pop ebp
ret 8
mov eax, dword [0x458dc8]
call fcn.00409ee0
test al, al
je 0x40507c
cmp byte [edi + 0x68], 0
jne 0x4050a8
mov ecx, dword [edi + 0x50]
sub ecx, dword [edi + 0x4c]
mov eax, dword [edi + 0x5c]
sar ecx, 2
dec ecx
cmp eax, ecx
jae 0x4050bb
inc eax
mov dword [edi + 0x5c], eax
jmp 0x4050bb
cmp byte [edi + 0x68], 0
je 0x40508a
mov edx, dword [edi + 4]
push 0
push edx
jmp 0x4050ae
mov ecx, dword [edi + 0x64]
mov eax, dword [ecx]
mov edx, dword [eax + 0x14]
call edx
test al, al
je 0x4050bb
mov esi, dword [0x458dc8]
mov ecx, 0x642
call fcn.0040d150
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 0x40510f
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.004045b0
mov ecx, dword [esp + 0x14]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0042ee49
mov esp, ebp
pop ebp
ret 8