Function at 0x403b40
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x3024c
call fcn.00405f20
mov eax, dword [0x41b00c]
xor eax, esp
mov dword [esp + 0x30248], eax
mov eax, dword [esp + 0x30254]
push ebp
push esi
xor esi, esi
push 0x30018
lea ecx, [esp + 0x23c]
push esi
push ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], esi
call fcn.00405640
push 0x1d8
lea edx, [esp + 0x70]
push esi
push edx
call fcn.00405640
push 0x48
lea eax, [esp + 0x34]
push esi
push eax
call fcn.00405640
mov eax, dword [esp + 0x3027c]
add esp, 0x24
push eax
push esi
push 0x410
mov dword [esp + 0x244], eax
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x403be5
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x30248]
xor ecx, esp
call fcn.00405622
add esp, 0x3024c
ret
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0x18
mov edi, eax
push 8
push edi
call ebx
mov esi, eax
test esi, esi
je 0x403c3c
lea ecx, [esp + 0x14]
push ecx
push 0x18
push esi
push 0
push ebp
call dword [0x41c9b8]
test eax, eax
jl 0x403e9d
cmp dword [esp + 0x14], 0x18
jbe 0x403c5e
push esi
push 0
push edi
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [esp + 0x14]
push edx
push 8
push edi
call ebx
mov esi, eax
test esi, esi
jne 0x403c4a
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x403ecc
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x14]
push eax
push ecx
push esi
push 0
push ebp
call dword [0x41c9b8]
test eax, eax
jl 0x403e9d
mov edx, dword [esi + 0x14]
mov dword [esp + 0x244], edx
mov eax, dword [esi + 0xc]
mov dword [esp + 0x254], eax
mov ecx, dword [esi]
mov dword [esp + 0x258], ecx
mov edx, dword [esi + 4]
mov dword [esp + 0x24c], edx
mov eax, dword [esi + 8]
mov dword [esp + 0x250], eax
cmp dword [esi + 4], 0
je 0x403e7b
mov eax, dword [esi + 4]
lea ecx, [esp + 0x10]
push ecx
push 0x1d8
lea edx, [esp + 0x70]
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x403e7b
mov ecx, dword [esp + 0x23c]
mov dl, byte [esp + 0x6a]
lea eax, [esp + 0x10]
push eax
push 0x48
mov dword [esp + 0x250], ecx
lea ecx, [esp + 0x28]
mov byte [esp + 0x264], dl
mov edx, dword [esp + 0x80]
push ecx
push edx
push ebp
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x403e7b
mov ax, word [esp + 0x60]
test ax, ax
jbe 0x403d7f
movzx eax, ax
push eax
push 8
push edi
call ebx
mov ebx, eax
test ebx, ebx
je 0x403d79
movzx edx, word [esp + 0x60]
mov eax, dword [esp + 0x64]
lea ecx, [esp + 0x10]
push ecx
push edx
push ebx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x403d67
mov ax, word [esp + 0x60]
mov ecx, 0xfffe
cmp ax, cx
jb 0x403d50
lea eax, [ecx - 2]
jmp 0x403d53
movzx eax, ax
push eax
push ebx
push 0xfffe
lea edx, [esp + 0x20266]
push edx
call fcn.00403a00
push ebx
push 0
push edi
call dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
je 0x403e71
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ax, word [esp + 0x58]
test ax, ax
jbe 0x403dfb
movzx eax, ax
push eax
push 8
push edi
mov dword [esp + 0x1c], 0
call ebx
mov ebx, eax
test ebx, ebx
je 0x403df5
movzx edx, word [esp + 0x58]
mov eax, dword [esp + 0x5c]
lea ecx, [esp + 0x10]
push ecx
push edx
push ebx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x403de7
mov ax, word [esp + 0x58]
mov ecx, 0xfffe
cmp ax, cx
jb 0x403dd0
lea eax, [ecx - 2]
jmp 0x403dd3
movzx eax, ax
push eax
push ebx
push 0xfffe
lea edx, [esp + 0x10268]
push edx
call fcn.00403a00
push ebx
push 0
push edi
call dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
je 0x403e71
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ax, word [esp + 0x44]
test ax, ax
jbe 0x403e7b
movzx eax, ax
push eax
push 8
push edi
mov dword [esp + 0x1c], 0
call ebx
mov ebx, eax
test ebx, ebx
je 0x403e7b
movzx edx, word [esp + 0x44]
mov eax, dword [esp + 0x48]
lea ecx, [esp + 0x10]
push ecx
push edx
push ebx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x403e63
mov ax, word [esp + 0x44]
mov ecx, 0xfffe
cmp ax, cx
jb 0x403e4c
lea eax, [ecx - 2]
jmp 0x403e4f
movzx eax, ax
push eax
push ebx
push 0xfffe
lea edx, [esp + 0x26a]
push edx
call fcn.00403a00
push ebx
push 0
push edi
call dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jne 0x403e7b
mov dword [esp + 0x18], 0
jmp 0x403e9d
cmp dword [esp + 0x240], 4
jne 0x403e9d
push 0xfffe
lea eax, [esp + 0x10260]
push eax
push 0x414c88
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push esi
push 0
push edi
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x1c]
push 0x30018
lea ecx, [esp + 0x244]
push ecx
push edx
call fcn.004056c0
mov eax, dword [esp + 0x24]
add esp, 0xc
mov ecx, dword [esp + 0x30258]
pop edi
pop ebx
pop esi
pop ebp
xor ecx, esp
call fcn.00405622
add esp, 0x3024c
ret