Function at 0x40a3da
Capabilities:
Set current directory

Disassembly:
mov eax, 0x41139f
call fcn.00408d00
sub esp, 0xe50
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x14], esi
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
lea ecx, [esi + 0x7d4]
call fcn.0040b878
mov eax, dword [esi + 0x7c0]
lea ecx, [esi + 0x7c4]
push ecx
xor ebx, ebx
push ebx
push dword [ebp + 8]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineW]
test eax, eax
je 0x40a6f9
mov word [ebp - 0x21c], bx
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x21a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 0x220], ebx
mov ecx, dword [esi + 0x7c0]
lea eax, [ebp - 0x220]
push eax
mov ebx, 0x104
push ebx
lea eax, [ebp - 0x21c]
push eax
push 0
lea eax, [esi + 0x7c4]
push eax
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupGetTargetPathW]
test eax, eax
jne 0x40a494
push dword [ebp + 8]
push 0x4027b8
push 0x40277c
push dword [esi]
call fcn.00408f6d
add esp, 0x10
jmp 0x40a6f9
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x428]
call fcn.00409fc1
and dword [ebp - 4], 0
and word [ebp - 0x630], 0
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x62e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
push ebx
lea eax, [ebp - 0x630]
push eax
push 1
lea eax, [esi + 0x7c4]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
test eax, eax
je 0x40a6c5
and word [ebp - 0x838], 0
mov edx, 0x81
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x836]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
and word [ebp - 0xa40], 0
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0xa3e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
and word [ebp - 0xc48], 0
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0xc46]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
and dword [ebp - 0xc4c], 0
and dword [ebp - 0xc50], 0
push ebx
lea eax, [esi + 0x3a0]
push eax
lea eax, [ebp - 0x838]
push eax
mov edi, dword [sym.imp.MSVCRT.dll_wcsncpy]
call edi
add esp, 0xc
push 0
push ebx
lea eax, [ebp - 0xa40]
push eax
push 2
lea eax, [esi + 0x7c4]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
test eax, eax
je 0x40a57a
cmp word [ebp - 0xa40], 0
jne 0x40a58e
push ebx
lea eax, [ebp - 0x630]
push eax
lea eax, [ebp - 0xa40]
push eax
call edi
add esp, 0xc
mov eax, dword [esi + 0x7c0]
lea ecx, [ebp - 0xc4c]
push ecx
push ebx
lea ecx, [ebp - 0xc48]
push ecx
lea ecx, [ebp - 0xc50]
push ecx
lea ecx, [ebp - 0x630]
push ecx
lea ecx, [esi + 0x7c4]
push ecx
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetSourceFileLocationW]
test eax, eax
je 0x40a5d9
lea eax, [ebp - 0xc48]
push eax
lea eax, [ebp - 0x838]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
jmp 0x40a5f4
lea eax, [ebp - 0xa40]
push eax
push 0x402728
push 0x40277c
push dword [esi]
call fcn.00408f6d
add esp, 0x10
cmp dword [ebp + 0x1c], 0
je 0x40a63b
cmp dword [esi + 4], 0
je 0x40a63b
push ebx
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0xe58]
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x630]
push eax
lea eax, [ebp - 0xe58]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov ecx, dword [esi + 4]
mov eax, dword [ecx]
push dword [ebp + 0x10]
lea edx, [ebp - 0xe58]
push edx
push 0x64
call dword [eax]
mov byte [ebp - 4], 1
push dword [ebp + 0x14]
push dword [ebp + 0xc]
lea eax, [ebp - 0x630]
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0xa40]
push eax
lea eax, [ebp - 0x838]
push eax
mov ecx, esi
call dword [ebp + 0x18]
jmp 0x40a6c5
and dword [ebp - 4], 0
lea eax, [esi + 0x7c4]
push eax
push eax
call dword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
test eax, eax
je 0x40a6e8
cmp dword [esi + 0x7bc], 0
je 0x40a4aa
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 0x18