Function at 0x100565d0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005fe81
mov eax, dword fs:[0]
push eax
sub esp, 0x4d4
mov eax, dword [0x1007b00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x4e0], edx
mov ebx, ecx
push ebx
lea ecx, [ebp - 0x21c]
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x4dc], 0
mov dword [ebp - 0x21c], 0
call fcn.1002dd50
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x2c
push dword [ebp - 0x21c]
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov esi, eax
add esp, 0x14
or edi, 0xffffffff
test esi, esi
je 0x1005671f
mov eax, dword [ebp - 0x21c]
sub esi, eax
sar esi, 1
cmp esi, edi
je 0x10056725
lea ecx, [esi + 1]
test ecx, ecx
js 0x1005672c
mov edx, dword [eax - 0xc]
cmp ecx, edx
jg 0x1005672c
cmp word [eax + ecx*2], 0x2d
lea eax, [ebp - 0x4d8]
cmovne ecx, esi
sub edx, ecx
lea ecx, [ebp - 0x21c]
push edx
push eax
call fcn.10057780
push dword [eax]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
mov edx, dword [ebp - 0x4d8]
add esp, 4
mov dword [ebp - 0x4dc], eax
add edx, 0xfffffff0
mov ecx, edi
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x100566db
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push esi
lea eax, [ebp - 0x4d8]
push eax
lea ecx, [ebp - 0x21c]
call fcn.10057710
push eax
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 1
call fcn.10057990
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x4d8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1005671f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x21c]
mov edx, dword [eax - 0xc]
test edx, edx
jns 0x10056736
push 0x80070057
call fcn.1002af80
movzx ecx, word [eax]
cmp ecx, 0x22
jne 0x1005678c
lea eax, [edx - 2]
push eax
push ecx
lea eax, [ebp - 0x4d8]
push eax
lea ecx, [ebp - 0x21c]
call fcn.10057800
push eax
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 2
call fcn.10057990
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x4d8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10056786
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x21c]
push 0x104
lea ecx, [ebp - 0x218]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x100567ae
mov esi, dword [ebp - 0x220]
jmp 0x10056865
cmp dword [ebp - 0x4e0], 0
jne 0x10056821
push 1
lea eax, [ebp - 0x220]
push eax
push 0
push dword [ebp - 0x4dc]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHELL32.dll_ExtractIconExW]
mov esi, dword [ebp - 0x220]
test esi, esi
jne 0x10056865
push 0x2b4
lea eax, [ebp - 0x4d4]
push esi
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 4
lea eax, [ebp - 0x4d4]
lea ecx, [ebp - 0x218]
push eax
call fcn.10056550
add esp, 0xc
test eax, eax
je 0x10056819
mov esi, dword [ebp - 0x4d4]
jmp 0x1005683b
mov esi, dword [ebp - 0x220]
jmp 0x10056841
push 0
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.SHELL32.dll_ExtractIconW]
mov esi, eax
mov dword [ebp - 0x220], esi
test esi, esi
jne 0x10056865
cmp dword [0x1007de34], esi
jne 0x10056857
call fcn.10050af0
mov dword [0x1007de34], eax
push ebx
call fcn.10050a60
mov esi, eax
mov dword [ebp - 0x220], esi
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
jg 0x10056887
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1005b6db
mov esp, ebp
pop ebp
ret