Function at 0x100079c0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
push dword [ebp + 0x28]
mov edi, dword [ebp + 8]
mov eax, edx
push dword [ebp + 0x24]
movzx edx, byte [ebp + 0x1c]
push dword [ebp + 0x20]
mov dword [ebp - 8], eax
push edx
push dword [ebp + 0x18]
mov dword [ebp - 4], ecx
push dword [ebp + 0x14]
mov dword [ebp - 0xc], edx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
push eax
push ecx
push str.SetPlayerObjectMaterialText__d___d____s____d___d____s____d___d___d___d___d_
call fcn.100034d0
mov esi, dword [0x100595c8]
add esp, 0x30
test esi, esi
je 0x10007a33
cmp esi, fcn.100041f0
jne 0x10007a3f
push str.SAMGDK_NATIVE_SEARCH_ALWAYS
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
je 0x10007a3f
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
test eax, eax
je 0x10007a3f
mov ecx, str.SetPlayerObjectMaterialText
call fcn.10004200
mov esi, eax
mov ecx, edi
mov dword [0x100595c8], esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10007a50
mov ebx, dword [0x100595f8]
sub ecx, edx
lea eax, [ecx + 1]
lea esi, [ebx + eax*4]
mov dword [ebp + 0x1c], eax
mov eax, dword [0x10059688]
shl eax, 2
cmp esi, eax
jl 0x10007a88
lea ecx, [esi + 0x40]
shr ecx, 2
call fcn.10003ec0
test eax, eax
jns 0x10007a88
mov ebx, dword [ebp - 0x10]
jmp 0x10007aba
push dword [ebp + 0x1c]
mov eax, dword [0x1005968c]
mov ecx, ebx
shr ecx, 2
imul eax, ecx
push 0
push 0
push edi
mov dword [0x100595f8], esi
add eax, dword [0x10059680]
push eax
mov eax, dword [0x100597d8]
mov eax, dword [eax + 0x94]
call eax
add esp, 0x14
mov ecx, dword [ebp + 0x14]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10007ac0
mov esi, dword [0x100595f8]
sub ecx, edx
lea eax, [ecx + 1]
lea edi, [esi + eax*4]
mov dword [ebp + 0x1c], eax
mov eax, dword [0x10059688]
shl eax, 2
cmp edi, eax
jl 0x10007af8
lea ecx, [edi + 0x40]
shr ecx, 2
call fcn.10003ec0
test eax, eax
jns 0x10007af8
mov esi, dword [ebp - 0x14]
jmp 0x10007b2b
push dword [ebp + 0x1c]
mov eax, esi
mov dword [0x100595f8], edi
shr eax, 2
imul eax, dword [0x1005968c]
push 0
push 0
push dword [ebp + 0x14]
add eax, dword [0x10059680]
push eax
mov eax, dword [0x100597d8]
mov eax, dword [eax + 0x94]
call eax
add esp, 0x14
mov eax, dword [ebp - 4]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x44]
push eax
push 0x100595e0
mov dword [ebp - 0x44], 0x2c
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x2c], esi
call dword [0x100595c8]
mov ecx, dword [0x100595f8]
add esp, 8
cmp ecx, esi
mov edx, eax
cmovg ecx, esi
cmp ecx, ebx
pop edi
cmovg ecx, ebx
xor eax, eax
test edx, edx
mov dword [0x100595f8], ecx
pop esi
setne al
pop ebx
mov esp, ebp
pop ebp
ret