Function at 0x40db90
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x43aa78
push 0x422bef
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x441008]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, edx
mov dword [ebp - 0x440], edi
mov dword [ebp - 4], 0
mov ecx, edi
call fcn.004049b0
call fcn.0040dea0
mov bl, al
mov byte [ebp - 0x435], bl
mov dword [ebp - 4], 0xfffffffe
jmp 0x40dc13
test bl, bl
jne 0x40de6e
mov ecx, edi
call fcn.004049b0
push 0x410
push 0
lea eax, [ebp - 0x430]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0x207
lea eax, [ebp - 0x430]
push eax
push str.APPDATA
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [ebp - 0x430]
call fcn.00402de3
mov edx, eax
mov dword [ebp - 0x444], edx
mov ecx, edi
call fcn.00402cf0
mov esi, eax
mov dword [ebp - 0x440], esi
mov ecx, dword [esi + 0x14]
mov dword [ebp - 0x450], ecx
cmp edx, ecx
ja 0x40dcce
mov dword [ebp - 0x434], esi
cmp ecx, 8
jb 0x40dc91
mov eax, dword [esi]
mov dword [ebp - 0x434], eax
mov dword [esi + 0x10], edx
push edx
lea edx, [ebp - 0x430]
mov ecx, eax
call fcn.00402e52
add esp, 4
mov dword [ebp - 0x440], 0
mov eax, dword [ebp - 0x444]
mov ecx, dword [ebp - 0x434]
lea ecx, [ecx + eax*2]
lea edx, [ebp - 0x440]
call fcn.00402e4b
jmp 0x40de5a
call fcn.00402e28
cmp edx, eax
ja 0x40de8c
call fcn.00402e28
mov edx, eax
mov dword [ebp - 0x43c], edx
mov ecx, dword [ebp - 0x444]
or ecx, 7
mov dword [ebp - 0x44c], ecx
cmp ecx, edx
ja 0x40dd42
mov ecx, edi
call fcn.00402cf0
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x434], eax
mov ecx, eax
shr ecx, 1
mov eax, edx
sub eax, ecx
cmp dword [ebp - 0x434], eax
ja 0x40dd3c
mov eax, dword [ebp - 0x434]
add eax, ecx
mov dword [ebp - 0x448], eax
lea edx, [ebp - 0x448]
lea ecx, [ebp - 0x44c]
call fcn.00402dc3
mov edx, dword [eax]
mov dword [ebp - 0x43c], edx
lea eax, [edx + 1]
lea ecx, [eax + eax]
cmp eax, 0x7fffffff
jbe 0x40dd54
or ecx, 0xffffffff
jmp 0x40dd5c
cmp ecx, 0x1000
jb 0x40dd8d
lea eax, [ecx + 0x23]
or edx, 0xffffffff
cmp eax, ecx
cmovbe eax, edx
push eax
call fcn.004226e9
add esp, 4
mov ecx, eax
test ecx, ecx
je 0x40dd87
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
mov edx, dword [ebp - 0x43c]
jmp 0x40dda4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
test ecx, ecx
je 0x40dda2
push ecx
call fcn.004226e9
add esp, 4
mov edx, dword [ebp - 0x43c]
jmp 0x40dda4
xor eax, eax
mov dword [ebp - 0x434], eax
mov eax, dword [ebp - 0x444]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
mov esi, dword [ebp - 0x434]
push eax
lea edx, [ebp - 0x430]
mov ecx, esi
call fcn.00402dcd
add esp, 4
mov dword [ebp - 0x43c], 0
mov eax, dword [ebp - 0x444]
lea ecx, [esi + eax*2]
lea edx, [ebp - 0x43c]
call fcn.00402e4b
mov ecx, dword [ebp - 0x450]
cmp ecx, 8
jb 0x40de37
lea ecx, [ecx*2 + 2]
mov esi, dword [ebp - 0x440]
mov eax, dword [esi]
cmp ecx, 0x1000
jb 0x40de23
add ecx, 0x23
mov edx, dword [eax - 4]
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dd87
mov eax, edx
push ecx
push eax
call fcn.00422996
add esp, 8
mov eax, dword [ebp - 0x434]
mov dword [esi], eax
jmp 0x40de5a
lea ecx, [ebp - 0x434]
call fcn.00402cf0
mov esi, eax
mov ecx, dword [ebp - 0x440]
call fcn.00402cf0
mov edx, eax
call fcn.00402af0
mov edx, dword [esi]
mov dword [eax], edx
mov ecx, edi
call fcn.00402ba5
movzx ebx, bl
mov ecx, 1
test al, al
cmove ebx, ecx
mov al, bl
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.004226d8
mov esp, ebp
pop ebp
ret
call fcn.00403000
int3