Function at 0x403a80
Capabilities:
Get common file path
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x4355bb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1b0
mov eax, dword [0x44be60]
push 0
mov dword [esp + 0x1b0], eax
push 5
lea eax, [esp + 0xb0]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
jne 0x403ac6
xor al, al
jmp 0x403d3e
push esi
push edi
lea edi, [esp + 0xb0]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403ad0
mov ecx, 6
mov esi, str.KOEIShin_Sangokumusou_3_
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x1c8]
movsw word es:[edi], word [esi]
mov eax, ecx
sub eax, 0
movsb byte es:[edi], byte [esi]
mov dword [esp + 8], 0
je 0x403b66
dec eax
je 0x403b33
dec eax
jne 0x403ba3
lea edi, [esp + 0xb0]
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403b10
mov edx, dword [str.inputmap.m1]
mov eax, dword [0x4376a8]
mov dword [edi], edx
mov edx, dword [0x4376ac]
mov dword [edi + 4], eax
mov dword [edi + 8], edx
jmp 0x403b9b
lea edi, [esp + 0xb0]
dec edi
jmp 0x403b40
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403b40
mov eax, dword [str.inputmap.2]
mov edx, dword [0x43769c]
mov dword [edi], eax
mov ax, word [0x4376a0]
mov dword [edi + 4], edx
mov dl, byte [0x4376a2]
jmp 0x403b94
lea edi, [esp + 0xb0]
dec edi
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403b70
mov eax, dword [str.inputmap.1]
mov edx, dword [0x437690]
mov dword [edi], eax
mov ax, word [0x437694]
mov dword [edi + 4], edx
mov dl, byte [0x437696]
mov word [edi + 8], ax
mov byte [edi + 0xa], dl
mov dword [esp + 8], 0x10
shl ecx, 4
lea esi, [ecx + 0x44ceb4]
mov ecx, esi
call fcn.00406fc0
cmp eax, dword [esp + 8]
jne 0x403c41
push 1
lea ecx, [esp + 0x18]
call fcn.00403910
push 0x1b6
push 0x32
lea eax, [esp + 0xb8]
push eax
lea ecx, [esp + 0x2c]
mov dword [esp + 0x1cc], 0
call fcn.00402dd0
test eax, eax
jne 0x403c14
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx + 4]
mov eax, dword [esp + ecx + 0x1c]
mov edx, dword [esp + ecx + 0x3c]
lea ecx, [esp + ecx + 0x14]
or eax, 2
test edx, edx
jne 0x403c0c
or eax, 4
push 0
push eax
call fcn.004266b9
mov eax, dword [esp + 0x78]
test eax, eax
jne 0x403c48
lea ecx, [esp + 0x7c]
mov dword [esp + 0x1c0], 0xffffffff
call fcn.004039d0
lea ecx, [esp + 0x7c]
mov dword [esp + 0x7c], 0x4375a0
call fcn.004265cf
xor al, al
jmp 0x403d3c
mov ecx, esi
call fcn.00407010
movzx edx, al
push 4
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x24]
mov dword [esp + 0x18], edx
call fcn.00402af0
mov ecx, esi
call fcn.00407000
push 4
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x24]
mov dword [esp + 0x18], eax
call fcn.00402af0
push 4
lea edx, [esp + 0xc]
push edx
lea ecx, [esp + 0x24]
call fcn.00402af0
mov eax, dword [esp + 8]
test eax, eax
mov dword [esp + 0xc], 0
jbe 0x403cda
push 4
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x24]
call fcn.00402af0
mov ecx, dword [esp + 0xc]
push ecx
mov ecx, esi
call fcn.00406ff0
push 0x28
push eax
lea ecx, [esp + 0x24]
call fcn.00402af0
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
inc eax
cmp eax, ecx
mov dword [esp + 0xc], eax
jb 0x403ca1
lea ecx, [esp + 0x1c]
call fcn.00402060
lea ecx, [esp + 0x20]
call fcn.004037c0
test eax, eax
jne 0x403d15
mov edx, dword [esp + 0x14]
mov ecx, dword [edx + 4]
mov eax, dword [esp + ecx + 0x1c]
mov edx, dword [esp + ecx + 0x3c]
lea ecx, [esp + ecx + 0x14]
or eax, 2
test edx, edx
jne 0x403d0d
or eax, 4
push 0
push eax
call fcn.004266b9
lea ecx, [esp + 0x7c]
mov dword [esp + 0x1c0], 0xffffffff
call fcn.004039d0
lea ecx, [esp + 0x7c]
mov dword [esp + 0x7c], 0x4375a0
call fcn.004265cf
mov al, 1
pop edi
pop esi
mov ecx, dword [esp + 0x1b0]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x1ac]
call fcn.00418291
add esp, 0x1bc
ret