Function at 0x100162d0
Capabilities:
Query environment variable
Read file on windows

Disassembly:
sub esp, 0x514
push ebx
push ebp
push esi
push edi
xor ebp, ebp
xor ebx, ebx
push str.FDLFILE
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], ebx
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
cmp eax, ebp
jne 0x1001631e
push str.0100_getenv_error:_FDLFILE
push str.FDL0501
push 2
call fcn.1000da50
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x514
ret
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
mov dword [0x10024148], ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x24]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x1001c1cc
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [sym.imp.MSVCRT.dll_strtok]
lea ecx, [esp + 0x28]
push ecx
call edi
add esp, 8
cmp eax, ebp
mov dword [esp + 0x124], eax
je 0x10016387
lea esi, [esp + 0x124]
push 0x1001c1cc
push ebp
inc ebx
add esi, 4
call edi
add esp, 8
cmp eax, ebp
mov dword [esi], eax
jne 0x1001636e
mov dword [esp + 0x18], ebx
test ebx, ebx
mov dword [esp + 0x14], ebp
jle 0x100165df
jmp 0x10016399
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + ebp*4 + 0x124]
push 0x1001c1c8
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x100165fe
mov esi, dword [sym.imp.MSVCRT.dll_fread]
push ebx
push 1
push 0xc
push 0x10024150
call esi
add esp, 0x10
cmp eax, 1
jne 0x10016628
mov eax, dword [0x10024150]
cmp eax, 0x22b8
jne 0x10016654
mov eax, dword [0x10024154]
test eax, eax
je 0x1001667e
lea ecx, [eax + eax*2]
lea edi, [eax + ecx*4]
mov ecx, dword [esp + 0x10]
shl edi, 2
add ecx, edi
test ebp, ebp
mov dword [esp + 0x10], ecx
jne 0x10016424
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [0x10024148], eax
test eax, eax
je 0x100166af
jmp 0x10016445
mov edx, dword [esp + 0x10]
mov eax, dword [0x10024148]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_realloc]
add esp, 8
mov dword [0x10024148], eax
test eax, eax
je 0x100166af
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x100166d9
push ebx
push 1
push edi
push ebp
call esi
add esp, 0x10
cmp eax, 1
jne 0x10016710
mov edx, dword [esp + 0x10]
mov eax, 0x4ec4ec4f
sub edx, edi
mov ecx, edi
mul edx
shr edx, 4
mov esi, ebp
lea eax, [edx + edx*2]
lea edx, [edx + eax*4]
mov eax, dword [0x10024148]
lea edi, [eax + edx*4]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x10024154]
mov esi, dword [esp + 0x1c]
lea edi, [eax*8]
mov eax, dword [esp + 0x14]
add esi, edi
test eax, eax
mov dword [esp + 0x1c], esi
jne 0x100164d3
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [0x10024144], eax
test eax, eax
je 0x10016739
jmp 0x100164f1
mov ecx, dword [0x10024144]
push esi
push ecx
call dword [sym.imp.MSVCRT.dll_realloc]
add esp, 8
mov dword [0x10024144], eax
test eax, eax
je 0x10016775
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x20], esi
je 0x100167c2
push ebx
push 1
push edi
push esi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x10016807
mov edx, dword [esp + 0x1c]
mov eax, dword [0x10024144]
sub edx, edi
mov ecx, edi
shr edx, 3
lea edi, [eax + edx*8]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x14]
test edi, edi
je 0x10016582
mov eax, dword [0x10024154]
xor esi, esi
test eax, eax
jle 0x10016582
mov edx, dword [0x1002413c]
mov ecx, dword [0x10024144]
lea eax, [edx + esi]
lea eax, [ecx + eax*8 + 4]
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x10016578
add ecx, edx
mov dword [eax], ecx
mov edx, dword [0x1002413c]
mov eax, dword [0x10024154]
inc esi
cmp esi, eax
jl 0x1001655a
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [0x10024154]
mov edx, dword [0x1002413c]
mov ecx, dword [0x10024140]
mov esi, dword [sym.imp.MSVCRT.dll_free]
add edx, eax
add ecx, eax
mov dword [0x1002413c], edx
mov edx, dword [0x1002414c]
push ebp
mov dword [0x10024140], ecx
lea eax, [edx + eax - 1]
mov dword [0x1002414c], eax
call esi
mov ecx, dword [esp + 0x28]
push ecx
call esi
mov eax, dword [esp + 0x24]
add esp, 0xc
inc edi
cmp edi, eax
mov dword [esp + 0x14], edi
jl 0x10016395
mov ebx, eax
mov eax, 1
cmp ebx, eax
je 0x100165ee
inc dword [0x1002414c]
pop edi
pop esi
pop ebp
mov dword [0x1002415c], eax
pop ebx
add esp, 0x514
ret
mov edx, dword [esp + ebp*4 + 0x124]
push edx
push str.0010_file_open_error:__s
push str.FDL0502
push 2
call fcn.1000d9f0
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x514
ret
push 0xc
push eax
push str.0011_file_read_error:__d__d
push str.FDL0503
push 2
call fcn.1000d9f0
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x18
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x514
ret
push eax
push str.4408_FDL_magic_error:__d
push str.FDL0504
push 2
call fcn.1000da50
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x514
ret
mov eax, dword [esp + ebp*4 + 0x124]
push eax
push str.4507_FDL_table_size_is_zero:__s
push str.FDL0505
push 2
call fcn.1000da50
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x514
ret
push edi
push str.0004_malloc_error:_size___d
push str.FDL0506
push 2
call fcn.1000da50
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x514
ret
mov ecx, dword [0x10024148]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
push edi
push str.0004_malloc_error:_size___d
push str.FDL0506
push 2
call fcn.1000da50
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x18
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x514
ret
push str.0011_fdl_read_error
push str.FDL0507
push 2
call fcn.1000d9f0
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x514
ret
mov edx, dword [0x10024148]
mov esi, dword [sym.imp.MSVCRT.dll_free]
push edx
call esi
push ebp
call esi
push edi
push str.0004_malloc_error:_size___d
push str.FDL0508
push 2
call fcn.1000da50
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x1c
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x514
ret
mov eax, dword [0x10024148]
mov edi, dword [sym.imp.MSVCRT.dll_free]
push eax
call edi
mov eax, dword [0x10024144]
add esp, 4
test eax, eax
je 0x10016795
push eax
call edi
add esp, 4
push ebp
call edi
push esi
push str.0004_remalloc_error:_size___d
push str.FDL0508
push 2
call fcn.1000da50
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x18
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x514
ret
mov ecx, dword [0x10024148]
mov esi, dword [sym.imp.MSVCRT.dll_free]
push ecx
call esi
mov edx, dword [0x10024144]
push edx
call esi
push ebp
call esi
push edi
push str.0004_malloc_error:_size___d
push str.FDL0508
push 2
call fcn.1000da50
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x20
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x514
ret
push str.0011_fdl_read_error
push str.FDL0509
push 2
call fcn.1000d9f0
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x514
ret