Function at 0x10006980
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.10002ef0
mov esi, dword [0x10042264]
add esp, 0x30
test esi, esi
je 0x100069f3
cmp esi, fcn.10003af0
jne 0x100069ff
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 0x100069ff
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
test eax, eax
je 0x100069ff
mov ecx, str.SetPlayerObjectMaterialText
call fcn.10003b00
mov esi, eax
mov ecx, edi
mov dword [0x10042264], esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10006a10
mov ebx, dword [0x10042290]
sub ecx, edx
mov eax, dword [0x10042320]
shl eax, 2
lea edx, [ecx + 1]
lea esi, [ebx + edx*4]
mov dword [ebp + 0x1c], edx
cmp esi, eax
jl 0x10006a4b
lea ecx, [esi + 0x40]
shr ecx, 2
call fcn.100037c0
test eax, eax
jns 0x10006a48
mov ebx, dword [ebp - 0x10]
jmp 0x10006a85
mov edx, dword [ebp + 0x1c]
mov ecx, ebx
mov dword [0x10042290], esi
shr ecx, 2
test ecx, ecx
jns 0x10006a60
add ecx, dword [0x1004231c]
mov eax, dword [0x10042324]
push edx
imul eax, ecx
push 0
push 0
push edi
add eax, dword [0x10042318]
push eax
mov eax, dword [0x100423e8]
mov eax, dword [eax + 0x94]
call eax
add esp, 0x14
mov ecx, dword [ebp + 0x14]
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10006a90
mov esi, dword [0x10042290]
sub ecx, edx
mov eax, dword [0x10042320]
inc ecx
shl eax, 2
mov dword [ebp + 0x1c], ecx
lea edi, [esi + ecx*4]
cmp edi, eax
jl 0x10006ac9
lea ecx, [edi + 0x40]
shr ecx, 2
call fcn.100037c0
test eax, eax
jns 0x10006ac6
mov esi, dword [ebp - 0x14]
jmp 0x10006b04
mov ecx, dword [ebp + 0x1c]
mov eax, esi
mov dword [0x10042290], edi
shr eax, 2
test eax, eax
jns 0x10006ade
add eax, dword [0x1004231c]
imul eax, dword [0x10042324]
push ecx
push 0
push 0
push dword [ebp + 0x14]
add eax, dword [0x10042318]
push eax
mov eax, dword [0x100423e8]
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 0x10042278
mov dword [ebp - 0x44], 0x2c
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x2c], esi
call dword [0x10042264]
mov ecx, dword [0x10042290]
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 [0x10042290], ecx
pop esi
setne al
pop ebx
mov esp, ebp
pop ebp
ret