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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x50e877
mov eax, dword fs:[0]
push eax
sub esp, 0x568
mov eax, dword [0x551aa8]
xor eax, esp
mov dword [esp + 0x560], eax
push ebx
push esi
push edi
mov eax, dword [0x551aa8]
xor eax, esp
push eax
lea eax, [esp + 0x578]
mov dword fs:[0], eax
xor ebx, ebx
push 0xff
lea eax, [esp + 0x61]
mov edi, ecx
push ebx
push eax
mov dword [esp + 0x24], edi
mov esi, edx
mov dword [esp + 0x20], ebx
mov byte [esp + 0x68], bl
call sub.MSVCR100.dll_memset
push 0x206
lea edx, [esp + 0x16e]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x174], cx
call sub.MSVCR100.dll_memset
push 0x206
lea ecx, [esp + 0x382]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x388], ax
call sub.MSVCR100.dll_memset
add esp, 0x24
push ebx
push 5
lea edx, [esp + 0x36c]
push edx
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [esp + 0x364]
push eax
push 0x54379c
lea edx, [esp + 0x164]
call fcn.0040a7b0
mov esi, dword [sym.imp.MSVCR100.dll__wmkdir]
lea ecx, [esp + 0x164]
push ecx
call esi
lea edx, [esp + 0x370]
push edx
push str._sDragonNestConfig
lea edx, [esp + 0x170]
call fcn.0040a7b0
lea eax, [esp + 0x170]
push eax
call esi
push str.Config.ini
lea ecx, [esp + 0x380]
push ecx
push str._sDragonNestConfig_s
lea edx, [esp + 0x180]
call fcn.0040a7b0
add esp, 0x24
lea edx, [esp + 0x15c]
push edx
lea ecx, [esp + 0x20]
call dword [0x511858]
mov dword [esp + 0x580], ebx
mov eax, dword [esp + 0x1c]
push 0x5438c4
push eax
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.MSVCR100.dll__wfopen_s]
add esp, 0xc
test eax, eax
je 0x409f34
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
xor eax, eax
jmp 0x40a0e4
mov ecx, dword [edi + 0x6c]
lea eax, [edi + 0x68]
mov dword [esp + 0x20], eax
mov eax, dword [eax]
cmp eax, ecx
je 0x409f6e
mov edx, dword [esp + 0x18]
push edx
mov ebx, ecx
call fcn.0040a8f0
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x24]
mov esi, eax
mov eax, dword [ebx + 4]
push ecx
push eax
mov eax, esi
call fcn.0040a930
add esp, 0xc
mov dword [ebx + 4], esi
xor ebx, ebx
mov edx, dword [esp + 0x14]
push ebx
push ebx
push edx
call dword [sym.imp.MSVCR100.dll_fseek]
mov ecx, dword [esp + 0x20]
push 0x100
lea eax, [esp + 0x6c]
push eax
push 0x5438cc
push ecx
call dword [sym.imp.MSVCR100.dll_fscanf_s]
add esp, 0x1c
cmp eax, 1
jne 0x40a0b3
mov edx, dword [esp + 0x14]
push edx
lea esi, [esp + 0x60]
mov ecx, edi
call fcn.0040a160
test eax, eax
jne 0x40a08d
mov eax, 0xf
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], bl
mov eax, esi
mov byte [esp + 0x580], 1
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x409fe3
sub eax, edx
push eax
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x2c]
call fcn.0040aa50
mov edx, dword [esp + 0x14]
push 0x100
lea ecx, [esp + 0x60]
push ecx
push 0x5438cc
push edx
call dword [sym.imp.MSVCR100.dll_fscanf_s]
lea eax, [esp + 0x6c]
add esp, 0x10
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40a020
sub eax, edx
push eax
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x48]
call fcn.0040aa50
mov edi, dword [esp + 0x20]
lea eax, [esp + 0x24]
call fcn.0040a550
mov esi, 0x10
mov byte [esp + 0x580], bl
cmp dword [esp + 0x54], esi
jb 0x40a065
mov ecx, dword [esp + 0x40]
push ecx
call dword [sym.imp.mfc100u.dll_delete]
add esp, 4
mov dword [esp + 0x54], 0xf
mov dword [esp + 0x50], ebx
mov byte [esp + 0x40], bl
cmp dword [esp + 0x38], esi
jb 0x40a089
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.mfc100u.dll_delete]
add esp, 4
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push 0x100
lea eax, [esp + 0x60]
push eax
push 0x5438cc
push ecx
call dword [sym.imp.MSVCR100.dll_fscanf_s]
add esp, 0x10
cmp eax, 1
je 0x409fa1
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.MSVCR100.dll_fclose]
mov eax, 0x400
add esp, 4
cmp dword [edi + 4], eax
jge 0x40a0d5
mov dword [edi + 4], eax
mov dword [edi + 8], 0x300
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov eax, 1
mov ecx, dword [esp + 0x578]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x560]
xor ecx, esp
call fcn.0050bf32
mov esp, ebp
pop ebp
ret