Function at 0x403d40
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47b322
mov eax, dword fs:[0]
push eax
mov eax, 0x1070
call fcn.0047a9b0
mov eax, dword [0x49f008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp byte [esi + 0x60], 0
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x1064], eax
je 0x403d90
mov eax, 3
jmp 0x404652
mov eax, dword [ebp + 0x18]
mov byte [esi + 0x60], 0
sub eax, 0
je 0x403db3
sub eax, 1
je 0x403daa
mov dword [esi + 0x6c], 2
jmp 0x403dba
mov dword [esi + 0x6c], 1
jmp 0x403dba
mov dword [esi + 0x6c], 0
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x70], 0
mov byte [esi + 0x74], 0
mov dword [esi], 0
mov dword [esi + 0x78], 0
mov dword [esi + 0x64], eax
mov dword [esi + 0x68], 0x8000000
mov edx, dword [esi + 0x84]
push ecx
mov ecx, dword [esi + 0x80]
call fcn.0040aba0
mov eax, dword [esi + 0x80]
add esp, 4
mov dword [esi + 0x84], eax
lea eax, [esi + 0x1c]
mov dword [esi + 0x8c], 0
cmp dword [eax + 0x14], 8
mov dword [eax + 0x10], 0
jb 0x403e1c
mov eax, dword [eax]
xor ecx, ecx
mov word [eax], cx
test byte [esi + 0x64], 0x10
je 0x403e2a
mov dword [esi + 0x68], ecx
cmp dword [esi + 0x48], 8
lea ebx, [esi + 0x34]
mov dword [ebx + 0x10], ecx
mov eax, ebx
jb 0x403e3a
mov eax, dword [ebx]
xor ecx, ecx
mov word [eax], cx
test edi, edi
je 0x403e7e
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403e50
sub ecx, edx
sar ecx, 1
je 0x403e7e
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403e66
sub ecx, edx
sar ecx, 1
push ecx
push edi
mov ecx, ebx
call fcn.00402380
mov edx, dword [ebp - 0x1064]
test edx, edx
jne 0x403ed9
push 0x208
push edx
lea eax, [ebp - 0x21c]
push eax
call fcn.00465300
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0x104
push eax
push 0x487e84
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403ec0
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
jmp 0x403ef1
mov ecx, edx
lea edi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403ee0
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea edi, [esi + 4]
mov ecx, edi
call fcn.00402380
mov dword [esi + 0x50], 0
mov dword [esi + 0x54], 0
mov dword [esi + 0x58], 0
mov dword [esi + 0x5c], 0
cmp dword [esi + 0x14], 0
mov byte [ebp - 0x1059], 0
je 0x403fbc
push str.dism.exe
mov ecx, esi
call fcn.00404690
test al, al
je 0x403fbc
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x403f46
mov eax, dword [edi]
push eax
lea eax, [ebp - 0x814]
push str._sdism.exe
push eax
call fcn.0040a3d0
add esp, 0xc
lea eax, [ebp - 0x1050]
push eax
lea eax, [ebp - 0x814]
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov dword [ebp - 0x1064], eax
test eax, eax
je 0x403fbc
push eax
call fcn.0046be9e
add esp, 4
mov dword [ebp - 0x1060], eax
test eax, eax
je 0x403fbc
push eax
push dword [ebp - 0x1064]
lea eax, [ebp - 0x814]
push dword [ebp - 0x1050]
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
jne 0x40406e
push dword [ebp - 0x1060]
call fcn.0046be99
add esp, 4
push str.dism.exe
mov ecx, esi
call fcn.00404690
mov byte [ebp - 0x1059], al
cmp byte [ebp + 0x10], 0
jne 0x404637
mov cl, byte [esi + 0x4c]
cmp cl, 6
ja 0x403ff0
jne 0x404637
cmp byte [esi + 0x4d], 1
jb 0x404637
push str.dismapi.dll
mov ecx, esi
call fcn.00404690
test al, al
mov al, byte [ebp - 0x1059]
je 0x40463d
test al, al
je 0x40463d
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x40401c
mov eax, dword [edi]
push eax
lea eax, [ebp - 0xc24]
push str._sdismapi.dll
push eax
call fcn.0040a3f0
add esp, 0xc
mov eax, edi
cmp dword [edi + 0x14], 8
jb 0x40403b
mov eax, dword [edi]
push eax
lea eax, [ebp - 0x1034]
push 0x487ee8
push eax
call fcn.0040a3f0
mov eax, dword [esi + 0x64]
add esp, 0xc
test al, 1
jne 0x4040e1
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov dword [ebp - 0x1064], eax
mov eax, dword [esi + 0x64]
jmp 0x4040ed
lea eax, [ebp - 0x1054]
push eax
lea eax, [ebp - 0x1058]
push eax
push 0x487e80
push dword [ebp - 0x1060]
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x4040ba
mov ecx, dword [ebp - 0x1058]
mov byte [ebp - 0x1059], 1
movzx eax, word [ecx + 0xa]
mov dword [esi + 0x50], eax
movzx eax, word [ecx + 8]
mov dword [esi + 0x54], eax
movzx eax, word [ecx + 0xe]
mov dword [esi + 0x58], eax
movzx eax, word [ecx + 0xc]
mov dword [esi + 0x5c], eax
push dword [ebp - 0x1060]
call fcn.0046be99
add esp, 4
cmp byte [ebp - 0x1059], 0
je 0x403fbc
mov byte [ebp - 0x1059], 1
jmp 0x403fce
mov ecx, dword [ebp - 0x1054]
mov dword [ebp - 0x1064], ecx
test al, 2
jne 0x40423f
push 0x1000
call fcn.0046be9e
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40423c
push 0x800
push ebx
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x1060], eax
cmp eax, 0x1000
jbe 0x404166
push ebx
call fcn.0046be99
mov eax, dword [ebp - 0x1060]
add esp, 4
add eax, eax
push eax
call fcn.0046be9e
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x404233
mov ecx, dword [ebp - 0x1060]
lea eax, [ecx + ecx]
shr eax, 1
push eax
push ebx
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
xor eax, eax
mov dword [ebp - 0x103c], 0
mov dword [ebp - 0x1038], 7
mov word [ebp - 0x104c], ax
push edi
lea ecx, [ebp - 0x104c]
mov dword [ebp - 4], eax
call fcn.00402140
push 1
push 0x487efc
lea ecx, [ebp - 0x104c]
call fcn.0040a360
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4041b0
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x104c]
call fcn.0040a360
cmp dword [ebp - 0x1038], 8
lea eax, [ebp - 0x104c]
cmovae eax, dword [ebp - 0x104c]
push eax
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1038]
cmp edx, 8
jb 0x404233
mov ecx, dword [ebp - 0x104c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404229
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404677
push edx
push ecx
call fcn.004632e1
add esp, 8
push ebx
call fcn.0046be99
add esp, 4
lea ebx, [esi + 0x34]
test byte [esi + 0x64], 4
lea eax, [ebp - 0xc24]
je 0x404254
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
jmp 0x40425f
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
test byte [esi + 0x64], 1
mov dword [esi + 0x78], eax
jne 0x404274
push dword [ebp - 0x1064]
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov eax, dword [esi + 0x78]
test eax, eax
jne 0x404345
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea eax, [ebp - 0x1070]
push 0x3f6
push eax
call fcn.004643b0
mov edx, 0x487d18
push edi
mov ecx, dword [eax]
test ecx, ecx
lea eax, [ebp - 0xdc]
cmovne edx, ecx
push edx
push eax
call fcn.0040a410
add esp, 0x14
push dword [ebp - 0x1068]
call fcn.004634ea
add esp, 4
push dword [ebp - 0x1070]
call fcn.004634ea
add esp, 4
lea eax, [ebp - 0xdc]
lea ecx, [ebp - 0x107c]
push eax
call fcn.004021d0
lea eax, [ebp - 0x107c]
mov dword [ebp - 4], 1
push eax
lea ecx, [esi + 0x80]
call fcn.00409ff0
mov edx, dword [ebp - 0x1068]
cmp edx, 8
jb 0x404637
mov ecx, dword [ebp - 0x107c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404336
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40467c
push edx
push ecx
call fcn.004632e1
add esp, 8
jmp 0x404637
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.DismInitialize
push eax
call edi
push str.DismMountImage
mov dword [0x4a085c], eax
push dword [esi + 0x78]
call edi
push str.DismOpenSession
mov dword [0x4a0858], eax
push dword [esi + 0x78]
call edi
push str.DismCommitImage
mov dword [0x4a0854], eax
push dword [esi + 0x78]
call edi
push str.DismCloseSession
mov dword [0x4a0850], eax
push dword [esi + 0x78]
call edi
push str.DismUnmountImage
mov dword [0x4a084c], eax
push dword [esi + 0x78]
call edi
push str.DismShutdown
mov dword [0x4a0848], eax
push dword [esi + 0x78]
call edi
push str.DismGetMountedImageInfo
mov dword [0x4a0844], eax
push dword [esi + 0x78]
call edi
push str.DismCleanupMountpoints
mov dword [0x4a0840], eax
push dword [esi + 0x78]
call edi
push str.DismAddPackage
mov dword [0x4a083c], eax
push dword [esi + 0x78]
call edi
push str.DismAddDriver
mov dword [0x4a0838], eax
push dword [esi + 0x78]
call edi
push str.DismDelete
mov dword [0x4a0834], eax
push dword [esi + 0x78]
call edi
mov edi, dword [0x4a085c]
mov edx, eax
mov al, 1
mov dword [0x4a0830], edx
movzx ecx, al
xor eax, eax
test edi, edi
cmove ecx, eax
cmp dword [0x4a0858], eax
movzx ecx, cl
cmove ecx, eax
movzx eax, cl
xor ecx, ecx
cmp dword [0x4a0854], ecx
cmove eax, ecx
cmp dword [0x4a0850], ecx
movzx eax, al
cmove eax, ecx
cmp dword [0x4a084c], ecx
movzx eax, al
cmove eax, ecx
cmp dword [0x4a0848], ecx
movzx eax, al
cmove eax, ecx
cmp dword [0x4a0844], ecx
movzx eax, al
cmove eax, ecx
cmp dword [0x4a0840], ecx
movzx eax, al
cmove eax, ecx
cmp dword [0x4a083c], ecx
movzx eax, al
cmove eax, ecx
cmp dword [0x4a0838], ecx
movzx eax, al
cmove eax, ecx
cmp dword [0x4a0834], ecx
movzx eax, al
cmove eax, ecx
test edx, edx
je 0x40458d
test al, al
je 0x40458d
cmp dword [esi + 0x44], ecx
jne 0x4044a5
xor ebx, ebx
jmp 0x4044ad
cmp dword [ebx + 0x14], 8
jb 0x4044ad
mov ebx, dword [ebx]
push 0
push ebx
push dword [esi + 0x6c]
call edi
mov edi, eax
test edi, edi
jns 0x40457e
push dword [esi + 0x78]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 0x2e4
cmp di, ax
jne 0x4044dc
mov eax, 1
jmp 0x404652
lea eax, [ebp - 0x1070]
push 0x3f7
push eax
call fcn.004643b0
add esp, 8
mov dword [ebp - 4], 2
mov ecx, 0x487d18
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
lea ecx, [ebp - 0x104c]
call fcn.004021d0
lea eax, [ebp - 0x104c]
mov byte [ebp - 4], 3
push eax
lea ecx, [esi + 0x80]
call fcn.00409ff0
mov edx, dword [ebp - 0x1038]
cmp edx, 8
jb 0x404565
mov ecx, dword [ebp - 0x104c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40455b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404681
push edx
push ecx
call fcn.004632e1
add esp, 8
push dword [ebp - 0x1068]
call fcn.004634ea
add esp, 4
push dword [ebp - 0x1070]
jmp 0x40462f
mov byte [esi + 0x60], 1
mov dword [esi], 1
jmp 0x404637
push dword [esi + 0x78]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x1040]
push 0x3f8
push eax
call fcn.004643b0
add esp, 8
mov dword [ebp - 4], 4
mov ecx, 0x487d18
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
lea ecx, [ebp - 0x107c]
call fcn.004021d0
lea eax, [ebp - 0x107c]
mov byte [ebp - 4], 5
push eax
lea ecx, [esi + 0x80]
call fcn.00409ff0
mov edx, dword [ebp - 0x1068]
cmp edx, 8
jb 0x40461b
mov ecx, dword [ebp - 0x107c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404611
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404686
push edx
push ecx
call fcn.004632e1
add esp, 8
push dword [ebp - 0x1038]
call fcn.004634ea
add esp, 4
push dword [ebp - 0x1040]
call fcn.004634ea
add esp, 4
mov al, byte [ebp - 0x1059]
cmp dword [esi], 0
jne 0x404650
test al, al
je 0x404670
mov dword [esi], 2
mov byte [esi + 0x60], 1
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004632a0
mov esp, ebp
pop ebp
ret 0x14
mov eax, 8
jmp 0x404652
call fcn.0046851b
call fcn.0046851b
call fcn.0046851b
call fcn.0046851b
int3