Function at 0x40a2d7
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
mov eax, dword [0x43674c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push ebx
push 1
push ebx
mov dword [ebp - 0x430], eax
call dword [sym.imp.KERNEL32.dll_HeapSetInformation]
mov edi, dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
push 0x4257c8
call edi
xor eax, eax
push 0x206
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push ebx
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [ebp - 0x428]
push eax
push 0x1a
push ebx
mov dword [ebp - 0x428], ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
js 0x40a378
cmp dword [ebp - 0x428], ebx
je 0x40a38c
push 0x208
lea eax, [ebp - 0x21c]
push ebx
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
push dword [ebp - 0x428]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
cmp dword [ebp - 0x428], ebx
je 0x40a38c
push dword [ebp - 0x428]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0x425710
lea eax, [ebp - 0x21c]
push eax
call esi
lea eax, [ebp - 0x21c]
push eax
call fcn.0040760c
lea eax, [ebp - 0x21c]
mov dword [esp], str.Bugreport.log
push eax
call esi
lea eax, [ebp - 0x21c]
push eax
push 0x104
push 0x436790
call dword [sym.imp.MSVCR100.dll_wcscpy_s]
add esp, 0xc
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_HeapSetInformation]
push 0x4257c8
call edi
mov esi, dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea eax, [ebp - 0x42c]
push eax
push 5
lea eax, [ebp - 0xc]
push eax
push esi
mov dword [ebp - 0x42c], ebx
mov dword [ebp - 0xc], 0x4c2c033
mov byte [ebp - 8], bl
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push ebx
call esi
push str.AddVectoredExceptionHandler
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
cmp esi, ebx
je 0x40a462
lea eax, [ebp - 0x42c]
push eax
push 5
lea eax, [ebp - 0x14]
push eax
push esi
mov dword [ebp - 0x14], 0x8c2c033
mov byte [ebp - 0x10], bl
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push ebx
push ebx
call esi
push 0x4257c8
call edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call dword [sym.imp.MSVCR100.dll_srand]
xor eax, eax
mov word [ebp - 0x424], ax
mov dword [esp], 0x206
lea eax, [ebp - 0x422]
push ebx
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
push 0x104
lea eax, [ebp - 0x424]
push eax
push dword [ebp - 0x430]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x424]
push 0x5c
push eax
call dword [sym.imp.MSVCR100.dll_wcsrchr]
pop ecx
pop ecx
cmp eax, ebx
je 0x40a4d5
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [ebp - 0x438]
push eax
mov dword [ebp - 0x438], 8
mov dword [ebp - 0x434], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push ebx
call dword [sym.imp.ole32.dll_OleInitialize]
xor ecx, ecx
test eax, eax
setns cl
mov esi, ecx
call fcn.00409ef2
mov edi, eax
cmp esi, ebx
je 0x40a517
call dword [sym.imp.ole32.dll_OleUninitialize]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00421350
leave
ret 0x10