Function at 0x41f420
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x44
push 0x4b84cc
push str.BFD_header_file_version__s_n
call fcn.0041efd0
mov dword [esp], 0
call fcn.004a6770
add esp, 0x10
mov dword [ebp - 0x40], eax
mov eax, dword [0x4afb10]
mov edi, dword [eax]
test edi, edi
je 0x41f581
mov dword [ebp - 0x44], 1
mov dword [ebp - 0x1c], 4
jmp 0x41f4ad
call fcn.004238e0
cmp eax, 5
je 0x41f488
sub esp, 0xc
mov eax, dword [edi]
push eax
call fcn.0041f3a0
mov dword [ebp - 0x44], 0
add esp, 0x10
sub esp, 0xc
push esi
call fcn.004262b0
add esp, 0x10
mov edx, dword [ebp - 0x1c]
mov eax, dword [0x4afb10]
mov edi, dword [eax + edx]
add edx, 4
mov dword [ebp - 0x1c], edx
test edi, edi
je 0x41f554
push edx
push edx
mov eax, dword [edi]
push eax
mov eax, dword [ebp - 0x40]
push eax
call fcn.00426460
mov esi, eax
mov eax, dword [edi + 8]
call fcn.0041ebd0
push eax
mov eax, dword [edi + 0xc]
call fcn.0041ebd0
push eax
mov eax, dword [edi]
push eax
push str._s_n__header__s__data__s__n
call fcn.0041efd0
add esp, 0x20
test esi, esi
je 0x41f539
push eax
push eax
push 1
push esi
call fcn.00426920
mov ebx, 2
add esp, 0x10
test eax, eax
jne 0x41f522
jmp 0x41f469
push ecx
push ecx
push 0
push ebx
call fcn.00424ee0
pop edi
pop edx
push eax
push str.___s_n
call fcn.0041efd0
add esp, 0x10
inc ebx
cmp ebx, 0x5c
je 0x41f488
push edi
mov eax, dword [esi + 4]
push 0
push ebx
push esi
call dword [eax + 0x150]
add esp, 0x10
test eax, eax
je 0x41f518
jmp 0x41f4fe
sub esp, 0xc
mov eax, dword [ebp - 0x40]
push eax
call fcn.0041f3a0
add esp, 0x10
mov dword [ebp - 0x44], 0
jmp 0x41f494
sub esp, 0xc
mov esi, dword [ebp - 0x40]
push esi
call sub.msvcrt.dll__unlink
pop ebx
mov ecx, dword [ebp - 0x40]
push ecx
call fcn.004ae988
mov edx, dword [ebp - 0x44]
add esp, 0x10
mov eax, 1
test edx, edx
jne 0x41f59a
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
mov edx, dword [ebp - 0x40]
push edx
call sub.msvcrt.dll__unlink
pop eax
mov eax, dword [ebp - 0x40]
push eax
call fcn.004ae988
add esp, 0x10
sub esp, 0xc
push str.COLUMNS
call sub.msvcrt.dll_getenv
add esp, 0x10
test eax, eax
je 0x41f5c1
sub esp, 0xc
push eax
call sub.msvcrt.dll_atoi
add esp, 0x10
mov dword [ebp - 0x38], eax
test eax, eax
jne 0x41f5c8
mov dword [ebp - 0x38], 0x50
mov ebx, dword [sym.imp.msvcrt.dll__iob]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x3c], 1
add ebx, 0x20
mov eax, dword [ebp - 0x24]
mov esi, dword [0x4afb10]
shl eax, 2
mov dword [ebp - 0x34], eax
mov eax, dword [eax + esi]
test eax, eax
je 0x41f91b
sub esp, 0xc
mov edi, dword [eax]
push edi
call sub.msvcrt.dll_strlen
add esp, 0x10
lea edi, [eax + 0x10]
mov eax, dword [ebp - 0x24]
inc eax
cmp dword [ebp - 0x38], edi
mov dword [ebp - 0x18], eax
jle 0x41f910
mov edx, eax
mov eax, dword [esi + eax*4]
test eax, eax
je 0x41f910
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x14], edx
add esi, ecx
jmp 0x41f642
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 8]
add esi, 4
test eax, eax
je 0x41f659
sub esp, 0xc
mov eax, dword [eax]
push eax
call sub.msvcrt.dll_strlen
add esp, 0x10
lea edi, [edi + eax + 1]
cmp dword [ebp - 0x38], edi
jg 0x41f631
push ecx
push 0x4b8539
push 0xf
push str._n_s
call fcn.0041efd0
mov edx, dword [ebp - 0x14]
add esp, 0x10
cmp dword [ebp - 0x24], edx
jge 0x41f6b7
mov eax, dword [0x4afb10]
mov edx, dword [ebp - 0x34]
mov eax, dword [eax + edx]
test eax, eax
je 0x41f6b7
mov edi, dword [ebp - 0x18]
mov esi, dword [ebp - 0x24]
shl edi, 2
jmp 0x41f69f
mov eax, dword [0x4afb10]
mov eax, dword [eax + edi]
add edi, 4
test eax, eax
je 0x41f6b7
push edx
push edx
mov eax, dword [eax]
inc esi
push eax
push 0x4b8540
call fcn.0041efd0
add esp, 0x10
cmp esi, dword [ebp - 0x14]
jne 0x41f690
mov eax, dword [ebx + 4]
dec eax
mov dword [ebx + 4], eax
test eax, eax
js 0x41f92d
mov edx, dword [sym.imp.msvcrt.dll__iob]
mov eax, dword [edx + 0x20]
mov byte [eax], 0xa
inc eax
mov dword [edx + 0x20], eax
sub esp, 0xc
push 0
call fcn.004a6770
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x18]
shl eax, 2
add esp, 0x10
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x30], 2
mov dword [ebp - 0x48], eax
jmp 0x41f710
mov eax, dword [ebp - 0x30]
inc eax
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0x5c
je 0x41f875
mov ecx, dword [ebp - 0x30]
push esi
push esi
push 0
push ecx
call fcn.00424ee0
cld
mov esi, eax
mov ecx, 9
mov edi, 0x4b8544
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
add esp, 0x10
cmp dl, al
je 0x41f6ff
mov eax, dword [ebp - 0x30]
push edx
push edx
push 0
push eax
call fcn.00424ee0
add esp, 0xc
push eax
push 0xe
push str._s
call fcn.0041efd0
mov edx, dword [ebp - 0x14]
add esp, 0x10
cmp dword [ebp - 0x24], edx
jge 0x41f84d
mov eax, dword [0x4afb10]
mov edx, dword [ebp - 0x34]
mov esi, dword [edx + eax]
test esi, esi
je 0x41f84d
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], edx
push eax
push eax
mov eax, dword [esi]
push eax
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00426460
add esp, 0x10
mov edi, eax
test eax, eax
je 0x41f7ba
push eax
push eax
push 1
push edi
call fcn.00426920
add esp, 0x10
test eax, eax
jne 0x41f8b9
call fcn.004238e0
cmp eax, 5
je 0x41f7cf
sub esp, 0xc
mov eax, dword [esi]
push eax
call fcn.0041f3a0
mov dword [ebp - 0x28], 0
add esp, 0x10
sub esp, 0xc
mov eax, dword [esi]
push eax
call sub.msvcrt.dll_strlen
add esp, 0x10
mov esi, eax
jmp 0x41f7f8
mov eax, dword [ebx + 4]
dec eax
mov dword [ebx + 4], eax
test eax, eax
js 0x41f8a7
mov eax, dword [ebx]
mov byte [eax], 0x2d
inc eax
mov dword [ebx], eax
dec esi
cmp esi, 0xffffffff
jne 0x41f7e1
mov eax, dword [ebx + 4]
dec eax
mov dword [ebx + 4], eax
test eax, eax
js 0x41f8ec
mov eax, dword [ebx]
mov byte [eax], 0x20
inc eax
mov dword [ebx], eax
test edi, edi
je 0x41f825
sub esp, 0xc
push edi
call fcn.004262b0
add esp, 0x10
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x10], eax
je 0x41f84d
mov edx, dword [ebp - 0x20]
mov eax, dword [0x4afb10]
mov esi, dword [eax + edx]
add edx, 4
mov dword [ebp - 0x20], edx
test esi, esi
jne 0x41f784
mov eax, dword [ebx + 4]
dec eax
mov dword [ebx + 4], eax
test eax, eax
js 0x41f8fe
mov eax, dword [ebx]
mov byte [eax], 0xa
inc eax
mov dword [ebx], eax
mov eax, dword [ebp - 0x30]
inc eax
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0x5c
jne 0x41f710
sub esp, 0xc
mov edi, dword [ebp - 0x2c]
push edi
call sub.msvcrt.dll__unlink
pop esi
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.004ae988
neg dword [ebp - 0x28]
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x28]
and edx, eax
add esp, 0x10
mov dword [ebp - 0x3c], edx
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x24], edx
jmp 0x41f5df
push eax
push eax
push ebx
push 0x2d
call fcn.004aea20
add esp, 0x10
jmp 0x41f7f8
push eax
mov ecx, dword [ebp - 0x30]
mov eax, dword [edi + 4]
push 0
push ecx
push edi
call dword [eax + 0x150]
add esp, 0x10
test eax, eax
je 0x41f7cf
push ecx
push ecx
mov edx, dword [esi]
push edx
push 0x4b8540
call fcn.0041efd0
add esp, 0x10
jmp 0x41f819
push eax
push eax
push ebx
push 0x20
call fcn.004aea20
add esp, 0x10
jmp 0x41f815
push eax
push eax
push ebx
push 0xa
call fcn.004aea20
add esp, 0x10
jmp 0x41f6ff
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
jmp 0x41f659
mov eax, dword [ebp - 0x3c]
test eax, eax
sete al
and eax, 0xff
jmp 0x41f579
push edi
push edi
push ebx
push 0xa
call fcn.004aea20
add esp, 0x10
jmp 0x41f6d6