Function at 0x40685d
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
push ebx
mov esi, 0
mov edx, esi
shr edx, 2
movzx edi, dx
mov eax, esi
sub eax, edi
push eax
mov edx, edi
imul edx, esi
push edx
push 0
mov eax, edi
and eax, esi
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
movzx esi, al
mov edx, esi
test dl, dl
je 0x40689e
call dword [sym.imp.MSVCRT.dll__except_handler3]
mov eax, edi
or eax, 0x6344
movzx esi, al
cmp esi, 0x43
jne 0x4068b8
mov eax, esi
add eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov ecx, esi
xor ecx, edi
sub ecx, 0x44
push ecx
mov ecx, esi
imul ecx, edi
push ecx
push 0
mov eax, edi
or eax, esi
sub eax, 0x44
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
movzx edi, ax
mov eax, edi
test ax, ax
je 0x4068ea
call dword [sym.imp.MSVCRT.dll__except_handler3]
mov eax, dword [ebp + 8]
movzx esi, al
mov edx, esi
test dl, dl
je 0x4068fc
call dword [sym.imp.GDI32.dll_CreateRectRgnIndirect]
mov edx, esi
add edx, edi
push edx
mov eax, edi
and eax, esi
push eax
push 0
mov ecx, esi
imul ecx, edi
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
movzx esi, al
mov edx, esi
test dl, dl
je 0x406927
call dword [sym.imp.MSVCRT.dll__except_handler3]
mov ecx, dword [ebp + 0xc]
imul ecx, ecx, 0x221c
movzx esi, cl
mov eax, dword [ebp + 0xc]
and eax, esi
mov ebx, eax
mov eax, edi
add eax, 0x55a60000
mov byte [ebp - 4], al
cmp edi, 0
jle 0x406970
mov ecx, edi
movzx eax, byte [ebp - 4]
and ecx, eax
and ecx, 0x40496680
push ecx
mov eax, ebx
imul eax, eax, 0xfc000000
mov ecx, esi
add ecx, eax
push ecx
movzx edx, byte [ebp - 4]
sub edx, ebx
push edx
push ebx
call dword [ebp - 8]
cmp byte [ebp - 4], 0
jge 0x40697d
mov eax, esi
jmp 0x406ae7
mov eax, esi
xor eax, edi
push eax
movzx ecx, byte [ebp - 4]
xor ecx, edi
push ecx
push 0
mov ecx, edi
imul ecx, ebx
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
mov ebx, eax
test ebx, ebx
je 0x4069a7
call dword [sym.imp.MSVCRT.dll__except_handler3]
mov edx, dword [ebp + 8]
xor edx, 0xda
mov eax, edi
sub eax, edx
mov ebx, eax
mov edx, esi
and edx, ebx
push edx
movzx eax, byte [ebp - 4]
imul eax, esi
push eax
push 0
mov edx, esi
xor edx, ebx
sub edx, 0xffffff26
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
movzx esi, al
mov eax, esi
test al, al
je 0x4069e9
call dword [sym.imp.MSVCRT.dll__except_handler3]
movzx edx, byte [ebp - 4]
shr edx, 2
movzx esi, dl
cmp edi, 0xffff
jne 0x406a02
mov eax, ebx
jmp 0x406ae7
mov eax, ebx
xor eax, edi
sub eax, 0xffffff26
push eax
mov edx, ebx
or edx, esi
sub edx, 0xffffff26
push edx
push 0
mov ecx, esi
imul ecx, ebx
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
mov byte [ebp - 4], al
mov dl, byte [ebp - 4]
test dl, dl
je 0x406a39
call dword [sym.imp.MSVCRT.dll__except_handler3]
mov eax, ebx
or eax, edi
mov dword [ebp - 0xc], eax
movzx ecx, byte [ebp - 4]
sub ecx, edi
push ecx
mov ecx, edi
add ecx, esi
push ecx
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
movzx edi, ax
mov ecx, edi
test cx, cx
je 0x406a6a
call dword [sym.imp.MSVCRT.dll__except_handler3]
movzx edx, byte [ebp - 4]
shl edx, 0x18
mov dword [ebp - 0x10], edx
mov al, byte [ebp - 4]
test al, al
jne 0x406a83
call fcn.004042f8
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
xor eax, 0x583a0000
mov byte [ebp - 4], al
movzx ecx, byte [ebp - 4]
and ecx, dword [ebp - 0x10]
add ecx, dword [ebp + 0xc]
mov byte [ebp - 4], cl
mov ecx, ebx
movzx eax, byte [ebp - 4]
and ecx, eax
mov edx, dword [ebp - 0x10]
sub edx, ecx
mov dword [ebp - 0x14], edx
mov ecx, edi
imul ecx, dword [ebp - 0xc]
push ecx
mov eax, esi
sub eax, ebx
sub eax, 0xda
push eax
push 0
mov ecx, dword [ebp - 0x10]
xor ecx, dword [ebp - 0xc]
add ecx, 0xffff7b3d
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x406ae5
call dword [sym.imp.MSVCRT.dll__except_handler3]
mov eax, esi
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc