Function at 0x40a300
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xe1c
mov eax, dword [0x455008]
xor eax, esp
mov dword [esp + 0xe18], eax
push ebx
mov ebx, ecx
push esi
mov eax, ebx
mov esi, edx
and eax, 0xffff0000
mov dword [esp + 0xc], esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0xc], edi
cmp eax, 0x80130000
jne 0x40a496
push 0x104
lea eax, [esp + 0x1c]
push eax
push 0x448540
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, eax
test ecx, ecx
jne 0x40a38e
push 0x104
lea eax, [esp + 0x1c]
push eax
push 0x4485b8
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, eax
test ecx, ecx
je 0x40a496
push 0x400
lea eax, [esp + 0x224]
push eax
movzx eax, bx
add eax, 0x6000
push eax
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
test eax, eax
je 0x40a496
cmp eax, 0x400
jae 0x40a5a8
push 0
push 0
push 0xffffffffffffffff
mov byte [esp + eax + 0x22c], 0
lea eax, [esp + 0x22c]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [esp + 0x14], eax
lea ecx, [eax + eax]
push ecx
call fcn.0041f021
mov edi, eax
add esp, 4
test edi, edi
je 0x40a492
push dword [esp + 0x14]
lea eax, [esp + 0x224]
push edi
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push edi
call fcn.00417897
mov esi, eax
add esp, 8
cmp esi, edi
jbe 0x40a43f
movzx ecx, word [esi - 2]
sub esi, 2
push ecx
call fcn.004204e2
add esp, 4
test eax, eax
je 0x40a43f
xor eax, eax
mov word [esi], ax
cmp esi, edi
ja 0x40a422
mov edx, dword [esp + 0xc]
mov ecx, 0x44514c
test edx, edx
mov eax, 0x448630
cmove eax, ecx
push eax
mov eax, ecx
cmovne eax, edx
push eax
mov eax, dword [esp + 0x18]
test eax, eax
push edi
push ebx
push ebx
cmovne ecx, eax
push ecx
push 0x448634
push 0
push 0
call fcn.00414dd0
push edi
call fcn.0041f006
add esp, 0x28
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe18]
xor ecx, esp
call fcn.00415f69
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0xc]
xor eax, eax
push eax
push 0x400
mov word [esp + 0x628], ax
lea eax, [esp + 0x628]
push eax
push 0
push ebx
push 0
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
cmp word [esp + 0x620], 0
je 0x40a564
lea eax, [esp + 0x620]
push 0
push eax
call fcn.00417897
mov esi, eax
add esp, 8
lea eax, [esp + 0x620]
cmp esi, eax
jbe 0x40a514
nop dword [eax]
movzx ecx, word [esi - 2]
sub esi, 2
push ecx
call fcn.004204e2
add esp, 4
test eax, eax
je 0x40a514
xor eax, eax
mov word [esi], ax
lea eax, [esp + 0x620]
cmp esi, eax
ja 0x40a4f0
test edi, edi
mov ecx, 0x44514c
mov eax, 0x448630
cmove eax, ecx
push eax
mov eax, ecx
cmovne eax, edi
push eax
push ebx
push ebx
lea eax, [esp + 0x630]
push eax
mov eax, dword [esp + 0x24]
test eax, eax
cmovne ecx, eax
push ecx
push 0x448670
push 0
push 0
call fcn.00414dd0
add esp, 0x24
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe18]
xor ecx, esp
call fcn.00415f69
mov esp, ebp
pop ebp
ret
test edi, edi
mov ecx, 0x44514c
mov eax, 0x448630
cmove eax, ecx
push eax
mov eax, ecx
cmovne eax, edi
test esi, esi
push eax
push ebx
push ebx
cmovne ecx, esi
push ecx
push 0x4486a0
push 0
push 0
call fcn.00414dd0
mov ecx, dword [esp + 0xe44]
add esp, 0x20
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00415f69
mov esp, ebp
pop ebp
ret
call fcn.00416099
int3