Function at 0x40b241
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x874
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
mov word [ebp - 0xa], ax
mov word [ebp - 0xc], dx
mov eax, dword [ebp + 0xc]
add eax, 0x10
mov eax, dword [eax]
mov dword [ebp - 0x41c], eax
mov dword [ebp - 0x85c], 0
mov dword [ebp - 0x860], 0
cmp dword [ebp + 8], 6
jne 0x40b28f
mov eax, dword [ebp + 0xc]
add eax, 0x14
mov eax, dword [eax]
mov dword [ebp - 0x83c], eax
mov dword [esp + 8], 0x4130de
mov dword [esp + 4], 0x4130dc
mov eax, dword [ebp + 0xc]
add eax, 0xc
mov eax, dword [eax]
mov dword [esp], eax
call sym._StrReplace
mov dword [esp + 4], 0
mov eax, dword [ebp + 0xc]
add eax, 0xc
mov eax, dword [eax]
mov dword [esp], eax
call sym._access
test eax, eax
jne 0x40b2eb
mov dword [esp + 4], 0x414caf
mov eax, dword [ebp + 0xc]
add eax, 0xc
mov eax, dword [eax]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x10], eax
jmp 0x40b3fc
mov dword [esp], str.TEMP
call sym._getenv
mov dword [esp + 8], eax
mov dword [esp + 4], str._sinifouttmp.ini
lea eax, [ebp - 0x828]
mov dword [esp], eax
call sym._sprintf
mov dword [esp + 8], 0
mov eax, dword [ebp + 0xc]
add eax, 4
mov dword [esp + 4], eax
mov dword [esp], 3
call sym._find_ud
cmp eax, 0xffffffff
jle 0x40b3e1
mov dword [esp + 8], 0
mov eax, dword [ebp + 0xc]
add eax, 4
mov dword [esp + 4], eax
mov dword [esp], 3
call sym._find_ud
mov dword [esp + 8], eax
mov dword [esp + 4], str._hd_d_
lea eax, [ebp - 0x838]
mov dword [esp], eax
call sym._sprintf
mov dword [esp + 4], 1
lea eax, [ebp - 0x838]
mov dword [esp], eax
call sym._xd_open
mov dword [ebp - 0x864], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x864]
mov dword [esp], eax
call sym._read_header
lea eax, [ebp - 0x828]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
add eax, 0xc
mov eax, dword [eax]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x864]
mov dword [esp], eax
call sym._load_file
mov dword [esp + 4], 0x414caf
lea eax, [ebp - 0x828]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x10], eax
jmp 0x40b3fc
mov dword [esp], str.inifile_not_found_n
call sym._printf
mov dword [ebp - 0x868], 0xffffffff
jmp 0x40b7ee
cmp dword [ebp - 0x10], 0
jne 0x40b411
mov dword [ebp - 0x868], 0xffffffff
jmp 0x40b7ee
cmp dword [ebp - 0x10], 0
je 0x40b7d9
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
and eax, 0x10
test eax, eax
jne 0x40b7ae
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], 0xff
lea eax, [ebp - 0x418]
mov dword [esp], eax
call sym._fgets
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
and eax, 0x10
test eax, eax
jne 0x40b46c
lea eax, [ebp - 0x418]
mov dword [esp], eax
call sym._strlen
mov byte [eax + ebp - 0x419], 0
cmp byte [ebp - 0x418], 0
je 0x40b41b
lea eax, [ebp - 0x418]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x41c]
mov dword [esp], eax
call sym._strcmp
test eax, eax
jne 0x40b4db
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], 0xff
lea eax, [ebp - 0x418]
mov dword [esp], eax
call sym._fgets
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
and eax, 0x10
test eax, eax
jne 0x40b4d1
lea eax, [ebp - 0x418]
mov dword [esp], eax
call sym._strlen
mov byte [eax + ebp - 0x419], 0
mov dword [ebp - 0x85c], 1
cmp dword [ebp - 0x85c], 1
sete al
movzx ebx, al
lea eax, [ebp - 0x418]
mov dword [esp], eax
call sym._strlen
cmp eax, 1
seta al
movzx eax, al
and eax, ebx
test eax, eax
je 0x40b41b
lea eax, [ebp - 0x418]
mov dword [esp + 4], eax
mov dword [esp], str.___
call sym._wildcard_matches
test eax, eax
jne 0x40b74b
cmp word [ebp - 0xa], 0
jne 0x40b603
lea eax, [ebp - 0x418]
mov dword [ebp - 0x840], eax
mov dword [esp + 4], str._ud_
mov eax, dword [ebp + 0xc]
add eax, 4
mov eax, dword [eax]
mov dword [esp], eax
call sym._strcmpi
test eax, eax
jne 0x40b58c
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
lea eax, [ebp - 0x848]
mov dword [esp + 4], eax
mov dword [esp], 3
call sym._get_file_size
mov edx, eax
lea eax, [ebp - 0x860]
add dword [eax], edx
jmp 0x40b603
mov dword [esp + 4], 1
mov eax, dword [ebp + 0xc]
add eax, 4
mov eax, dword [eax]
mov dword [esp], eax
call sym._xd_open
mov dword [ebp - 0x864], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x864]
mov dword [esp], eax
call sym._read_header
mov dword [esp + 0xc], 1
lea eax, [ebp - 0x848]
add eax, 8
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x864]
mov dword [esp], eax
call sym._print_info_file
mov edx, eax
lea eax, [ebp - 0x860]
add dword [eax], edx
mov eax, dword [ebp - 0x864]
mov dword [esp], eax
call sym._xd_close
cmp word [ebp - 0xa], 1
jne 0x40b74b
lea eax, [ebp - 0x418]
mov dword [ebp - 0x840], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
lea eax, [ebp - 0x848]
mov dword [esp + 4], eax
mov dword [esp], 3
call sym._get_file_size
mov edx, eax
lea eax, [ebp - 0x860]
add dword [eax], edx
mov dword [esp + 4], str._ud_
mov eax, dword [ebp + 0xc]
add eax, 4
mov eax, dword [eax]
mov dword [esp], eax
call sym._strcmpi
test eax, eax
jne 0x40b6c7
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
lea eax, [ebp - 0x848]
mov dword [esp + 4], eax
mov dword [esp], 3
call sym._get_file_size
cmp eax, 2
jle 0x40b6ac
lea eax, [ebp - 0x848]
mov dword [esp + 4], eax
mov dword [esp], 4
call sym._find_file_out
jmp 0x40b74b
lea eax, [ebp - 0x418]
mov dword [esp + 4], eax
mov dword [esp], str.file__s_not_found_n
call sym._printf
jmp 0x40b74b
mov dword [esp + 4], 1
mov eax, dword [ebp + 0xc]
add eax, 4
mov eax, dword [eax]
mov dword [esp], eax
call sym._xd_open
mov dword [ebp - 0x864], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
lea eax, [ebp - 0x848]
mov dword [esp + 4], eax
mov dword [esp], 3
call sym._get_file_size
cmp eax, 2
jle 0x40b735
lea eax, [ebp - 0x848]
add eax, 8
mov dword [esp + 8], eax
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x864]
mov dword [esp], eax
call sym._output_file
jmp 0x40b74b
lea eax, [ebp - 0x418]
mov dword [esp + 4], eax
mov dword [esp], str.file__s_not_found_n
call sym._printf
lea eax, [ebp - 0x418]
mov dword [esp + 4], eax
mov dword [esp], str.___
call sym._wildcard_matches
cmp eax, 1
jne 0x40b41b
cmp word [ebp - 0xc], 0
je 0x40b795
mov eax, dword [ebp - 0x860]
mov dword [esp + 4], eax
mov dword [esp], 0x414d33
call sym._printf
mov eax, dword [ebp - 0x860]
mov dword [ebp - 0x868], eax
jmp 0x40b7ee
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp - 0x860]
mov dword [ebp - 0x868], eax
jmp 0x40b7ee
cmp word [ebp - 0xc], 0
je 0x40b7d9
mov eax, dword [ebp - 0x860]
mov dword [esp + 4], eax
mov dword [esp], 0x414d33
call sym._printf
mov eax, dword [ebp - 0x860]
mov dword [ebp - 0x868], eax
jmp 0x40b7ee
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._fclose
mov dword [ebp - 0x868], 0
mov eax, dword [ebp - 0x868]
add esp, 0x874
pop ebx
pop ebp
ret