Function at 0x10042bd2
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
or eax, 0xffffffff
xor edx, edx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
push ebx
xor ebx, ebx
inc edx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x14], 0xb302aff6
push esi
mov dword [ebp - 0x10], edx
push edi
mov dword [ebp - 0x10], 6
mov edi, ecx
mov dword [ebp - 8], ebx
jmp 0x10042c19
mov eax, dword [ebp - 8]
cmp dword [ebp + eax*4 - 0x34], ebx
jne 0x10042c1f
inc dword [ebp - 8]
cmp dword [ebp - 8], 3
jle 0x10042c0d
mov eax, dword [ebp - 0x30]
xor ecx, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
cmp eax, 0x8c55
setg cl
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], ebx
je 0x10042c44
cmp dword [ebp - 0x14], ebx
je 0x10042c44
cmp dword [ebp - 0x28], ebx
jne 0x10042c46
mov edx, ebx
mov eax, dword [ebp - 0x28]
xor ecx, ecx
cmp edx, eax
mov eax, dword [ebp - 0x28]
sete cl
xor edx, edx
cmp ecx, eax
mov eax, dword [ebp - 0x34]
mov esi, dword [ebp - 0x2c]
setge dl
xor ecx, ecx
cmp edx, eax
mov edx, dword [ebp - 0x28]
setl cl
imul esi, ecx
neg esi
sbb esi, esi
sub edx, dword [ebp - 0x30]
mov eax, dword [ebp - 8]
neg esi
neg edx
sbb edx, edx
xor ecx, ecx
inc edx
cmp edx, eax
setge cl
xor eax, eax
neg ecx
cmp ecx, 0xe790
setl al
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
imul eax, dword [ebp - 0x28]
imul eax, esi
test eax, eax
je 0x10042d0b
push 5
mov dword [ebp - 8], 0xffffffff
mov dword [ebp - 0x10], 0xfffffff6
pop ecx
jmp 0x10042d04
mov dword [ebp - 0x14], 0x4a219909
mov dword [ebp - 0x14], 0xfffffff0
jmp 0x10042ce7
mov dword [ebp - 0xc], 0xffffffff
jmp 0x10042cde
mov eax, dword [ebp - 0xc]
mov dword [ebp - 8], eax
dec dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0xffffffee
jle 0x10042cd5
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], ecx
jl 0x10042ccc
mov dword [ebp - 8], ebx
jmp 0x10042cfb
mov dword [ebp - 0x14], 0xcc90c63b
inc dword [ebp - 8]
cmp dword [ebp - 8], 0xd
je 0x10042cf1
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], ecx
jge 0x10042cbc
jmp 0x10042d7e
mov dword [ebp - 0x14], 0x1b4373c9
mov byte [ebp - 1], bl
cmp byte [ebp - 1], bl
je 0x10042d25
push 0x213c
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
mov dword [ebp - 8], 3
cmp dword [ebp - 8], ebx
jl 0x10042d7e
mov dword [ebp - 0x10], ebx
xor edx, edx
mov ecx, dword [ebp - 0x10]
imul ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x2c]
add eax, ecx
mov ecx, dword [ebp - 0xc]
add ecx, eax
mov eax, dword [ebp - 0xc]
cmp ecx, eax
mov eax, dword [ebp - 8]
setg dl
xor ecx, ecx
mov esi, dword [ebp + eax*4 - 0x34]
mov eax, dword [ebp - 0x14]
cmp eax, edx
mov eax, dword [ebp - 8]
setl cl
add esi, ecx
xor ecx, ecx
mov eax, dword [ebp + eax*4 - 0x34]
add eax, 4
cmp eax, esi
setg cl
lea eax, [ecx + 6]
mov dword [ebp - 0x10], eax
dec dword [ebp - 8]
jns 0x10042d31
push 0x6cb3
xor esi, esi
push edi
inc esi
push esi
call fcn.1003dbca
mov dword [ebp - 0x10], 0xc85f70ad
add esp, 0xc
mov dword [ebp - 0x10], ebx
jmp 0x10042dcf
mov dword [ebp - 0x14], ebx
jmp 0x10042daf
mov eax, dword [ebp - 0x14]
mov dword [ebp + eax*4 - 0x18], 0xffff
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], esi
jl 0x10042da1
mov byte [ebp - 1], bl
cmp byte [ebp - 1], bl
je 0x10042dc9
push 0xcfe
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov eax, dword [ebp - 0x18]
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], esi
jl 0x10042d9c
push edi
call fcn.1002ac56
xor edx, edx
mov esi, eax
inc edx
mov dword [ebp - 8], edx
pop ecx
mov dword [ebp - 8], ebx
jmp 0x10042e75
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0xc], 0xfffffffc
cmp dword [ebp - 0xc], 0xffffffea
jl 0x10042e72
push 3
pop edi
mov dword [ebp - 0x10], 0xf07b4bc6
mov dword [ebp - 0x14], ebx
jmp 0x10042e18
mov eax, dword [ebp - 0x14]
mov dword [ebp + eax*4 - 0x44], 2
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 4
jl 0x10042e0a
mov dword [ebp - 0x10], ebx
jmp 0x10042e64
mov dword [ebp - 0x14], ebx
jmp 0x10042e36
mov eax, dword [ebp - 0x14]
mov dword [ebp + eax*4 - 0x24], 0xc3938dd4
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], edi
jl 0x10042e28
mov byte [ebp - 1], bl
cmp byte [ebp - 1], bl
je 0x10042e4b
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetCommState]
mov dword [ebp - 0x24], ebx
jmp 0x10042e5c
mov eax, dword [ebp - 0x24]
cmp dword [ebp + eax*4 - 0x44], ebx
jne 0x10042e61
inc dword [ebp - 0x24]
cmp dword [ebp - 0x24], edi
jle 0x10042e50
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], edi
jle 0x10042e23
dec dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0xffffffea
jge 0x10042dfe
inc dword [ebp - 8]
cmp dword [ebp - 8], 6
jg 0x10042deb
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret