Function at 0x402032
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov dword [ebp - 0x18], 1
mov dword [esp], 0x10
call sub.cygwin1.dll_malloc
mov dword [ebp - 0x10], eax
mov dword [esp], 0xa0
call sub.cygwin1.dll_malloc
mov edi, eax
lea esi, [eax + 0xa0]
mov dword [ebp - 0x24], 0
mov dword [esp + 4], 1
mov dword [esp], 2
call sub.cygwin1.dll_signal
mov dword [esp + 4], 1
mov dword [esp], 3
call sub.cygwin1.dll_signal
mov dword [esp + 4], 1
mov dword [esp], 0xf
call sub.cygwin1.dll_signal
mov dword [esp + 4], 1
mov dword [esp], 1
call sub.cygwin1.dll_signal
mov dword [esp + 8], 0x180
mov dword [esp + 4], 0x202
mov dword [esp], str._var_games_greed_greed.hs
call sub.cygwin1.dll__open64
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
jne 0x402116
call sub.cygwin1.dll___getreent
mov dword [esp + 0xc], str._var_games_greed_greed.hs
mov edx, dword [0x406430]
mov dword [esp + 8], edx
mov dword [esp + 4], str._s:__s:_Cannot_open._n
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_fprintf
mov dword [esp], 1
call sub.cygwin1.dll_exit
mov dword [esp], 1
call fcn.0040236a
mov ebx, edi
cmp edi, esi
jae 0x402136
mov dword [ebx + 0xc], 0
add ebx, 0x10
cmp ebx, esi
jb 0x402128
mov dword [esp + 8], 0xa0
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.cygwin1.dll_read
cmp dword [ebp + 8], 0
je 0x402208
mov ebx, edi
cmp edi, esi
jae 0x402208
mov edx, dword [ebp + 8]
cmp dword [ebx + 0xc], edx
jl 0x402175
add ebx, 0x10
cmp ebx, esi
jb 0x402161
jmp 0x402208
cmp ebx, esi
jae 0x402208
mov dword [ebp - 0x24], ebx
lea ebx, [esi - 0x10]
cmp ebx, dword [ebp - 0x24]
jbe 0x4021a7
mov eax, dword [ebx - 0x10]
mov dword [ebx], eax
mov eax, dword [ebx - 0xc]
mov dword [ebx + 4], eax
mov eax, dword [ebx - 8]
mov dword [ebx + 8], eax
mov eax, dword [ebx - 4]
mov dword [ebx + 0xc], eax
sub ebx, 0x10
cmp ebx, dword [ebp - 0x24]
ja 0x402188
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x24]
mov dword [eax + 0xc], edx
call sub.cygwin1.dll__getuid32
mov dword [esp], eax
call sub.cygwin1.dll__getpwuid32
mov dword [esp + 8], 8
mov eax, dword [eax]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sub.cygwin1.dll_strncpy
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov edx, dword [ebp - 0x14]
mov dword [esp], edx
call sub.cygwin1.dll__lseek64
mov dword [esp + 8], 0xa0
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.cygwin1.dll_write
mov edx, dword [ebp - 0x14]
mov dword [esp], edx
call sub.cygwin1.dll_close
mov dword [esp], 0
call fcn.0040236a
cmp dword [edi + 0xc], 0
je 0x402233
mov dword [esp], str.Rank__Score__Name_____Percentage
call sub.cygwin1.dll_puts
jmp 0x40223f
mov dword [esp], str.No_high_scores.
call sub.cygwin1.dll_puts
cmp dword [ebp - 0x24], 0
je 0x4022b1
mov dword [esp], str.TERM
call sub.cygwin1.dll_getenv
mov dword [esp + 4], eax
mov dword [esp], 0x406020
call sub.cygncurses_8.dll_tgetent
test eax, eax
jle 0x4022b1
lea eax, [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], 0x4054ea
call sub.cygncurses_8.dll_tgetstr
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], 0x4054ed
call sub.cygncurses_8.dll_tgetstr
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x1c], 0
sete dl
test eax, eax
sete al
or eax, edx
test al, 1
je 0x4022b1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov ebx, edi
cmp edi, esi
jae 0x402362
cmp dword [edi + 0xc], 0
je 0x402362
cmp ebx, dword [ebp - 0x24]
sete al
cmp dword [ebp - 0x1c], 0
setne dl
movzx eax, al
test edx, eax
je 0x4022f4
mov dword [esp + 8], 0x402007
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.cygncurses_8.dll_tputs
fild dword [ebx + 0xc]
fdiv qword [0x405508]
fstp qword [esp + 0x10]
mov dword [esp + 0xc], ebx
mov eax, dword [ebx + 0xc]
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x18]
mov dword [esp + 4], edx
mov dword [esp], str.__5d___6d___8s__.2f___n
call sub.cygwin1.dll_printf
cmp ebx, dword [ebp - 0x24]
sete al
cmp dword [ebp - 0x20], 0
setne dl
movzx eax, al
test edx, eax
je 0x40234e
mov dword [esp + 8], 0x402007
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.cygncurses_8.dll_tputs
add ebx, 0x10
inc dword [ebp - 0x18]
cmp ebx, esi
jae 0x402362
cmp dword [ebx + 0xc], 0
jne 0x4022c5
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret