Function at 0x87b538
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0xd
push 0
push 0
dec ecx
jne 0x87b541
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov byte [ebp - 0x15], cl
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
call fcn.0040573c
mov eax, dword [ebp + 0x10]
call fcn.0040573c
mov eax, dword [ebp + 0xc]
call fcn.0040573c
xor eax, eax
push ebp
push 0x87b7f7
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x16], 0
xor eax, eax
push ebp
push 0x87b7b0
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [0x41c3d0]
call fcn.0040442c
mov dword [ebp - 0x24], eax
call sub.kernel32.dll_GetEnvironmentStringsA
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
jmp 0x87b5d2
lea edx, [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
call fcn.0040b6bc
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_lstrlenA_1
inc eax
add dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp byte [eax], 0
jne 0x87b5af
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_FreeEnvironmentStringsA
call fcn.0040d398
add esp, 0xfffffff8
fstp qword [esp]
wait
lea edx, [ebp - 0x34]
mov eax, 0x87b814
call fcn.0040e068
mov ecx, dword [ebp - 0x34]
lea eax, [ebp - 0x30]
mov edx, 0x87b82c
call fcn.00405598
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx + 0x38]
call fcn.0040d398
add esp, 0xfffffff8
fstp qword [esp]
wait
lea edx, [ebp - 0x3c]
mov eax, 0x87b844
call fcn.0040e068
mov ecx, dword [ebp - 0x3c]
lea eax, [ebp - 0x38]
mov edx, 0x87b858
call fcn.00405598
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea eax, [ebp - 0x44]
call fcn.004bbddc
mov ecx, dword [ebp - 0x44]
lea eax, [ebp - 0x40]
mov edx, 0x87b874
call fcn.00405598
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx + 0x38]
push ebp
lea eax, [ebp - 0x4c]
call fcn.0087b3ec
pop ecx
mov ecx, dword [ebp - 0x4c]
lea eax, [ebp - 0x48]
mov edx, 0x87b888
call fcn.00405598
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx + 0x38]
push ebp
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 4]
lea edx, [ebp - 8]
lea eax, [ebp - 0xc]
call fcn.0087af00
pop ecx
lea eax, [ebp - 0x50]
mov ecx, dword [ebp - 0xc]
mov edx, 0x87b89c
call fcn.00405598
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp dword [ebp - 0x28], 0
je 0x87b6e3
lea eax, [ebp - 0x54]
mov ecx, dword [ebp - 0x28]
mov edx, 0x87b8b0
call fcn.00405598
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea edx, [ebp - 0x58]
mov eax, dword [ebp - 0x28]
call fcn.004bed04
mov eax, dword [ebp - 0x58]
call fcn.0040554c
test eax, eax
jle 0x87b720
lea edx, [ebp - 0x60]
mov eax, dword [ebp - 0x28]
call fcn.004bed04
mov ecx, dword [ebp - 0x60]
lea eax, [ebp - 0x5c]
mov edx, 0x87b8c8
call fcn.00405598
mov edx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp dword [ebp - 8], 0
je 0x87b741
lea eax, [ebp - 0x64]
mov ecx, dword [ebp - 8]
mov edx, 0x87b8e4
call fcn.00405598
mov edx, dword [ebp - 0x64]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx + 0x38]
cmp dword [ebp - 4], 0
je 0x87b762
lea eax, [ebp - 0x68]
mov ecx, dword [ebp - 4]
mov edx, 0x87b8f8
call fcn.00405598
mov edx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea edx, [ebp - 0x70]
mov eax, dword [ebp + 8]
call fcn.0040a78c
mov ecx, dword [ebp - 0x70]
lea eax, [ebp - 0x6c]
mov edx, 0x87b910
call fcn.00405598
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov ecx, dword [ebp - 0x24]
mov dl, byte [ebp - 0x15]
mov eax, dword [ebp - 0x14]
call fcn.0049ed60
test eax, eax
jne 0x87b79e
mov byte [ebp - 0x16], 1
lea eax, [ebp - 0x24]
call fcn.004113dc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x87b7ba
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x87b7fe
lea eax, [ebp - 0x70]
mov edx, 0x13
call fcn.004052b0
lea eax, [ebp - 0x14]
call fcn.0040528c
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004052b0
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.004052b0
ret