Function at 0x50445e
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x1d50]
mov eax, 0x1d50
call fcn.0059cbb0
push 0xffffffffffffffff
push 0x5eb566
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x665ebc]
xor eax, ebp
mov dword [ebp + 0x1d4c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
xor edi, edi
lea ecx, [ebp]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 4], edi
call fcn.004aafa5
lea ecx, [ebp + 0x14dc]
mov byte [ebp - 4], 1
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
call fcn.00427139
lea ecx, [ebp + 0x10a4]
mov byte [ebp - 4], 2
call fcn.00427139
lea ecx, [ebp + 0xc6c]
mov byte [ebp - 4], 3
call fcn.00427139
lea ecx, [ebp + 0x1914]
mov byte [ebp - 4], 4
call fcn.00427139
lea ecx, [ebp + 0x40c]
mov byte [ebp - 4], 5
call fcn.004d5d1a
push 0xffffffffffffffff
push edi
lea ecx, [ebx + 0x464]
mov byte [ebp - 4], 6
call fcn.005757d6
push SysReAllocStringLen
lea ecx, [ebp]
call fcn.004aafcd
push str.SoftwareRITThe_Bat_
lea ecx, [ebp]
call fcn.004ab3d4
cmp eax, edi
je 0x504597
push edi
push str.Working_Directory
lea ecx, [ebp]
call fcn.004ab5bd
mov esi, eax
cmp esi, edi
je 0x504597
push 0x3ff
lea eax, [ebp + 0x1914]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push esi
call fcn.00564e3f
pop ecx
push 1
mov edi, str..cfn
push edi
lea eax, [ebp + 0x1914]
push eax
mov ecx, ebx
call fcn.004d7144
mov ecx, dword [ebp - 0x28]
push 1
mov ebx, str..cfg
push ebx
lea eax, [ebp + 0x1914]
push eax
call fcn.004d7144
jmp 0x5045a1
mov edi, str..cfn
mov ebx, str..cfg
mov eax, dword [ebp - 0x28]
cmp dword [eax + 0x448], 2
jl 0x504690
lea ecx, [ebp + 0x14dc]
call fcn.00499aa1
xor esi, esi
push esi
push 0x5f7710
lea ecx, [ebp + 0x14dc]
call fcn.0049a237
cmp eax, esi
je 0x504692
push eax
lea eax, [ebp + 0x14dc]
push eax
lea ecx, [ebp + 0x10a4]
call fcn.00499340
push 1
lea ecx, [ebp + 0x10a4]
call fcn.0049a516
push esi
push 0x5f7710
lea ecx, [ebp + 0x10a4]
call fcn.0049a237
mov esi, eax
test esi, esi
je 0x50467e
push 8
push str.The_Bat_
push esi
call fcn.0059d08f
add esp, 0xc
test eax, eax
jne 0x504671
push esi
lea eax, [ebp + 0x10a4]
push eax
lea ecx, [ebp + 0xc6c]
call fcn.00499340
lea eax, [ebp + 0x1914]
push eax
lea eax, [ebp + 0xc6c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x504671
mov ecx, dword [ebp - 0x28]
push 1
push edi
lea eax, [ebp + 0xc6c]
push eax
call fcn.004d7144
mov ecx, dword [ebp - 0x28]
push 1
push ebx
lea eax, [ebp + 0xc6c]
push eax
call fcn.004d7144
lea ecx, [ebp + 0x10a4]
call fcn.0049980d
jmp 0x504608
lea ecx, [ebp + 0x14dc]
call fcn.0049980d
xor esi, esi
jmp 0x5045cf
xor esi, esi
lea eax, [ebp + 0x1914]
push eax
push 0x26
lea ecx, [ebp + 0x14dc]
call fcn.00499062
push str.The_Bat_
push esi
lea ecx, [ebp + 0x1914]
call fcn.00499340
mov ecx, dword [ebp - 0x28]
push 1
push edi
lea eax, [ebp + 0x1914]
push eax
call fcn.004d7144
push 1
push ebx
mov ebx, dword [ebp - 0x28]
lea eax, [ebp + 0x1914]
push eax
mov ecx, ebx
call fcn.004d7144
push dword [ebx + 0x46c]
push str.Found__d_bat3_cfncfg_files
push 0x66eab8
call fcn.0047f157
add esp, 0xc
mov dword [ebp - 0x2c], esi
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebx + 0x46c]
jge 0x504a02
lea edi, [ebx + 0x464]
push eax
mov ecx, edi
call fcn.004026b0
mov eax, dword [eax]
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
lea ecx, [ebp + 0x40c]
call fcn.004d3eae
cmp eax, esi
je 0x5047cc
cmp dword [ebp - 0x1c], esi
je 0x504752
push dword [ebp - 0x1c]
mov ecx, dword [ebx + 0x450]
call fcn.004d8b84
cmp dword [ebp - 0x18], esi
je 0x504764
push dword [ebp - 0x18]
mov ecx, 0x672b98
call fcn.004ba0ea
cmp dword [ebp - 0x20], esi
je 0x504775
push dword [ebp - 0x20]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x20], esi
cmp dword [ebp - 0x24], esi
je 0x504786
push dword [ebp - 0x24]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x24], esi
cmp dword [ebp - 0x14], esi
je 0x504797
push dword [ebp - 0x14]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x14], esi
cmp dword [ebp - 0x1c], esi
je 0x5047a8
push dword [ebp - 0x1c]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x1c], esi
cmp dword [ebp - 0x14], esi
je 0x5047b9
push dword [ebp - 0x14]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x14], esi
cmp dword [ebp - 0x18], esi
je 0x5047d7
push dword [ebp - 0x18]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x18], esi
jmp 0x5047d7
lea ecx, [ebp + 0x40c]
call fcn.004d4734
push dword [ebp - 0x2c]
mov ecx, edi
call fcn.004026b0
mov eax, dword [eax]
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
lea ecx, [ebp + 0x40c]
call fcn.004d41a9
cmp eax, esi
je 0x504898
cmp dword [ebp - 0x1c], esi
je 0x50481e
push dword [ebp - 0x1c]
mov ecx, dword [ebx + 0x450]
call fcn.004d8b84
cmp dword [ebp - 0x18], esi
je 0x504830
push dword [ebp - 0x18]
mov ecx, 0x672b98
call fcn.004ba0ea
cmp dword [ebp - 0x20], esi
je 0x504841
push dword [ebp - 0x20]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x20], esi
cmp dword [ebp - 0x24], esi
je 0x504852
push dword [ebp - 0x24]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x24], esi
cmp dword [ebp - 0x14], esi
je 0x504863
push dword [ebp - 0x14]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x14], esi
cmp dword [ebp - 0x1c], esi
je 0x504874
push dword [ebp - 0x1c]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x1c], esi
cmp dword [ebp - 0x14], esi
je 0x504885
push dword [ebp - 0x14]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x14], esi
cmp dword [ebp - 0x18], esi
je 0x5048a3
push dword [ebp - 0x18]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x18], esi
jmp 0x5048a3
lea ecx, [ebp + 0x40c]
call fcn.004d4734
push dword [ebp - 0x2c]
mov ecx, edi
call fcn.004026b0
mov eax, dword [eax]
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
lea ecx, [ebp + 0x40c]
call fcn.004d45b4
cmp eax, esi
je 0x504923
cmp dword [ebp - 0x18], esi
je 0x5048dd
push dword [ebp - 0x18]
mov ecx, 0x672b98
call fcn.004ba0ea
cmp dword [ebp - 0x20], esi
je 0x5048ee
push dword [ebp - 0x20]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x20], esi
cmp dword [ebp - 0x24], esi
je 0x5048ff
push dword [ebp - 0x24]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x24], esi
cmp dword [ebp - 0x14], esi
je 0x504910
push dword [ebp - 0x14]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x14], esi
cmp dword [ebp - 0x18], esi
je 0x50492e
push dword [ebp - 0x18]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x18], esi
jmp 0x50492e
lea ecx, [ebp + 0x40c]
call fcn.004d4734
push dword [ebp - 0x2c]
mov ecx, edi
call fcn.004026b0
mov eax, dword [eax]
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x20]
push ecx
push eax
lea ecx, [ebp + 0x40c]
call fcn.004d43d3
cmp eax, esi
je 0x5049ef
cmp dword [ebp - 0x1c], esi
je 0x504975
push dword [ebp - 0x1c]
mov ecx, dword [ebx + 0x450]
call fcn.004d8b84
cmp dword [ebp - 0x18], esi
je 0x504987
push dword [ebp - 0x18]
mov ecx, 0x672b98
call fcn.004ba0ea
cmp dword [ebp - 0x20], esi
je 0x504998
push dword [ebp - 0x20]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x20], esi
cmp dword [ebp - 0x24], esi
je 0x5049a9
push dword [ebp - 0x24]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x24], esi
cmp dword [ebp - 0x14], esi
je 0x5049ba
push dword [ebp - 0x14]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x14], esi
cmp dword [ebp - 0x1c], esi
je 0x5049cb
push dword [ebp - 0x1c]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x1c], esi
cmp dword [ebp - 0x14], esi
je 0x5049dc
push dword [ebp - 0x14]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x14], esi
cmp dword [ebp - 0x18], esi
je 0x5049fa
push dword [ebp - 0x18]
call fcn.00564e3f
pop ecx
mov dword [ebp - 0x18], esi
jmp 0x5049fa
lea ecx, [ebp + 0x40c]
call fcn.004d4734
inc dword [ebp - 0x2c]
jmp 0x5046f8
push 0xffffffffffffffff
push esi
lea ecx, [ebx + 0x464]
call fcn.005757d6
lea ecx, [ebp + 0x40c]
mov byte [ebp - 4], 5
call fcn.004d4759
lea ecx, [ebp + 0x1914]
mov byte [ebp - 4], 4
call fcn.0042719c
lea ecx, [ebp + 0xc6c]
mov byte [ebp - 4], 3
call fcn.0042719c
lea ecx, [ebp + 0x10a4]
mov byte [ebp - 4], 2
call fcn.0042719c
lea ecx, [ebp + 0x14dc]
mov byte [ebp - 4], 1
call fcn.0042719c
lea ecx, [ebp]
mov byte [ebp - 4], 0
call fcn.004ac1a5
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1d4c]
xor ecx, ebp
call fcn.0059ca15
add ebp, 0x1d50
leave
ret