Function at 0x504e35
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x1d50]
mov eax, 0x1d50
call fcn.0059cbb0
push 0xffffffffffffffff
push 0x5eb5d5
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 + 0xc98]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], edi
call fcn.004aafa5
lea ecx, [ebp + 0x10a4]
mov byte [ebp - 4], 1
call fcn.00427139
lea ecx, [ebp + 0x14dc]
mov byte [ebp - 4], 2
call fcn.00427139
lea ecx, [ebp + 0x860]
mov byte [ebp - 4], 3
call fcn.00427139
lea ecx, [ebp + 0x1914]
mov byte [ebp - 4], 4
call fcn.00427139
lea ecx, [ebp]
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 + 0xc98]
call fcn.004aafcd
push str.SoftwareRITThe_Bat_
lea ecx, [ebp + 0xc98]
call fcn.004ab3d4
cmp eax, edi
je 0x504bb9
push edi
push str.Working_Directory
lea ecx, [ebp + 0xc98]
call fcn.004ab5bd
mov esi, eax
cmp esi, edi
je 0x504bb9
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.groups.cfg
push edi
lea eax, [ebp + 0x1914]
push eax
mov ecx, ebx
call fcn.004d7144
jmp 0x504bbe
mov edi, str.groups.cfg
cmp dword [ebx + 0x448], 2
jl 0x504c96
lea ecx, [ebp + 0x10a4]
call fcn.00499aa1
push 0
mov ebx, 0x5f7710
push ebx
lea ecx, [ebp + 0x10a4]
call fcn.0049a237
test eax, eax
je 0x504c93
push eax
lea eax, [ebp + 0x10a4]
push eax
lea ecx, [ebp + 0x14dc]
call fcn.00499340
push 1
lea ecx, [ebp + 0x14dc]
call fcn.0049a516
push 0
push ebx
lea ecx, [ebp + 0x14dc]
call fcn.0049a237
mov esi, eax
test esi, esi
je 0x504c83
push 8
push str.The_Bat_
push esi
call fcn.0059d08f
add esp, 0xc
test eax, eax
jne 0x504c76
push esi
lea eax, [ebp + 0x14dc]
push eax
lea ecx, [ebp + 0x860]
call fcn.00499340
lea eax, [ebp + 0x1914]
push eax
lea eax, [ebp + 0x860]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x504c76
mov ecx, dword [ebp - 0x18]
push 1
push edi
lea eax, [ebp + 0x860]
push eax
call fcn.004d7144
lea ecx, [ebp + 0x14dc]
call fcn.0049980d
jmp 0x504c1f
lea ecx, [ebp + 0x10a4]
call fcn.0049980d
jmp 0x504be9
mov ebx, dword [ebp - 0x18]
lea eax, [ebp + 0x1914]
push eax
push 0x26
lea ecx, [ebp + 0x10a4]
call fcn.00499062
push str.The_Bat_
xor esi, esi
push esi
lea ecx, [ebp + 0x1914]
call fcn.00499340
push 1
push edi
lea eax, [ebp + 0x1914]
push eax
mov ecx, ebx
call fcn.004d7144
push dword [ebx + 0x46c]
push str.Found__d_bat3_groups.cfg_files
push 0x66eab8
call fcn.0047f157
add esp, 0xc
mov dword [ebp - 0x14], esi
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebx + 0x46c]
jge 0x504d9a
lea ecx, [ebp - 0x2c]
call fcn.005756ee
push dword [ebp - 0x14]
lea ecx, [ebx + 0x464]
mov byte [ebp - 4], 7
call fcn.004026b0
mov eax, dword [eax]
lea ecx, [ebp - 0x2c]
push ecx
push eax
lea ecx, [ebp]
call fcn.004d5bab
cmp eax, esi
je 0x504d7e
xor edi, edi
inc edi
cmp dword [ebp - 0x24], edi
jle 0x504d86
cmp dword [ebp - 0x24], esi
jg 0x504d37
call fcn.00566b22
mov ecx, dword [ebp - 0x28]
mov eax, dword [ecx]
cmp dword [eax - 0xc], esi
je 0x504d50
mov ecx, dword [ebx + 0x450]
push eax
call fcn.004d8b84
mov ecx, dword [ebp - 0x28]
cmp dword [ebp - 0x24], edi
jle 0x504d32
mov eax, dword [ecx + 4]
cmp dword [eax - 0xc], esi
je 0x504d68
push eax
mov ecx, 0x672b98
call fcn.004ba0ea
push edi
push esi
lea ecx, [ebp - 0x2c]
call fcn.005759bc
push edi
push esi
lea ecx, [ebp - 0x2c]
call fcn.005759bc
jmp 0x504d25
lea ecx, [ebp]
call fcn.004d4734
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 6
call fcn.00575a31
inc dword [ebp - 0x14]
jmp 0x504ce9
push 0xffffffffffffffff
push esi
lea ecx, [ebx + 0x464]
call fcn.005757d6
lea ecx, [ebp]
mov byte [ebp - 4], 5
call fcn.004d4759
lea ecx, [ebp + 0x1914]
mov byte [ebp - 4], 4
call fcn.0042719c
lea ecx, [ebp + 0x860]
mov byte [ebp - 4], 3
call fcn.0042719c
lea ecx, [ebp + 0x14dc]
mov byte [ebp - 4], 2
call fcn.0042719c
lea ecx, [ebp + 0x10a4]
mov byte [ebp - 4], 1
call fcn.0042719c
lea ecx, [ebp + 0xc98]
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
push esi
mov esi, ecx
call fcn.0050445e
mov ecx, esi
pop esi
jmp 0x504a9d