Function at 0x10048f60
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1004ccec
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40
mov eax, dword [0x10059264]
push ebx
push esi
push edi
mov eax, dword [eax]
mov ebx, ecx
mov ecx, 0x10059298
mov dword [ebp - 0x20], ebx
push dword [eax + 0xe0]
mov eax, dword [ebp + 8]
push dword [eax + 8]
call fcn.10019ce0
mov ecx, dword [0x10059264]
mov esi, dword [ecx]
cmp dword [esi + 0x140], 0
je 0x10048fc2
mov eax, dword [esi + 0x13c]
mov esi, dword [esi + 0x14c]
mov esi, dword [esi + eax*4]
jmp 0x10048fc4
xor esi, esi
test esi, esi
setne al
test al, al
je 0x10049259
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x30]
add edx, 8
lea eax, [edx + 4]
push eax
call fcn.100154b0
mov edi, dword [esi + 0x1b8]
add esp, 4
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.10049d20
push dword [ebp + 8]
mov ecx, edi
sub esp, 8
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.10049fb0
mov edi, dword [ebp - 0x24]
test edi, edi
je 0x10049038
add dword [edi + 0x40], 0xffffffff
jne 0x10049038
mov ecx, edi
call fcn.1000c960
mov dword [ebp - 4], 0
push dword [edi - 4]
call ebx
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp - 0x2c]
test edi, edi
je 0x10049062
add dword [edi + 0x40], 0xffffffff
jne 0x10049062
mov ecx, edi
call fcn.1000c960
mov dword [ebp - 4], 1
push dword [edi - 4]
call ebx
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov edx, dword [esi + 0x1b8]
mov ecx, 4
mov edi, dword [ebp - 0x10]
test edx, edx
lea eax, [edx - 8]
cmove eax, ecx
cmp edi, dword [eax]
je 0x1004909a
lea eax, [edx - 0xc]
neg edx
push edi
sbb edx, edx
and edx, eax
dec dword [edx + 0x2c]
lea ecx, [edx + 0xc]
call fcn.1003fbe0
push edi
call fcn.1004a648
add esp, 4
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x40]
add edx, 8
lea eax, [edx + 4]
push eax
call fcn.100154b0
mov edi, dword [esi + 0x2fc]
add esp, 4
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.10049d20
push dword [ebp + 8]
mov ecx, edi
sub esp, 8
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.10049fb0
mov edi, dword [ebp - 0x34]
test edi, edi
je 0x100490fb
add dword [edi + 0x40], 0xffffffff
jne 0x100490fb
mov ecx, edi
call fcn.1000c960
mov dword [ebp - 4], 2
push dword [edi - 4]
call ebx
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp - 0x3c]
test edi, edi
je 0x10049125
add dword [edi + 0x40], 0xffffffff
jne 0x10049125
mov ecx, edi
call fcn.1000c960
mov dword [ebp - 4], 3
push dword [edi - 4]
call ebx
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov edx, dword [esi + 0x2fc]
mov ecx, 4
mov edi, dword [ebp - 0x14]
test edx, edx
lea eax, [edx - 8]
cmove eax, ecx
cmp edi, dword [eax]
je 0x1004915d
lea eax, [edx - 0xc]
neg edx
push edi
sbb edx, edx
and edx, eax
dec dword [edx + 0x2c]
lea ecx, [edx + 0xc]
call fcn.1003fbe0
push edi
call fcn.1004a648
add esp, 4
mov edi, dword [ebp + 8]
lea ecx, [esi + 0x3a0]
lea eax, [edi + 8]
push ecx
push eax
push dword [eax]
call fcn.1000ce40
mov ebx, eax
test ebx, ebx
je 0x1004920d
mov eax, dword [ebx + 0xc]
mov ecx, dword [esi + 8]
push eax
push ecx
push str.DestroyPlayerObject__d___d_
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], ecx
call fcn.100034d0
mov edi, dword [0x10059504]
add esp, 0xc
test edi, edi
je 0x100491c9
cmp edi, fcn.100041f0
jne 0x100491d5
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 0x100491d5
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
test eax, eax
je 0x100491d5
mov ecx, str.DestroyPlayerObject
call fcn.10004200
mov edi, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x4c]
push eax
push 0x100595e0
mov dword [0x10059504], edi
mov dword [ebp - 0x4c], 8
call edi
add esp, 8
lea ecx, [esi + 0x3a0]
push dword [ebx]
push ebx
call fcn.1002cff0
mov edi, dword [ebp + 8]
push ecx
add edi, 8
lea ecx, [esi + 0x3e8]
push edi
push dword [edi]
call fcn.1000ce40
test eax, eax
je 0x10049231
push dword [eax]
lea ecx, [esi + 0x3e8]
push eax
call fcn.1002cff0
mov ecx, dword [esi + 0xd0]
push edi
add ecx, 0x6c
call fcn.10040820
mov esi, dword [esi]
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test esi, esi
jne 0x10048fd7
mov ecx, dword [0x10059264]
mov ebx, dword [ebp - 0x20]
mov eax, dword [ebp + 8]
mov ecx, dword [ecx + 4]
add eax, 0xc
push 0
push eax
call fcn.10013c60
mov eax, dword [ebp + 8]
mov esi, dword [eax]
push esi
push eax
mov eax, dword [0x10059264]
mov ecx, dword [eax]
add ecx, 0xd8
call fcn.10015b30
mov ecx, dword [ebp - 0xc]
mov eax, ebx
mov dword [ebx], esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret