Function at 0x403d10
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x494506
mov eax, dword fs:[0]
push eax
sub esp, 0x560
mov eax, dword [0x4bd750]
xor eax, esp
mov dword [esp + 0x558], eax
push ebx
push esi
push edi
mov eax, dword [0x4bd750]
xor eax, esp
push eax
lea eax, [esp + 0x570]
mov dword fs:[0], eax
xor ebx, ebx
push 0xff
lea eax, [esp + 0x59]
mov edi, ecx
push ebx
push eax
mov dword [esp + 0x24], edi
mov esi, edx
mov dword [esp + 0x1c], ebx
mov byte [esp + 0x60], bl
call fcn.00475860
add esp, 0xc
push 0x206
lea ecx, [esp + 0x15a]
push ebx
push ecx
mov word [esp + 0x160], bx
call fcn.00475860
add esp, 0xc
push 0x206
lea edx, [esp + 0x362]
push ebx
push edx
mov word [esp + 0x368], bx
call fcn.00475860
add esp, 0xc
push ebx
push 5
lea eax, [esp + 0x364]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [esp + 0x35c]
push ecx
push str._sDragonNest
lea edx, [esp + 0x15c]
call fcn.00404860
lea edx, [esp + 0x15c]
push edx
call fcn.00472d26
add esp, 0xc
lea eax, [esp + 0x35c]
push eax
push str._sDragonNestConfig
lea edx, [esp + 0x15c]
call fcn.00404860
lea ecx, [esp + 0x15c]
push ecx
call fcn.00472d26
add esp, 0xc
push str.Config.ini
lea edx, [esp + 0x360]
push edx
push str._sDragonNestConfig_s
lea edx, [esp + 0x160]
call fcn.00404860
add esp, 0xc
lea eax, [esp + 0x154]
push eax
lea ecx, [esp + 0x18]
call fcn.00404c60
mov dword [esp + 0x578], ebx
mov ecx, dword [esp + 0x14]
push 0x4aaf38
push ecx
lea edx, [esp + 0x18]
push edx
call fcn.0047281b
add esp, 0xc
test eax, eax
je 0x403e9b
mov dword [esp + 0x578], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403e94
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40403e
lea esi, [edi + 0x20]
mov ebx, esi
call fcn.00404300
mov ecx, dword [esp + 0x10]
xor ebx, ebx
push ebx
push ebx
push ecx
call fcn.004728f2
mov eax, dword [esp + 0x1c]
add esp, 0xc
push 0x100
lea edx, [esp + 0x58]
push edx
push 0x4aaf40
push eax
call fcn.00472d09
add esp, 0x10
cmp eax, 1
jne 0x403fed
lea edi, [ebx + 0xf]
mov edi, edi
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x54]
call fcn.004040c0
test eax, eax
jne 0x403fc4
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], ebx
mov byte [esp + 0x20], bl
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
lea eax, [esp + 0x54]
mov byte [esp + 0x578], 1
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x403f20
sub eax, edx
push eax
lea ecx, [esp + 0x58]
push ecx
lea ecx, [esp + 0x24]
call fcn.00403870
mov eax, dword [esp + 0x10]
push 0x100
lea edx, [esp + 0x58]
push edx
push 0x4aaf40
push eax
call fcn.00472d09
lea eax, [esp + 0x64]
add esp, 0x10
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x403f60
sub eax, edx
push eax
lea ecx, [esp + 0x58]
push ecx
lea ecx, [esp + 0x40]
call fcn.00403870
lea edx, [esp + 0x1c]
push edx
call fcn.00404250
cmp dword [esp + 0x50], 0x10
jb 0x403f98
mov eax, dword [esp + 0x3c]
push eax
call fcn.0044e528
add esp, 4
cmp dword [esp + 0x34], 0x10
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
jb 0x403fb8
mov ecx, dword [esp + 0x20]
push ecx
call fcn.0044e528
add esp, 4
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], ebx
mov byte [esp + 0x20], bl
mov eax, dword [esp + 0x10]
push 0x100
lea edx, [esp + 0x58]
push edx
push 0x4aaf40
push eax
call fcn.00472d09
add esp, 0x10
cmp eax, 1
je 0x403ee0
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00472b50
mov eax, 0x400
add esp, 4
cmp dword [edi + 4], eax
jge 0x40400e
mov dword [edi + 4], eax
mov dword [edi + 8], 0x300
mov dword [esp + 0x578], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404039
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x570]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x558]
xor ecx, esp
call fcn.004716ba
mov esp, ebp
pop ebp
ret