Function at 0x403f90
Capabilities:
Link many functions at runtime
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46196c
mov eax, dword fs:[0]
push eax
sub esp, 0xb50
mov eax, dword [0x4920c0]
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 - 0xb24], eax
je 0x403fdc
mov eax, 3
jmp 0x4045a3
mov eax, dword [ebp + 0x18]
mov byte [esi + 0x60], 0
sub eax, 0
je 0x403ffd
dec eax
je 0x403ff4
mov dword [esi + 0x6c], 2
jmp 0x404004
mov dword [esi + 0x6c], 1
jmp 0x404004
mov dword [esi + 0x6c], 0
mov eax, dword [ebp + 0xc]
push dword [ebp - 0xb24]
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.004099d0
mov eax, dword [esi + 0x80]
mov dword [esi + 0x84], eax
lea eax, [esi + 0x1c]
mov dword [esi + 0x8c], 0
add esp, 8
cmp dword [eax + 0x14], 8
mov dword [eax + 0x10], 0
jb 0x40406c
mov eax, dword [eax]
xor ecx, ecx
mov word [eax], cx
test byte [esi + 0x64], 0x10
je 0x40407a
mov dword [esi + 0x68], ecx
cmp dword [esi + 0x48], 8
lea ebx, [esi + 0x34]
mov dword [ebx + 0x10], ecx
jb 0x40408a
mov eax, dword [ebx]
jmp 0x40408c
mov eax, ebx
xor ecx, ecx
mov word [eax], cx
test edi, edi
je 0x4040d8
mov ecx, edi
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4040a0
sub ecx, edx
sar ecx, 1
je 0x4040d8
cmp word [edi], ax
jne 0x4040ba
xor ecx, ecx
jmp 0x4040cf
mov ecx, edi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4040c0
sub ecx, edx
sar ecx, 1
push ecx
push edi
mov ecx, ebx
call fcn.004023a0
mov edx, dword [ebp - 0xb24]
test edx, edx
jne 0x40414f
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push eax
call fcn.00455910
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0x104
push eax
push 0x46b814
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
cmp word [ebp - 0x21c], 0
jne 0x40412d
xor ecx, ecx
push ecx
lea eax, [ebp - 0x21c]
push eax
jmp 0x404171
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404136
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x21c]
push eax
jmp 0x404171
cmp word [edx], 0
jne 0x404159
xor ecx, ecx
jmp 0x40416f
mov ecx, edx
lea edi, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404160
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea edi, [esi + 4]
mov ecx, edi
call fcn.004023a0
mov ecx, esi
call fcn.00403e50
test al, al
je 0x40418f
mov byte [ebp - 0xb1d], 1
jmp 0x4041a1
push str.dism.exe
mov ecx, esi
call fcn.00404620
mov byte [ebp - 0xb1d], al
cmp byte [ebp + 0x10], 0
jne 0x4045fe
mov al, byte [esi + 0x4c]
cmp al, 6
ja 0x4041c2
jne 0x4045fe
cmp byte [esi + 0x4d], 1
jb 0x4045fe
push str.dismapi.dll
mov ecx, esi
call fcn.00404620
test al, al
mov al, byte [ebp - 0xb1d]
je 0x404604
test al, al
je 0x404604
cmp dword [edi + 0x14], 8
jb 0x4041ee
mov eax, dword [edi]
jmp 0x4041f0
mov eax, edi
push eax
lea eax, [ebp - 0x6f4]
push str._sdismapi.dll
push eax
call fcn.00409780
add esp, 0xc
cmp dword [edi + 0x14], 8
jb 0x40420f
mov eax, dword [edi]
jmp 0x404211
mov eax, edi
push eax
lea eax, [ebp - 0xb04]
push 0x46b878
push eax
call fcn.00409780
add esp, 0xc
test byte [esi + 0x64], 1
jne 0x404236
push 1
call dword [sym.imp.KERNEL32.DLL_SetErrorMode]
jmp 0x40423c
mov eax, dword [ebp - 0xb24]
test byte [esi + 0x64], 2
mov dword [ebp - 0xb24], eax
jne 0x404362
push 0x1000
call fcn.00451565
add esp, 4
mov dword [ebp - 0xb28], eax
test eax, eax
je 0x404362
push 0x800
push eax
push str.PATH
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
mov dword [ebp - 0xb2c], eax
cmp eax, 0x1000
jbe 0x4042ca
push dword [ebp - 0xb28]
call fcn.0045152d
mov eax, dword [ebp - 0xb2c]
add esp, 4
add eax, eax
push eax
call fcn.00451565
add esp, 4
mov dword [ebp - 0xb28], eax
test eax, eax
je 0x404359
mov edx, dword [ebp - 0xb2c]
lea ecx, [edx + edx]
shr ecx, 1
push ecx
push eax
push str.PATH
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
xor eax, eax
mov dword [ebp - 0xb08], 7
mov dword [ebp - 0xb0c], 0
mov word [ebp - 0xb1c], ax
mov dword [ebp - 4], eax
lea eax, [ebp - 0xb1c]
cmp eax, edi
je 0x404300
push 0xffffffffffffffff
push 0
push edi
mov ecx, eax
call fcn.004020b0
push 0x46b88c
lea ecx, [ebp - 0xb1c]
call fcn.00408f00
push dword [ebp - 0xb28]
lea ecx, [ebp - 0xb1c]
call fcn.00408f00
cmp dword [ebp - 0xb08], 8
lea eax, [ebp - 0xb1c]
cmovae eax, dword [ebp - 0xb1c]
push eax
push str.PATH
call dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableW]
lea ecx, [ebp - 0xb1c]
mov dword [ebp - 4], 0xffffffff
call fcn.00401f20
mov eax, dword [ebp - 0xb28]
push eax
call fcn.0045152d
add esp, 4
test byte [esi + 0x64], 4
lea eax, [ebp - 0x6f4]
je 0x404377
push eax
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
jmp 0x404382
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_LoadLibraryExW]
test byte [esi + 0x64], 1
mov dword [esi + 0x78], eax
jne 0x404397
push dword [ebp - 0xb24]
call dword [sym.imp.KERNEL32.DLL_SetErrorMode]
mov eax, dword [esi + 0x78]
test eax, eax
jne 0x4043ef
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
lea eax, [ebp - 0x2e4]
push 0x46b890
push eax
call fcn.004097a0
add esp, 0xc
lea eax, [ebp - 0x2e4]
push eax
lea ecx, [ebp - 0xb44]
call fcn.00401ec0
mov dword [ebp - 4], 1
lea eax, [ebp - 0xb44]
push eax
lea ecx, [esi + 0x80]
call fcn.00408fe0
lea ecx, [ebp - 0xb44]
jmp 0x4045f9
mov edi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push str.DismInitialize
push eax
call edi
push str.DismMountImage
mov dword [0x494594], eax
push dword [esi + 0x78]
call edi
push str.DismOpenSession
mov dword [0x494590], eax
push dword [esi + 0x78]
call edi
push str.DismCommitImage
mov dword [0x49458c], eax
push dword [esi + 0x78]
call edi
push str.DismCloseSession
mov dword [0x494588], eax
push dword [esi + 0x78]
call edi
push str.DismUnmountImage
mov dword [0x494584], eax
push dword [esi + 0x78]
call edi
push str.DismShutdown
mov dword [0x494580], eax
push dword [esi + 0x78]
call edi
push str.DismGetMountedImageInfo
mov dword [0x49457c], eax
push dword [esi + 0x78]
call edi
push str.DismCleanupMountpoints
mov dword [0x494578], eax
push dword [esi + 0x78]
call edi
push str.DismAddPackage
mov dword [0x494574], eax
push dword [esi + 0x78]
call edi
push str.DismAddDriver
mov dword [0x494570], eax
push dword [esi + 0x78]
call edi
push str.DismDelete
mov dword [0x49456c], eax
push dword [esi + 0x78]
call edi
mov edi, dword [0x494594]
mov edx, eax
mov al, 1
movzx ecx, al
xor eax, eax
test edi, edi
cmove ecx, eax
cmp dword [0x494590], eax
movzx ecx, cl
cmove ecx, eax
movzx eax, cl
xor ecx, ecx
cmp dword [0x49458c], ecx
mov dword [0x494568], edx
cmove eax, ecx
cmp dword [0x494588], ecx
movzx eax, al
cmove eax, ecx
cmp dword [0x494584], ecx
movzx eax, al
cmove eax, ecx
cmp dword [0x494580], ecx
movzx eax, al
cmove eax, ecx
cmp dword [0x49457c], ecx
movzx eax, al
cmove eax, ecx
cmp dword [0x494578], ecx
movzx eax, al
cmove eax, ecx
cmp dword [0x494574], ecx
movzx eax, al
cmove eax, ecx
cmp dword [0x494570], ecx
movzx eax, al
cmove eax, ecx
cmp dword [0x49456c], ecx
movzx eax, al
cmove eax, ecx
test edx, edx
je 0x4045c1
test al, al
je 0x4045c1
cmp dword [esi + 0x44], ecx
jne 0x40454b
xor ebx, ebx
jmp 0x404553
cmp dword [ebx + 0x14], 8
jb 0x404553
mov ebx, dword [ebx]
push 0
push ebx
push dword [esi + 0x6c]
call edi
mov edi, eax
test edi, edi
jns 0x404597
push dword [esi + 0x78]
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov eax, 0x2e4
cmp di, ax
jne 0x40457b
mov eax, 1
jmp 0x4045a3
push str.Warning:_Unable_to_initialize_DISM_API
lea ecx, [ebp - 0xb44]
call fcn.00401ec0
mov dword [ebp - 4], 2
jmp 0x4043d2
mov byte [esi + 0x60], 1
mov dword [esi], 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.0044fdac
mov esp, ebp
pop ebp
ret 0x14
push dword [esi + 0x78]
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
push str.Warning:_Unable_to_link_to_DISM_API
lea ecx, [ebp - 0xb5c]
call fcn.00401ec0
lea eax, [ebp - 0xb5c]
push eax
lea ecx, [esi + 0x80]
mov dword [ebp - 4], 3
call fcn.00408fe0
lea ecx, [ebp - 0xb5c]
call fcn.00401f20
mov al, byte [ebp - 0xb1d]
cmp dword [esi], 0
jne 0x4045a1
test al, al
je 0x404619
mov dword [esi], 2
mov byte [esi + 0x60], 1
jmp 0x4045a1
mov eax, 8
jmp 0x4045a3