Function at 0x404370
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov eax, dword [0x483074]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp], 0x4710a1
mov dword [esp + 0xc], eax
mov eax, dword [0x483078]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
call fcn.004059a0
mov dword [esp], 0x4710a1
mov dword [esp + 4], eax
call fcn.00405880
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x403180
mov dword [esp + 4], 0x4031b0
mov dword [esp], 0x1f4
mov dword [esp + 0x20], eax
call fcn.00441180
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x403180
mov dword [esp + 4], 0x4031b0
mov dword [esp], 0x1f4
mov dword [0x483194], eax
call fcn.00441180
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x403180
mov dword [esp + 4], 0x4031b0
mov dword [esp], 0x1f4
mov dword [0x483190], eax
call fcn.00441180
mov dword [esp + 0x10], 0x40ad60
mov dword [esp + 0xc], 0x40ad20
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x483160
mov dword [0x48318c], eax
call fcn.0043e050
mov dword [esp + 0x10], 0x40ad60
mov dword [esp + 0xc], 0x40ad20
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x483120
call fcn.0043e050
mov dword [esp], str.TLINK_VERBOSE
call sub.msvcrt.dll_getenv
test eax, eax
je 0x404526
mov dword [esp], eax
call sub.msvcrt.dll_atoi
mov dword [0x48319c], eax
call fcn.00441b70
mov ebx, dword [esp + 0x20]
test ebx, ebx
mov dword [0x483198], eax
jne 0x40455f
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp + 4], eax
mov eax, dword [0x483078]
mov dword [esp], eax
call fcn.004028d0
mov eax, dword [0x483078]
mov dword [esp], eax
call sub.msvcrt.dll__unlink
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov eax, dword [0x483074]
mov dword [esp], eax
call fcn.004028d0
mov eax, dword [0x483074]
mov dword [esp], eax
call sub.msvcrt.dll__unlink
mov byte [0x483020], 1
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp byte [0x4831e1], 0
mov dword [0x48319c], 1
je 0x404543
mov dword [0x48319c], 2
cmp byte [0x4831e2], 0
je 0x4044b5
mov dword [0x48319c], 3
jmp 0x4044b5
mov eax, dword [esp + 0x50]
mov ebx, dword [esp + 0x50]
mov eax, dword [eax]
test eax, eax
jne 0x404579
jmp 0x4045d5
add ebx, 4
mov eax, dword [ebx]
test eax, eax
je 0x4045d5
cmp byte [eax], 0x2d
je 0x404570
mov edx, str..rpo
call fcn.004031c0
mov dword [esp], eax
mov esi, eax
call fcn.004028a0
test eax, eax
je 0x404570
mov dword [esp], esi
call fcn.004418c0
mov dword [esp + 0xc], 1
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [0x483190]
mov dword [esp], eax
call fcn.00441500
mov edi, eax
mov eax, dword [eax]
test eax, eax
je 0x404910
add ebx, 4
call fcn.00403750
mov eax, dword [ebx]
test eax, eax
jne 0x404579
mov ecx, dword [0x483100]
test ecx, ecx
je 0x4045ec
call fcn.00403cf0
test eax, eax
je 0x404726
mov eax, dword [0x48314c]
test eax, eax
je 0x404726
mov dword [esp + 0x2c], 0x11
cmp dword [0x48319c], 2
jle 0x404668
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp + 4], eax
mov eax, dword [0x483078]
mov dword [esp], eax
call fcn.004028d0
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov eax, dword [0x483074]
mov dword [esp], eax
call fcn.004028d0
jmp 0x404668
test ebx, ebx
mov dword [0x483168], eax
mov dword [0x48316c], eax
je 0x4046a0
mov eax, dword [ebx]
mov dword [esp + 4], 3
mov dword [esp], eax
call fcn.004392d0
test eax, eax
jne 0x404790
mov eax, dword [0x48314c]
test eax, eax
je 0x4046a0
mov edx, dword [eax + 4]
cmp eax, dword [0x483164]
mov ebx, dword [eax]
mov dword [0x48314c], edx
jbe 0x40468c
cmp eax, dword [0x483170]
jb 0x404640
mov dword [esp + 4], eax
mov dword [esp], 0x483160
call fcn.0043e1c0
test ebx, ebx
jne 0x40464e
mov eax, dword [0x483078]
call fcn.00403950
test eax, eax
je 0x404865
call fcn.00403cf0
test eax, eax
je 0x404726
mov edx, dword [0x48319c]
test edx, edx
jne 0x404880
mov eax, dword [0x483074]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp], 0x4710a1
mov dword [esp + 0xc], eax
mov eax, dword [0x483078]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
call fcn.004059a0
mov dword [esp], 0x4710a1
mov dword [esp + 4], eax
call fcn.00405880
test eax, eax
mov dword [esp + 0x20], eax
je 0x4044cb
sub dword [esp + 0x2c], 1
jne 0x404601
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp + 4], eax
mov eax, dword [0x483078]
mov dword [esp], eax
call fcn.004028d0
mov eax, dword [0x483078]
mov dword [esp], eax
call sub.msvcrt.dll__unlink
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov eax, dword [0x483074]
mov dword [esp], eax
call fcn.004028d0
mov eax, dword [0x483074]
mov dword [esp], eax
call sub.msvcrt.dll__unlink
mov edi, dword [esp + 0x20]
mov dword [esp], str.ld_returned__d_exit_status
mov dword [esp + 4], edi
call fcn.0040a830
mov dword [esp], edi
call sub.msvcrt.dll_exit
nop
mov edx, 1
call fcn.00403390
mov esi, dword [eax + 4]
mov ebp, eax
test esi, esi
je 0x4048ff
mov edi, dword [esi]
mov edx, dword [esi + 4]
and edi, 0x7fffffff
cmp edi, edx
jne 0x404854
cmp byte [esi + 3], 0
jns 0x4048a0
mov dword [eax + 4], 0
lea edx, [edi + 1]
mov byte [esp + 0x27], 1
cmp edx, 4
mov eax, 4
cmovb edx, eax
lea eax, [edx*4 + 8]
mov dword [esp + 4], eax
mov dword [esp], 0
mov dword [esp + 0x28], edx
call fcn.0043e330
mov edx, dword [esp + 0x28]
mov ecx, edx
and ecx, 0x7fffffff
mov edx, dword [eax]
mov dword [ebp + 4], eax
mov dword [eax + 4], 0
and edx, 0x80000000
or edx, ecx
mov dword [eax], edx
shr edx, 0x18
and edx, 0x7f
cmp byte [esp + 0x27], 0
mov byte [eax + 3], dl
je 0x40493e
lea edx, [edi*4]
add eax, 8
add esi, 8
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov esi, dword [ebp + 4]
mov edx, edi
mov dword [esi + 4], edi
mov eax, dword [ebx]
lea ecx, [edx + 1]
mov dword [esi + 4], ecx
mov dword [esi + edx*4 + 8], eax
jmp 0x404668
mov eax, dword [0x483074]
call fcn.00403950
test eax, eax
jne 0x4046b2
jmp 0x404726
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.collect:_relinking_n
add eax, 0x40
mov dword [esp], eax
call fcn.00464320
jmp 0x4046c9
add edi, 1
mov dword [esp + 4], edi
mov eax, dword [esi]
and eax, 0x7fffffff
mov dword [esp], eax
call fcn.00404950
mov edi, eax
lea ecx, [eax*4 + 8]
mov eax, dword [ebp + 4]
test eax, eax
je 0x40493a
mov esi, dword [eax + 4]
mov dword [esp + 4], ecx
and edi, 0x7fffffff
mov dword [esp], eax
call fcn.0043e330
mov edx, esi
mov ecx, dword [eax]
mov dword [ebp + 4], eax
mov dword [eax + 4], esi
mov esi, eax
and ecx, 0x80000000
or ecx, edi
mov dword [eax], ecx
shr ecx, 0x18
and ecx, 0x7f
mov byte [eax + 3], cl
jmp 0x404854
mov byte [esp + 0x27], 0
xor edi, edi
mov edx, 1
jmp 0x4047d3
mov dword [esp + 4], 0x14
mov dword [esp], 1
call fcn.0043e2e0
mov dword [edi], eax
mov ebp, eax
mov dword [esp], esi
call fcn.00440340
mov dword [ebp], eax
mov eax, dword [edi]
jmp 0x4045c7
xor esi, esi
jmp 0x4048c9
mov esi, eax
xor edx, edx
jmp 0x404854