Function at 0x401da0
Capabilities:
Check if file exists
Create directory
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41f1aa
mov eax, dword fs:[0]
push eax
sub esp, 0x650
mov eax, dword [0x42e014]
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
mov edi, edx
mov dword [ebp - 0x648], edi
mov dword [ebp - 0x64c], ecx
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov ebx, dword [sym.imp.SHELL32.dll_SHCreateDirectoryExA]
test eax, eax
jne 0x401df7
push 0
push esi
push 0
call ebx
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401e00
sub ecx, edx
cmp byte [esi + ecx - 1], 0x5c
jne 0x401e22
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401e15
sub ecx, edx
mov byte [esi + ecx - 1], al
push edi
push esi
lea eax, [ebp - 0x114]
push str._sTowMiniMap_s_geometry
push eax
call fcn.00401090
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
lea eax, [ebp - 0x114]
add esp, 0x10
push eax
call edi
test eax, eax
jne 0x401e57
push eax
lea eax, [ebp - 0x114]
push eax
push 0
call ebx
push esi
lea eax, [ebp - 0x114]
push str._s_art_textures
push eax
call fcn.00401090
add esp, 0xc
lea eax, [ebp - 0x114]
push eax
call edi
test eax, eax
jne 0x401e85
push eax
lea eax, [ebp - 0x114]
push eax
push 0
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x5c
call fcn.00404ba2
mov ebx, eax
add esp, 4
mov dword [ebp - 0x62c], ebx
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x24], 0
mov dword [ebx + 0x28], 0
mov dword [ebx + 0x3c], 0
mov dword [ebx + 0x40], 0
mov dword [ebx + 0x44], 0
mov dword [ebx + 0x4c], 0
mov dword [ebx + 0x50], 0
mov dword [ebx + 0x54], 0
mov dword [ebx], 9
mov dword [ebx + 4], 0x9876543
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x2c], 0x400
mov dword [ebx + 0x30], 0x300
mov dword [ebx + 0x34], 0x21
mov dword [ebx + 0x38], 0
mov dword [ebx + 0x48], 0
mov dword [ebx + 0x58], 0
mov eax, dword [ebx + 0x24]
cmp eax, dword [ebx + 0x28]
je 0x401f40
mov dword [eax], ebx
add dword [ebx + 0x24], 4
jmp 0x401f50
lea ecx, [ebp - 0x62c]
push ecx
push eax
lea ecx, [ebx + 0x20]
call fcn.00403d20
mov edi, dword [ebp - 0x648]
lea eax, [ebp - 0x218]
push edi
push str.TowMiniMap_s.dat
push eax
mov dword [ebx + 0x1c], 1
mov dword [ebx + 8], 0
call fcn.00401090
push edi
lea eax, [ebp - 0x628]
push str.TowMiniMap_s.apt
push eax
call fcn.00401090
push edi
lea eax, [ebp - 0x420]
push str.TowMiniMap_s.const
push eax
call fcn.00401090
push edi
lea eax, [ebp - 0x31c]
push str.TowMiniMap_s.xml
push eax
call fcn.00401090
lea eax, [ebp - 0x218]
push 0x42b1b8
push eax
call fcn.00408c4a
add esp, 0x38
mov dword [ebp - 0x650], eax
test eax, eax
je 0x40288b
lea eax, [ebp - 0x31c]
push 0x42b1b8
push eax
call fcn.00408c4a
add esp, 8
mov dword [ebp - 0x640], eax
test eax, eax
je 0x40288b
push 0x14
call fcn.00404ba2
mov ecx, dword [ebp - 0x64c]
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
lea esi, [eax + 8]
mov dword [ebp - 0x63c], eax
mov dword [esi + 8], 0
lea ecx, [ecx*8 + 0x14]
push 8
mov dword [eax], ecx
mov dword [eax + 4], 6
call fcn.00404ba2
add esp, 8
mov dword [ebp - 0x62c], eax
mov dword [eax], 1
mov dword [eax + 4], str.vInitialized
mov ecx, dword [esi + 4]
cmp ecx, dword [esi + 8]
je 0x402058
mov dword [ecx], eax
add dword [esi + 4], 4
jmp 0x402067
lea eax, [ebp - 0x62c]
push eax
push ecx
mov ecx, esi
call fcn.00403d20
push 8
call fcn.00404ba2
add esp, 4
mov dword [ebp - 0x62c], eax
mov dword [eax], 1
mov dword [eax + 4], str._root
mov ecx, dword [esi + 4]
cmp ecx, dword [esi + 8]
je 0x402094
mov dword [ecx], eax
add dword [esi + 4], 4
jmp 0x4020a3
lea eax, [ebp - 0x62c]
push eax
push ecx
mov ecx, esi
call fcn.00403d20
push 8
call fcn.00404ba2
add esp, 4
mov dword [ebp - 0x62c], eax
mov dword [eax], 1
mov dword [eax + 4], str.Campaign
mov ecx, dword [esi + 4]
cmp ecx, dword [esi + 8]
je 0x4020d0
mov dword [ecx], eax
add dword [esi + 4], 4
jmp 0x4020df
lea eax, [ebp - 0x62c]
push eax
push ecx
mov ecx, esi
call fcn.00403d20
push 8
call fcn.00404ba2
add esp, 4
mov dword [ebp - 0x62c], eax
mov dword [eax], 1
mov dword [eax + 4], str.UpdateMiniMap
mov ecx, dword [esi + 4]
cmp ecx, dword [esi + 8]
je 0x40210c
mov dword [ecx], eax
add dword [esi + 4], 4
jmp 0x40211b
lea eax, [ebp - 0x62c]
push eax
push ecx
mov ecx, esi
call fcn.00403d20
push 8
call fcn.00404ba2
add esp, 4
mov dword [ebp - 0x62c], eax
mov dword [eax], 1
mov dword [eax + 4], str.MiniMap_set_to
mov ecx, dword [esi + 4]
cmp ecx, dword [esi + 8]
je 0x402148
mov dword [ecx], eax
add dword [esi + 4], 4
jmp 0x402157
lea eax, [ebp - 0x62c]
push eax
push ecx
mov ecx, esi
call fcn.00403d20
push 8
call fcn.00404ba2
add esp, 4
mov dword [ebp - 0x62c], eax
mov dword [eax], 1
mov dword [eax + 4], 0
mov ecx, dword [esi + 4]
cmp ecx, dword [esi + 8]
je 0x402184
mov dword [ecx], eax
add dword [esi + 4], 4
jmp 0x402193
lea eax, [ebp - 0x62c]
push eax
push ecx
mov ecx, esi
call fcn.00403d20
lea eax, [ebp - 0x420]
push eax
push dword [ebp - 0x63c]
call dword [sym.imp.cc3tools.dll_void___cdecl_GenerateAptConstFile_struct_AptConstData___char_const__]
push str.__Created_by_AptToXML._n
push dword [ebp - 0x650]
call fcn.00401060
mov esi, dword [ebp - 0x640]
push str.__xml_version1.0_encodingutf_8___n_AssetDeclaration_xmlns_uri:ea.com:eala:asset__xmlns:xsi_http:__www.w3.org_2001_XMLSchema_instance___n
push esi
call fcn.00401060
push edi
push edi
push str._t_AptAptData_id_TowMiniMap_s_apt__File_TowMiniMap_s.apt_____n
push esi
call fcn.00401060
push edi
push edi
push str._t_AptConstData_id_TowMiniMap_s_const__File_TowMiniMap_s.const_____n
push esi
call fcn.00401060
push edi
push edi
push str._t_AptDatData_id_TowMiniMap_s_dat__File_TowMiniMap_s.dat_____n
push esi
call fcn.00401060
add esp, 0x48
mov dword [ebp - 0x634], 0
cmp dword [ebp - 0x64c], 0
jbe 0x402852
mov eax, dword [sym.imp.cc3tools.dll_void___cdecl_AddConstantPoolAction_enum_action_type__struct_ActionBytes___unsigned_int_]
mov dword [ebp - 0x654], eax
mov eax, dword [sym.imp.cc3tools.dll_void___cdecl_AddAction_enum_action_type__struct_ActionBytes__]
mov dword [ebp - 0x63c], eax
mov eax, dword [sym.imp.cc3tools.dll_void___cdecl_AddByteAction_enum_action_type__struct_ActionBytes___unsigned_char_]
mov dword [ebp - 0x644], eax
mov eax, dword [sym.imp.cc3tools.dll_void___cdecl_AddIntAction_enum_action_type__struct_ActionBytes___int_]
mov dword [ebp - 0x658], 3
mov dword [ebp - 0x62c], eax
nop
push 0x10
call fcn.00404ba2
lea ecx, [ebx + 0xc]
mov dword [ebp - 0x630], eax
add esp, 4
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax], 0
mov edx, dword [ecx + 4]
cmp edx, dword [ecx + 8]
je 0x40227e
mov dword [edx], eax
add dword [ecx + 4], 4
jmp 0x40228b
lea eax, [ebp - 0x630]
push eax
push edx
call fcn.00403d20
inc dword [ebx + 8]
push 0xe0
call fcn.00404ba2
add esp, 4
mov dword [ebp - 0x65c], eax
mov ecx, eax
mov dword [ebp - 4], 0
call fcn.004028b0
cmp dword [ebp - 0x634], 0
mov esi, eax
mov dword [ebp - 4], 0xffffffff
lea edi, [esi + 8]
mov dword [ebp - 0x638], esi
mov dword [edi], 0
mov dword [esi], 1
mov dword [esi + 0xc0], 0
mov dword [esi + 0xd0], 0
jne 0x4024f7
push 8
call fcn.00404ba2
add esp, 4
mov dword [ebp - 0x630], eax
mov dword [eax], 5
mov dword [eax + 4], 0xff000000
mov ecx, dword [ebx + 0xc]
mov ecx, dword [ecx]
add ecx, 4
mov edx, dword [ecx + 4]
cmp edx, dword [ecx + 8]
je 0x402323
mov dword [edx], eax
add dword [ecx + 4], 4
jmp 0x402330
lea eax, [ebp - 0x630]
push eax
push edx
call fcn.00403d20
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x630], 0
mov eax, dword [eax]
inc dword [eax]
mov dword [esi + 0xc0], 6
add esi, 0xc4
mov eax, dword [esi + 4]
cmp eax, dword [esi + 8]
je 0x402365
mov dword [eax], 0
add dword [esi + 4], 4
jmp 0x402374
lea ecx, [ebp - 0x630]
push ecx
push eax
mov ecx, esi
call fcn.00403d20
mov eax, dword [esi + 4]
mov dword [ebp - 0x630], 1
cmp eax, dword [esi + 8]
je 0x402392
mov dword [eax], 1
add dword [esi + 4], 4
jmp 0x4023a1
lea ecx, [ebp - 0x630]
push ecx
push eax
mov ecx, esi
call fcn.00403d20
mov eax, dword [esi + 4]
mov dword [ebp - 0x630], 2
cmp eax, dword [esi + 8]
je 0x4023bf
mov dword [eax], 2
add dword [esi + 4], 4
jmp 0x4023ce
lea ecx, [ebp - 0x630]
push ecx
push eax
mov ecx, esi
call fcn.00403d20
mov eax, dword [esi + 4]
mov dword [ebp - 0x630], 3
cmp eax, dword [esi + 8]
je 0x4023ec
mov dword [eax], 3
add dword [esi + 4], 4
jmp 0x4023fb
lea ecx, [ebp - 0x630]
push ecx
push eax
mov ecx, esi
call fcn.00403d20
mov eax, dword [esi + 4]
mov dword [ebp - 0x630], 4
cmp eax, dword [esi + 8]
je 0x402419
mov dword [eax], 4
add dword [esi + 4], 4
jmp 0x402428
lea ecx, [ebp - 0x630]
push ecx
push eax
mov ecx, esi
call fcn.00403d20
mov eax, dword [esi + 4]
mov dword [ebp - 0x630], 5
cmp eax, dword [esi + 8]
je 0x402446
mov dword [eax], 5
add dword [esi + 4], 4
jmp 0x402455
lea ecx, [ebp - 0x630]
push ecx
push eax
mov ecx, esi
call fcn.00403d20
push 6
push edi
push 0x88
call dword [ebp - 0x654]
mov esi, dword [ebp - 0x63c]
push edi
push 7
call esi
push 0
push edi
push 0xae
call dword [ebp - 0x644]
push edi
push 0x76
call esi
push edi
push 0x49
call esi
push edi
push 0x12
call esi
push 0x10
push edi
push 0x9d
call dword [ebp - 0x62c]
add esp, 0x44
push 0
push edi
push 0xa2
call dword [ebp - 0x644]
push edi
push 0x73
call esi
push edi
push 0x1d
call esi
push edi
push 0x59
call esi
mov esi, dword [ebp - 0x644]
push 1
push edi
push 0xae
call esi
push 2
push edi
push 0xaf
call esi
push 3
push edi
push 0xb2
call esi
add esp, 0x48
push 1
push edi
push 0x99
call dword [ebp - 0x62c]
mov esi, dword [ebp - 0x638]
add esp, 0xc
push edi
push 7
call dword [ebp - 0x63c]
push edi
push 0
call dword [ebp - 0x63c]
mov eax, dword [ebp - 0x634]
add esp, 0x10
mov dword [ebp - 0x638], esi
lea ecx, [eax*4]
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax + ecx]
mov eax, dword [ecx + 8]
add ecx, 4
cmp eax, dword [ecx + 8]
je 0x402538
mov dword [eax], esi
add dword [ecx + 4], 4
jmp 0x402545
lea edx, [ebp - 0x638]
push edx
push eax
call fcn.00403d20
mov edx, dword [ebp - 0x634]
mov eax, dword [ebx + 0xc]
lea ecx, [edx*4]
push 0x10
mov eax, dword [eax + ecx]
inc dword [eax]
call fcn.00404ba2
push 3
mov dword [ebp - 0x638], eax
mov dword [eax], 2
call fcn.00404be0
push dword [ebp - 0x634]
mov esi, eax
push 0x42b370
push esi
call fcn.00401090
mov edx, dword [ebp - 0x638]
add esp, 0x14
mov ecx, dword [ebp - 0x634]
mov dword [ebp - 0x638], edx
mov dword [edx + 4], esi
mov dword [edx + 0xc], ecx
lea esi, [ecx*4]
mov dword [edx + 8], 0x70000
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax + esi]
mov eax, dword [ecx + 8]
add ecx, 4
cmp eax, dword [ecx + 8]
je 0x4025c9
mov dword [eax], edx
add dword [ecx + 4], 4
jmp 0x4025d6
lea edx, [ebp - 0x638]
push edx
push eax
call fcn.00403d20
mov eax, dword [ebx + 0xc]
push 0x40
mov eax, dword [eax + esi]
inc dword [eax]
call fcn.00404ba2
mov edx, eax
add esp, 4
mov eax, dword [ebp - 0x634]
mov ecx, 6
test eax, eax
cmovne ecx, dword [ebp - 0x658]
mov dword [edx], 3
lea eax, [eax*2 + 2]
mov dword [edx + 4], ecx
mov dword [edx + 8], 1
mov dword [edx + 0xc], eax
mov dword [edx + 0x10], 0x3f800000
mov dword [edx + 0x18], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x1c], 0x3f800000
mov dword [edx + 0x20], 0
mov dword [edx + 0x24], 0
mov dword [edx + 0x28], 0xffffffff
mov dword [edx + 0x2c], 0
mov dword [edx + 0x30], 0
mov dword [edx + 0x34], 0
mov dword [edx + 0x38], 0xffffffff
mov dword [edx + 0x3c], 0
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x638], edx
mov ecx, dword [eax + esi]
mov eax, dword [ecx + 8]
add ecx, 4
cmp eax, dword [ecx + 8]
je 0x40268b
mov dword [eax], edx
add dword [ecx + 4], 4
jmp 0x402698
lea edx, [ebp - 0x638]
push edx
push eax
call fcn.00403d20
mov eax, dword [ebx + 0xc]
push 0xc
mov eax, dword [eax + esi]
inc dword [eax]
call fcn.00404ba2
mov ecx, dword [ebp - 0x634]
add esp, 4
mov dword [ebp - 0x638], eax
mov dword [eax], 7
lea esi, [ecx*2 + 1]
mov dword [eax + 4], 0x9876543
mov dword [eax + 8], esi
mov ecx, dword [ebx + 0x24]
cmp ecx, dword [ebx + 0x28]
je 0x4026dd
mov dword [ecx], eax
add dword [ebx + 0x24], 4
jmp 0x4026ed
lea eax, [ebp - 0x638]
push eax
push ecx
lea ecx, [ebx + 0x20]
call fcn.00403d20
inc dword [ebx + 0x1c]
push 0x1c
call fcn.00404ba2
mov edx, dword [ebp - 0x634]
add esp, 4
mov dword [ebp - 0x638], eax
mov dword [eax], 1
lea ecx, [edx*2 + 2]
mov dword [eax + 4], 0x9876543
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0x43250000
mov dword [eax + 0x14], 0x43250000
mov dword [eax + 0x18], ecx
mov ecx, dword [ebx + 0x24]
cmp ecx, dword [ebx + 0x28]
je 0x402749
mov dword [ecx], eax
add dword [ebx + 0x24], 4
jmp 0x402759
lea eax, [ebp - 0x638]
push eax
push ecx
lea ecx, [ebx + 0x20]
call fcn.00403d20
inc dword [ebx + 0x1c]
push esi
push str._d0_0_165_165_n
push dword [ebp - 0x650]
call fcn.00401060
mov ecx, dword [ebp - 0x634]
mov edi, dword [ebp - 0x648]
lea eax, [ecx*2 + 2]
push eax
push edi
lea eax, [ebp - 0x524]
push str.TowMiniMap_s_geometry_d.ru
push eax
call fcn.00401090
lea eax, [ebp - 0x524]
push 0x42b1b8
push eax
call fcn.00408c4a
mov esi, eax
add esp, 0x24
test esi, esi
je 0x40288b
push 0x42b3a0
push esi
call fcn.00401060
mov eax, dword [ebp - 0x634]
lea edi, [eax*2 + 1]
push edi
push str.s_tc:255:255:255:255:_d:1.000015:0.000015:_0.000015:1.000015:0.000000:0.000000_n
push esi
call fcn.00401060
push str.t_0:165:0:0:165:0_n
push esi
call fcn.00401060
push str.t_165:0:165:165:0:165_n
push esi
call fcn.00401060
push esi
call fcn.00408cd8
mov ecx, dword [ebp - 0x634]
mov esi, dword [ebp - 0x648]
lea eax, [ecx*2 + 2]
push eax
push eax
push esi
push eax
push esi
push str._t_AptGeometryData_id_TowMiniMap_s__d__File_TowMiniMap_s_geometry_d.ru__AptID__d_____n
push dword [ebp - 0x640]
call fcn.00401060
add esp, 0x44
push edi
push esi
push edi
push esi
push str._t_Texture_id_apt_TowMiniMap_s__d__File_art_textures_apt_TowMiniMap_s__d.tga__OutputFormat_A8R8G8B8__GenerateMipMaps_false__AllowAutomaticResize_false____n
push dword [ebp - 0x640]
call fcn.00401060
mov esi, dword [ebp - 0x634]
add esp, 0x18
inc esi
mov dword [ebp - 0x634], esi
cmp esi, dword [ebp - 0x64c]
jb 0x402240
mov esi, dword [ebp - 0x640]
mov edi, dword [ebp - 0x650]
push str.__Created_by_AptToXML._n
push edi
call fcn.00401060
push str.__AssetDeclaration__n
push esi
call fcn.00401060
push edi
call fcn.00408cd8
push esi
call fcn.00408cd8
lea eax, [ebp - 0x628]
push eax
push ebx
call dword [sym.imp.cc3tools.dll_void___cdecl_GenerateAptAptFile_struct_Movie___char_const__]
add esp, 0x20
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.00404b8c
mov esp, ebp
pop ebp
ret