Function at 0x4369b0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x50a124]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
xor ecx, ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, 1
mov dword [ebp - 0x4c], eax
mov esi, edi
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x38], ebx
mov eax, dword [edi]
test eax, eax
je 0x436a28
push 0x3d
push eax
call fcn.00481aa0
add esp, 8
test eax, eax
je 0x436a1b
push 0
push 0
push 0xffffffffffffffff
push dword [esi]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x436b1d
mov ecx, dword [ebp - 0x34]
add ecx, eax
inc ebx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x38], ebx
jmp 0x436a1e
mov ecx, dword [ebp - 0x34]
mov eax, dword [esi + 4]
add esi, 4
test eax, eax
jne 0x4369e1
lea eax, [ecx + ecx]
push eax
call fcn.00425da0
mov esi, eax
add esp, 4
mov dword [ebp - 0x40], esi
test esi, esi
jne 0x436a46
cmp dword [ebp - 0x34], eax
ja 0x436ba0
lea eax, [ebx*4]
call fcn.00480160
mov eax, esp
mov dword [ebp - 0x3c], eax
mov ebx, eax
mov eax, dword [edi]
test eax, eax
je 0x436aa8
nop
push 0x3d
push eax
call fcn.00481aa0
add esp, 8
test eax, eax
je 0x436a9e
mov eax, dword [ebp - 0x34]
mov ecx, esi
sub ecx, dword [ebp - 0x40]
sar ecx, 1
sub eax, ecx
push eax
push esi
push 0xffffffffffffffff
push dword [edi]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x436b37
mov dword [ebx], esi
add ebx, 4
lea esi, [esi + eax*2]
mov eax, dword [edi + 4]
add edi, 4
test eax, eax
jne 0x436a60
mov eax, dword [ebp - 0x38]
push 0x436d70
push 4
dec eax
mov dword [ebx], 0
mov ebx, dword [ebp - 0x3c]
push eax
push ebx
call fcn.004aea70
add esp, 0x10
lea edi, [ebp - 0x30]
xor esi, esi
nop dword [eax + eax]
mov eax, dword [ebx]
test eax, eax
je 0x436aef
push eax
push dword [esi + 0x4e69f0]
push dword [esi + 0x4e69ec]
call fcn.00436660
add esp, 0xc
test eax, eax
jns 0x436b60
push 0
mov ecx, 0x4e69f0
mov eax, esi
push 0
push dword [esi + 0x4e69e8]
add eax, ecx
mov dword [ebp - 0x44], eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [edi], eax
test eax, eax
je 0x436b67
mov ecx, dword [ebp - 0x44]
mov ecx, dword [ecx]
add ecx, eax
add dword [ebp - 0x34], ecx
jmp 0x436b67
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047f334
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x40]
mov esi, eax
call fcn.00425c40
add esp, 4
mov eax, esi
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047f334
mov esp, ebp
pop ebp
ret
add ebx, 4
test eax, eax
jne 0x436b6d
add esi, 0xc
add edi, 4
cmp esi, 0x84
jb 0x436ad0
mov eax, dword [ebp - 0x34]
lea eax, [eax*2 + 2]
push eax
call fcn.00425da0
mov ebx, eax
add esp, 4
mov dword [ebp - 0x44], ebx
test ebx, ebx
jne 0x436bb9
push dword [ebp - 0x40]
call fcn.00425c40
add esp, 4
mov eax, 0xe
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047f334
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x3c]
xor edi, edi
mov edx, ebx
xor esi, esi
mov eax, dword [eax]
mov dword [ebp - 0x38], edx
test eax, eax
jne 0x436c03
cmp esi, 0x84
jb 0x436c78
push dword [ebp - 0x40]
mov word [edx], ax
call fcn.00425c40
mov ecx, dword [ebp - 0x4c]
add esp, 4
mov eax, dword [ebp - 0x44]
mov dword [ecx], eax
xor eax, eax
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047f334
mov esp, ebp
pop ebp
ret
cmp edi, 0xb
jb 0x436c59
mov dword [ebp - 0x48], 1
mov ecx, dword [ebp - 0x3c]
mov ecx, dword [ecx]
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x436c17
sub ecx, ebx
sar ecx, 1
lea ebx, [ecx + 1]
lea eax, [ebx + ebx]
push eax
mov eax, dword [ebp - 0x3c]
push dword [eax]
push edx
call fcn.00481bd0
mov eax, dword [ebp - 0x3c]
add esp, 0xc
add eax, 4
cmp dword [ebp - 0x48], 0
mov dword [ebp - 0x3c], eax
jne 0x436c4e
inc edi
add esi, 0xc
mov edx, dword [ebp - 0x38]
lea edx, [edx + ebx*2]
jmp 0x436bc2
push eax
push dword [esi + 0x4e69f0]
push dword [esi + 0x4e69ec]
call fcn.00436660
mov edx, dword [ebp - 0x38]
add esp, 0xc
mov dword [ebp - 0x48], eax
test eax, eax
jns 0x436c0f
mov ebx, dword [ebp + edi*4 - 0x30]
test ebx, ebx
je 0x436cc7
mov ecx, dword [esi + 0x4e69ec]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x436c86
mov eax, dword [esi + 0x4e69f0]
mov edx, dword [ebp - 0x38]
lea edx, [edx + eax*2]
mov eax, dword [ebp - 0x34]
mov ecx, edx
mov dword [ebp - 0x38], edx
sub ecx, dword [ebp - 0x44]
sar ecx, 1
sub eax, ecx
push eax
push edx
push dword [esi + 0x4e69e8]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [ebx - 1]
cmp eax, ecx
jne 0x436cd9
mov edx, dword [ebp - 0x38]
inc edi
mov eax, dword [ebp - 0x3c]
add esi, 0xc
lea edx, [edx + ebx*2]
jmp 0x436bc2
push 0x4e6c88
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0042bc50
int3