Function at 0x403d90
Capabilities:
Create directory
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4355db
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2dc
mov eax, dword [0x44be60]
push 0
mov dword [esp + 0x2dc], eax
push 5
lea eax, [esp + 0x1dc]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
jne 0x403dd6
xor al, al
jmp 0x4041ea
push edi
lea edi, [esp + 0x1d8]
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403de0
push esi
mov ecx, 6
mov esi, str.KOEIShin_Sangokumusou_3_
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
xor eax, eax
lea ebx, [ebx]
mov cl, byte [esp + eax + 0x1dc]
mov byte [esp + eax + 0xd8], cl
inc eax
test cl, cl
jne 0x403e00
push ebx
mov ebx, dword [esp + 0x2f8]
push ebp
xor ebp, ebp
mov eax, ebx
sub eax, ebp
je 0x403e9e
dec eax
je 0x403e63
dec eax
je 0x403e37
mov byte [esp + 0xe0], 0
jmp 0x403ed7
lea edi, [esp + 0xe0]
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403e40
mov ecx, dword [str.inputmap.m1]
mov edx, dword [0x4376a8]
mov eax, dword [0x4376ac]
mov dword [edi], ecx
mov dword [edi + 4], edx
mov dword [edi + 8], eax
jmp 0x403ed2
lea edi, [esp + 0xe0]
dec edi
jmp 0x403e70
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403e70
mov ecx, dword [str.inputmap.2]
mov edx, dword [0x43769c]
mov ax, word [0x4376a0]
mov dword [edi], ecx
mov cl, byte [0x4376a2]
mov dword [edi + 4], edx
mov word [edi + 8], ax
mov byte [edi + 0xa], cl
jmp 0x403ed2
lea edi, [esp + 0xe0]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403ea6
mov edx, dword [str.inputmap.1]
mov eax, dword [0x437690]
mov cx, word [0x437694]
mov dword [edi], edx
mov dl, byte [0x437696]
mov dword [edi + 4], eax
mov word [edi + 8], cx
mov byte [edi + 0xa], dl
mov ebp, 0x10
push 1
lea ecx, [esp + 0x20]
call fcn.00403910
push 0x1b6
push 0x21
lea eax, [esp + 0xe8]
push eax
lea ecx, [esp + 0x34]
mov dword [esp + 0x300], 0
call fcn.00402dd0
test eax, eax
jne 0x403f2e
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + 4]
mov eax, dword [esp + ecx + 0x24]
mov edx, dword [esp + ecx + 0x44]
lea ecx, [esp + ecx + 0x1c]
or eax, 2
test edx, edx
jne 0x403f26
or eax, 4
push 0
push eax
call fcn.004266b9
mov eax, dword [esp + 0x80]
test eax, eax
jne 0x403f9b
push 0
lea edx, [esp + 0x1e8]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExA]
push 0x1b6
push 0x32
lea eax, [esp + 0xe8]
push eax
lea ecx, [esp + 0x34]
call fcn.00402dd0
test eax, eax
jne 0x403f8c
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + 4]
mov eax, dword [esp + ecx + 0x24]
mov edx, dword [esp + ecx + 0x44]
lea ecx, [esp + ecx + 0x1c]
or eax, 2
test edx, edx
jne 0x403f84
or eax, 4
push 0
push eax
call fcn.004266b9
mov eax, dword [esp + 0x80]
test eax, eax
je 0x404086
push 2
push 0
lea ecx, [esp + 0x24]
call fcn.00401a00
lea edx, [esp + 0xb8]
push edx
lea ecx, [esp + 0x20]
call fcn.00401a70
mov ecx, dword [eax]
mov esi, dword [eax + 8]
push 0
add esi, ecx
push 0
lea ecx, [esp + 0x24]
call fcn.00401a00
mov eax, ebp
imul eax, eax, 0x2c
add eax, 0xc
cmp esi, eax
jne 0x404086
push 4
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x24]
mov dword [esp + 0x1c], 0
call fcn.00402be0
mov ecx, ebx
shl ecx, 4
lea edi, [ecx + 0x44ceb4]
mov ecx, dword [esp + 0x10]
test ecx, ecx
setne dl
mov ecx, edi
push edx
call fcn.00407020
push 4
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x24]
call fcn.00402be0
mov ecx, edi
call fcn.00407010
test al, al
je 0x40406e
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00408ab0
add esp, 4
test eax, eax
je 0x40405c
mov edx, dword [esp + 0x10]
push edx
call fcn.00408ab0
add esp, 4
mov ecx, eax
call fcn.0040afe0
test al, al
je 0x40405c
mov eax, dword [esp + 0x10]
push eax
jmp 0x404067
push 0
mov ecx, edi
call fcn.00407020
push 0xa
mov ecx, edi
call fcn.00407030
push 4
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x24]
call fcn.00402be0
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x4040c4
push ebx
call fcn.004019c0
add esp, 4
lea ecx, [esp + 0x84]
mov dword [esp + 0x2f4], 0xffffffff
call fcn.004039d0
lea ecx, [esp + 0x84]
mov dword [esp + 0x84], 0x4375a0
call fcn.004265cf
xor al, al
jmp 0x4041e6
push eax
mov ecx, edi
call fcn.00407180
mov eax, dword [esp + 0x14]
xor ebp, ebp
test eax, eax
jbe 0x404184
lea ebx, [ebx]
lea ecx, [esp + 0xb8]
call fcn.00407040
push 4
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x24]
call fcn.00402be0
push 0x28
lea eax, [esp + 0xbc]
push eax
lea ecx, [esp + 0x24]
call fcn.00402be0
xor esi, esi
push esi
lea ecx, [esp + 0xbc]
call fcn.004070c0
test eax, eax
jl 0x40415d
push esi
lea ecx, [esp + 0xbc]
call fcn.004070c0
cmp eax, 7
jg 0x40415d
push esi
lea ecx, [esp + 0xbc]
call fcn.004070c0
push eax
call fcn.00408ab0
add esp, 4
test eax, eax
jne 0x40415d
push esi
push 0xa
lea ecx, [esp + 0xc0]
call fcn.00407100
inc esi
cmp esi, 2
jb 0x404111
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0xb8]
push ecx
push edx
mov ecx, edi
call fcn.00406fd0
mov eax, dword [esp + 0x14]
inc ebp
cmp ebp, eax
jb 0x4040e0
lea ecx, [esp + 0x28]
call fcn.004037c0
test eax, eax
jne 0x4041b6
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 4]
mov eax, dword [esp + ecx + 0x24]
mov edx, dword [esp + ecx + 0x44]
lea ecx, [esp + ecx + 0x1c]
or eax, 2
test edx, edx
jne 0x4041ae
or eax, 4
push 0
push eax
call fcn.004266b9
lea ecx, [esp + 0x84]
mov dword [esp + 0x2f4], 0xffffffff
call fcn.004039d0
lea ecx, [esp + 0x84]
mov dword [esp + 0x84], 0x4375a0
call fcn.004265cf
mov al, 1
pop ebp
pop ebx
pop esi
pop edi
mov ecx, dword [esp + 0x2dc]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x2d8]
call fcn.00418291
add esp, 0x2e8
ret