Function at 0x402be0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44c
mov eax, dword [0x42e0b0]
xor eax, esp
mov dword [esp + 0x448], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [0x4302e0], eax
push 0x104
lea eax, [esp + 0x44]
push eax
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x40]
push 0x5c
push ecx
call fcn.0040b412
add esp, 8
cmp eax, esi
je 0x402c30
xor edx, edx
mov word [eax], dx
lea eax, [esp + 0x40]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x402c37
sub eax, edx
lea ecx, [esp + 0x40]
sar eax, 1
push ecx
push 0x4365b0
mov ebx, eax
call fcn.00408270
call fcn.00402190
mov edx, dword [0x4365e4]
push edx
lea edi, [esp + 0x18]
mov dword [esp + 0x18], vtable.CSharingMemory_struct_XGCrashContext_.0
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
call fcn.004030e0
test eax, eax
je 0x402cbd
mov edi, dword [esp + 0x1c]
push 0x6278
push edi
push 0x4302e4
call fcn.0040e650
add esp, 0xc
cmp edi, esi
je 0x402caa
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [esp + 0x1c], esi
mov eax, dword [esp + 0x18]
cmp eax, esi
je 0x402cbd
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], esi
call fcn.00402390
cmp dword [0x4365d4], esi
je 0x402cd2
push 0xffffffffffffffff
call dword [sym.imp.IMM32.dll_ImmDisableIME]
lea eax, [esp + 0x248]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x248]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x402cf0
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x246], 0x5c
lea eax, [esp + eax*2 + 0x246]
jne 0x402d16
xor ecx, ecx
mov word [eax], cx
push 0x43645c
lea edx, [esp + 0x24c]
push edx
push str._sxiguacrash_s
mov edi, 0x4365c8
call fcn.004043d0
mov eax, dword [0x4365c8]
add esp, 0xc
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
mov ecx, 0x4302e4
call fcn.004024a0
mov ecx, dword [0x4365cc]
push 0x4364dc
push 0x43645c
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x1c], ecx
call fcn.004018e0
mov eax, dword [0x4365d8]
cmp eax, esi
jbe 0x402db6
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
sub edx, ecx
dec eax
sar edx, 3
cmp eax, edx
jae 0x402db6
mov ebx, dword [ecx + eax*8]
mov esi, dword [ecx + eax*8 + 4]
push 0
call fcn.0040b9e3
mov edi, dword [0x4365dc]
xor ecx, ecx
add esp, 4
add edi, ebx
adc ecx, esi
cmp ecx, edx
jl 0x402db4
jg 0x402dac
cmp edi, eax
jbe 0x402db4
mov dword [esp + 0x10], 0
xor esi, esi
push esi
call fcn.0040b9e3
add esp, 4
lea edi, [esp + 0x38]
lea esi, [esp + 0x28]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
call fcn.00404d90
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
lea eax, [ecx - 8]
cmp edx, eax
je 0x402df1
cmp eax, ecx
je 0x402df1
push ecx
push edx
call fcn.00404ef0
add esp, 8
lea ebx, [esp + 0x24]
call fcn.00401c90
call fcn.004051e0
xor edi, edi
cmp dword [esp + 0x10], edi
je 0x402e0e
mov edx, str.silent
jmp 0x402e25
push edi
push 0x42b1b8
push 0x42b1c4
push edi
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edx, str.msgbox
mov ecx, 0x4302e4
call fcn.00402940
call fcn.00405060
mov esi, dword [0x4302d8]
cmp esi, edi
je 0x402e6e
mov eax, dword [esi]
cmp eax, edi
je 0x402e4f
push eax
call fcn.0040cdb8
add esp, 4
mov dword [esi], edi
mov eax, dword [esi + 4]
cmp eax, edi
je 0x402e62
push eax
call fcn.0040cdb8
add esp, 4
mov dword [esi + 4], edi
push esi
mov dword [esi + 8], edi
call fcn.0040b2be
add esp, 4
call fcn.004050e0
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0x402e84
push eax
call fcn.0040b2be
add esp, 4
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402eb0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
cmp eax, edi
je 0x402ebf
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x402ece
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x454]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0040b2c9
mov esp, ebp
pop ebp
ret 0x10