Function at 0x100041b0
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003b67b
mov eax, dword fs:[0]
push eax
sub esp, 0x678
mov eax, dword [0x1004f0a8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x206
mov edi, ecx
xor esi, esi
lea ecx, [ebp - 0x462]
xor eax, eax
push esi
push ecx
mov word [ebp - 0x464], ax
call fcn.1000ae30
push 0x206
lea eax, [ebp - 0x25a]
xor edx, edx
push esi
push eax
mov dword [ebp - 0x670], esi
mov dword [edi + 0x1040], esi
mov word [ebp - 0x25c], dx
call fcn.1000ae30
push reloc.OLEAUT32.dll_SysReAllocString
push esi
push esi
call fcn.10028a50
add esp, 0x24
push 0x1c
lea ecx, [ebp - 0x2c]
push ecx
push 0x11
lea ecx, [ebp - 0x680]
mov dword [ebp - 0x2c], 0xc1fce5e1
mov dword [ebp - 0x28], 0x86fef6c3
mov dword [ebp - 0x24], 0xc3fffef7
mov dword [ebp - 0x20], 0xc3c7cbc2
mov dword [ebp - 0x1c], 0xc8f6f4df
mov dword [ebp - 0x18], 0xc2d2cbc5
mov dword [ebp - 0x14], 0xd5e6fbc1
call fcn.1001b390
mov dword [ebp - 4], esi
call fcn.10024fa0
test eax, eax
je 0x1000435e
call fcn.1001d960
test eax, eax
je 0x1000435e
call fcn.1001f450
test eax, eax
jne 0x1000435e
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpynW]
push 0x104
lea edx, [edi + 0x104c]
push edx
lea eax, [ebp - 0x25c]
push eax
call ebx
lea eax, [ebp - 0x25c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x100042c5
sub eax, edx
sar eax, 1
jne 0x10004328
push 0x104
lea ecx, [ebp - 0x25c]
push ecx
push 0x10
call fcn.10028b20
add esp, 0xc
test eax, eax
jne 0x10004328
push 0x104
lea edx, [ebp - 0x25c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathStripToRootW]
lea ecx, [ebp - 0x680]
call fcn.1001b4a0
push eax
lea ecx, [ebp - 0x25c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0x104
lea edx, [ebp - 0x25c]
push edx
lea esi, [edi + 4]
push esi
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push esi
call fcn.1001c500
add esp, 8
test eax, eax
jne 0x100043ad
mov dword [edi + 0x1040], 0x1002
jmp 0x100044d5
lea esi, [edi + 4]
push 0x104
push esi
call fcn.10028a70
add esp, 8
test eax, eax
jne 0x1000433a
mov dword [edi + 0x1040], 0x1002
lea ecx, [ebp - 0x680]
mov dword [ebp - 4], 0xffffffff
call fcn.1001b3d0
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 - 0x10]
xor ecx, ebp
call fcn.1000ae1e
mov esp, ebp
pop ebp
ret
push esi
call fcn.10023ba0
push esi
push 0x10
call fcn.10028af0
push esi
call fcn.1001c920
push 0x104
lea eax, [ebp - 0x464]
push eax
push 3
call fcn.10023740
add esp, 0x1c
test eax, eax
je 0x100044a5
push 0
push 0x20
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x464]
push ecx
call ebx
cmp eax, 0xffffffff
je 0x100044a5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push reloc.OLEAUT32.dll_SysReAllocString
lea edx, [ebp - 0x464]
push 0
push edx
call fcn.10028a50
push esi
push 0x10
call fcn.10028af0
lea eax, [ebp - 0x464]
push eax
push 3
call fcn.10028af0
lea ecx, [ebp - 0x464]
push ecx
call fcn.1001c920
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x66a]
push eax
mov word [ebp - 0x66c], dx
call fcn.1000ae30
add esp, 0x2c
push 0x104
push esi
lea ecx, [ebp - 0x66c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push str.stdtbh.dat
lea edx, [ebp - 0x66c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0
push 0x20
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x66c]
push eax
call ebx
cmp eax, 0xffffffff
je 0x100044af
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100044af
mov dword [edi + 0x1040], 0x1003
lea ecx, [ebp - 0x464]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x100044cc
mov dword [edi + 0x1040], 0x1003
jmp 0x100044d5
cmp dword [edi + 0x1040], 0
je 0x1000454a
mov eax, dword [ebp - 0x670]
cmp eax, 1
jae 0x1000437d
push eax
push esi
mov ecx, edi
call fcn.10002c10
xor eax, eax
push 0x104
mov dword [edi + 0x1040], eax
mov dword [ebp - 0x52], eax
mov dword [ebp - 0x4e], eax
mov dword [ebp - 0x4a], eax
mov dword [ebp - 0x46], eax
mov dword [ebp - 0x42], eax
mov dword [ebp - 0x3e], eax
mov dword [ebp - 0x3a], eax
mov dword [ebp - 0x36], eax
mov dword [ebp - 0x32], eax
mov word [ebp - 0x2e], ax
mov eax, dword [ebp - 0x670]
push 0xa
lea ecx, [ebp - 0x54]
inc eax
push ecx
xor edx, edx
push eax
mov word [ebp - 0x54], dx
mov dword [ebp - 0x670], eax
call fcn.1000c64c
add esp, 0xc
push eax
push esi
call fcn.1001e290
add esp, 0xc
jmp 0x10004340
lea ecx, [ebp - 0x680]
mov dword [ebp - 4], 0xffffffff
call fcn.1001b3d0
mov eax, 1
jmp 0x10004391