Function at 0x10054e4
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
push 0xf5
lea eax, [ebp - 0x218]
push eax
push 0x1001f4c
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
xor ebx, ebx
cmp eax, ebx
je 0x10057f0
push esi
push edi
lea edi, [ebp + eax - 0x218]
mov esi, 0x1001f40
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea eax, [ebp - 0x218]
push 0x1001530
push eax
movsb byte es:[edi], byte [esi]
call dword [sym.imp.msvcrt.dll_fopen]
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], esi
je 0x10057ee
push dword [0x1008088]
push esi
call fcn.01005486
test eax, eax
jne 0x1005571
push esi
call dword [sym.imp.msvcrt.dll_rewind]
mov dword [esp], 0x1001f38
push esi
call fcn.01005486
test eax, eax
jne 0x1005571
push esi
jmp 0x10057e7
push dword [ebp - 0xc]
lea eax, [ebp - 0x118]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x118]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll_fgets]
add esp, 0xc
test eax, eax
je 0x10057e4
xor eax, eax
cmp byte [ebp - 0x118], bl
je 0x10055b8
cmp byte [ebp + eax - 0x118], 0x1a
jle 0x10055b8
inc eax
cmp byte [ebp + eax - 0x118], bl
jne 0x10055a4
mov byte [ebp + eax - 0x118], bl
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 4]
push eax
call fcn.010053b3
mov edi, eax
cmp edi, 8
jl 0x1005614
cmp edi, 0x11
jg 0x1005614
mov ecx, dword [ebp - 4]
mov al, byte [ecx]
cmp al, 0x20
je 0x10055e9
cmp al, 9
je 0x10055e9
cmp al, 0x3a
jne 0x10055f4
cmp al, bl
je 0x10057db
inc ecx
jmp 0x10055db
cmp byte [ecx], bl
je 0x10057db
mov eax, dword [0x10092b8]
mov edx, dword [eax]
push ecx
lea ecx, [edi - 8]
push ecx
push eax
call dword [edx + pe_nt_image_headers32]
jmp 0x10057db
cmp edi, 0x13
jl 0x10056e4
cmp edi, 0x14
jle 0x10056ca
cmp edi, 0x15
je 0x1005690
cmp edi, 0x16
je 0x1005675
cmp edi, 0x18
je 0x1005653
cmp edi, 0x19
jne 0x10056e4
push dword [ebp - 4]
push 0x20
push ebx
push 0x1001f2c
call fcn.01005806
jmp 0x1005571
mov ecx, dword [ebp - 4]
mov al, byte [ecx]
cmp al, 0x20
je 0x1005664
cmp al, 9
je 0x1005664
cmp al, 0x3a
jne 0x100566b
cmp al, bl
je 0x100566b
inc ecx
jmp 0x1005656
push ecx
push ebx
push ebx
push 0x1001f28
jmp 0x1005649
mov eax, dword [0x10092b8]
mov ecx, dword [eax]
lea edx, [ebp - 0x14]
push edx
push ebx
push dword [ebp - 4]
push eax
call dword [ecx + 0x128]
jmp 0x1005571
mov eax, dword [ebp - 4]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x1005696
sub eax, ecx
inc eax
push eax
push 1
call dword [sym.imp.msvcrt.dll_calloc]
cmp eax, ebx
pop ecx
pop ecx
mov dword [0x100808c], eax
je 0x10057f5
mov edx, dword [ebp - 4]
mov cl, byte [edx]
inc edx
mov byte [eax], cl
inc eax
cmp cl, bl
jne 0x10056bb
jmp 0x1005571
mov eax, dword [ebp - 4]
push eax
movsx eax, byte [eax - 2]
push 0x20
push eax
push 0x1001f24
call fcn.01005806
jmp 0x10057db
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 4]
push eax
call fcn.010053b3
xor ecx, ecx
cmp eax, 7
setne cl
mov eax, edi
dec eax
mov esi, ecx
je 0x10057ca
dec eax
je 0x10057b9
dec eax
je 0x10057a0
dec eax
je 0x100575c
dec eax
je 0x1005746
sub eax, 0xd
je 0x1005733
sub eax, 5
jne 0x10057db
push 0x10
jmp 0x1005748
push eax
call dword [ecx + 0x10]
jmp 0x1005571
push 0x80
jmp 0x10057a2
push eax
call dword [ecx + 0xd8]
jmp 0x1005571
push 4
cmp esi, ebx
mov eax, dword [0x10092b4]
mov ecx, dword [eax]
jne 0x100572a
push eax
call dword [ecx + 0x14]
jmp 0x1005571
mov eax, dword [0x10092c0]
mov ecx, dword [eax]
lea edx, [ebp - 8]
push edx
push eax
call dword [ecx + 0x8c]
cmp esi, ebx
je 0x1005778
or dword [ebp - 8], 8
jmp 0x100577c
and dword [ebp - 8], 0xfffffff7
mov eax, dword [0x10092c0]
push dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x90]
mov eax, dword [0x10092b8]
push dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x2c]
jmp 0x1005571
push 0x20
cmp esi, ebx
mov eax, dword [0x10092b8]
mov ecx, dword [eax]
jne 0x100573a
push eax
call dword [ecx + 0xdc]
jmp 0x1005571
xor eax, eax
cmp esi, ebx
setne al
mov dword [0x1009384], eax
jmp 0x1005571
cmp esi, ebx
je 0x1005571
mov eax, dword [ebp + 8]
mov dword [eax], 1
cmp edi, 0x1b
jne 0x1005571
push dword [ebp - 0xc]
call dword [sym.imp.msvcrt.dll_fclose]
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4
push dword [0x1008088]
push 0x1001ef8
call fcn.01003f80
int3