Function at 0x40a200
Capabilities:
Check if file exists
Create directory
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fadcf
mov eax, dword fs:[0]
push eax
sub esp, 0xa04
mov eax, dword [0x5543c8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x424], edi
cmp byte [edi + 0x580], 0
je 0x40a255
lea ecx, [edi + 0x51c]
mov byte [edi + 0x582], 1
call fcn.00412650
jmp 0x40adb9
lea ecx, [ebp - 0xa05]
call fcn.00405880
mov ecx, dword [edi + 0x508]
lea edx, [ebp - 0x520]
push edx
mov eax, dword [ecx]
mov eax, dword [eax + 0x38]
call eax
mov ecx, eax
mov dword [ebp - 4], 0
call dword [0x5273b4]
mov edx, eax
mov dword [ebp - 0x48c], 0
mov ecx, edx
mov dword [ebp - 0x488], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x49c], xmm0
lea esi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a2b0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x49c]
call fcn.00407380
lea ecx, [ebp - 0x520]
mov byte [ebp - 4], 2
call dword [0x5273b0]
cmp dword [ebp - 0x488], 8
lea eax, [ebp - 0x49c]
cmovae eax, dword [ebp - 0x49c]
push eax
lea eax, [ebp - 0x46c]
push eax
call fcn.00401ae0
add esp, 8
lea ecx, [ebp - 0xa05]
mov byte [ebp - 4], 3
call fcn.00405920
cmp dword [ebp - 0x458], 0x10
lea eax, [ebp - 0x46c]
cmovae eax, dword [ebp - 0x46c]
push eax
call fcn.0040b240
mov ecx, eax
call sym.RedAlert.exe_public_virtual:_class_DuiLib::IListCallbackUI____thiscall_DuiLib::CListUI::GetTextCallback_void_const
mov ecx, eax
call fcn.00406520
test al, al
jne 0x40a3ee
push 0x568
lea eax, [ebp - 0xa04]
push 0
push eax
call fcn.004cf400
add esp, 0xc
lea eax, [ebp - 0x424]
lea ecx, [ebp - 0xa04]
push eax
call fcn.004155e0
push 0
push 0
push 0
push 0
push 0
push 0x100
push 0x10ce0000
push 0x501e3c
mov ecx, edi
mov byte [ebp - 4], 4
call dword [0x5273cc]
push eax
lea ecx, [ebp - 0xa04]
call dword [0x5273d0]
lea ecx, [ebp - 0xa04]
call dword [0x5273d8]
push 0
lea ecx, [ebp - 0xa04]
call fcn.00416960
push 0x501f9c
lea ecx, [ebp - 0xa04]
call fcn.004170c0
push 0x501fa8
lea ecx, [ebp - 0xa04]
call fcn.00416dc0
lea ecx, [ebp - 0xa04]
call dword [0x5273d4]
lea ecx, [ebp - 0xa04]
call fcn.00415740
jmp 0x40ad5d
mov ecx, edi
call fcn.0040b2c0
test al, al
jne 0x40a4ac
push 0x568
lea eax, [ebp - 0xa04]
push 0
push eax
call fcn.004cf400
add esp, 0xc
lea eax, [ebp - 0x424]
lea ecx, [ebp - 0xa04]
push eax
call fcn.004155e0
push 0
push 0
push 0
push 0
push 0
push 0x100
push 0x10ce0000
push 0x501e3c
mov ecx, edi
mov byte [ebp - 4], 5
call dword [0x5273cc]
push eax
lea ecx, [ebp - 0xa04]
call dword [0x5273d0]
lea ecx, [ebp - 0xa04]
call dword [0x5273d8]
push 0
lea ecx, [ebp - 0xa04]
call fcn.00416960
push 0x501fcc
lea ecx, [ebp - 0xa04]
call fcn.004170c0
push 0x501fd8
lea ecx, [ebp - 0xa04]
call fcn.00416dc0
lea ecx, [ebp - 0xa04]
call dword [0x5273d4]
lea ecx, [ebp - 0xa04]
call fcn.00415740
jmp 0x40ad5d
lea ecx, [ebp - 0xa05]
call fcn.004059c0
lea eax, [ebp - 0x43c]
push eax
call fcn.0040b240
mov ecx, eax
call fcn.0040d310
cmp byte [edi + 0x584], 0
mov byte [ebp - 4], 6
je 0x40a501
lea eax, [ebp - 0x4ec]
push eax
call fcn.0040b240
mov ecx, eax
call fcn.0040d3e0
push eax
lea ecx, [ebp - 0x43c]
call fcn.00402910
lea ecx, [ebp - 0x4ec]
call fcn.00407ac0
lea eax, [ebp - 0x46c]
push eax
lea ecx, [ebp - 0x454]
call fcn.004029f0
cmp byte [edi + 0x584], 0
lea eax, [ebp - 0x43c]
mov byte [ebp - 4], 7
je 0x40a55b
cmp dword [ebp - 0x428], 0x10
cmovae eax, dword [ebp - 0x43c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov edx, eax
lea esi, [edx + 1]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x40a540
sub edx, esi
lea ecx, [ebp - 0x454]
push edx
push eax
call fcn.00402880
jmp 0x40a66f
cmp dword [ebp - 0x428], 0x10
cmovae eax, dword [ebp - 0x43c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
push eax
lea ecx, [ebp - 0x484]
call fcn.00402990
cmp dword [ebp - 0x470], 0x10
lea ecx, [ebp - 0x484]
mov eax, dword [ebp - 0x484]
lea esi, [ebp - 0x484]
cmovae ecx, eax
mov byte [ebp - 4], 8
mov dword [ebp - 0xa0c], ecx
cmovae esi, eax
lea ecx, [ebp - 0x484]
cmovae ecx, eax
mov eax, dword [ebp - 0x474]
add eax, ecx
mov dword [ebp - 0xa10], eax
cmp esi, eax
je 0x40a5f2
sub dword [ebp - 0xa0c], esi
mov edi, dword [ebp - 0xa0c]
nop dword [eax]
movsx ax, byte [esi]
movzx eax, ax
push eax
call fcn.004d8a51
mov byte [esi + edi], al
add esp, 4
inc esi
cmp esi, dword [ebp - 0xa10]
jne 0x40a5d0
mov edi, dword [ebp - 0x424]
call fcn.0040b240
mov ecx, eax
call fcn.0040d1a0
push eax
lea eax, [ebp - 0x4b4]
push eax
call fcn.004018b0
add esp, 8
cmp dword [eax + 0x14], 0x10
mov ecx, eax
mov byte [ebp - 4], 9
jb 0x40a61c
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x454]
call fcn.00402880
lea ecx, [ebp - 0x4b4]
mov byte [ebp - 4], 8
call fcn.00403880
cmp dword [ebp - 0x470], 0x10
lea eax, [ebp - 0x484]
push dword [ebp - 0x474]
cmovae eax, dword [ebp - 0x484]
lea ecx, [ebp - 0x454]
push eax
call fcn.00402880
lea ecx, [ebp - 0x484]
mov byte [ebp - 4], 7
call fcn.00403880
lea ecx, [ebp - 0xa05]
call fcn.00405a60
mov byte [edi + 0x582], 0
call fcn.0040b240
mov ecx, eax
call fcn.0040d1a0
push eax
lea eax, [ebp - 0x4b4]
push eax
call fcn.004018b0
add esp, 8
lea esi, [edi + 0x550]
mov ecx, esi
push eax
call fcn.00402910
lea ecx, [ebp - 0x4b4]
call fcn.00403880
push 0x104
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004cf400
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.004cf400
push 0x104
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.004cf400
push 0x104
lea eax, [ebp - 0x31c]
push 0
push eax
call fcn.004cf400
add esp, 0x30
lea ecx, [edi + 0x538]
cmp dword [edi + 0x54c], 0x10
jb 0x40a71a
mov ecx, dword [edi + 0x538]
cmp dword [esi + 0x14], 0x10
mov eax, esi
jb 0x40a724
mov eax, dword [esi]
push ecx
push 0x104
lea ecx, [ebp - 0x218]
push ecx
push 0x5271ee
push 0x501ffc
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp dword [edi + 0x54c], 0x10
lea ecx, [edi + 0x538]
jb 0x40a757
mov ecx, dword [edi + 0x538]
cmp dword [esi + 0x14], 0x10
mov eax, esi
jb 0x40a761
mov eax, dword [esi]
push ecx
push 0x104
lea ecx, [ebp - 0x114]
push ecx
push 0x5271ee
push 0x5018d8
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp dword [edi + 0x54c], 0x10
lea ecx, [edi + 0x538]
jb 0x40a794
mov ecx, dword [edi + 0x538]
cmp dword [esi + 0x14], 0x10
mov eax, esi
jb 0x40a79e
mov eax, dword [esi]
push ecx
push 0x104
lea ecx, [ebp - 0x420]
push ecx
push 0x5271ee
push str.progress
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp dword [esi + 0x14], 0x10
mov edx, esi
jb 0x40a7c6
mov edx, dword [esi]
cmp dword [edi + 0x54c], 0x10
lea ecx, [edi + 0x538]
jb 0x40a7db
mov ecx, dword [edi + 0x538]
push ecx
push 0x104
lea eax, [ebp - 0x31c]
push eax
push 0x5271ee
push str.complete
push edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [ebp - 0x114]
mov byte [ebp - 0xa05], 0
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a810
sub ecx, edx
lea eax, [ebp - 0x454]
cmp dword [ebp - 0x440], 0x10
push ecx
cmovae eax, dword [ebp - 0x454]
lea ecx, [ebp - 0x114]
push ecx
push dword [ebp - 0x444]
push eax
call fcn.00407630
add esp, 0x10
test eax, eax
jne 0x40a97d
lea ecx, [ebp - 0x218]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a855
sub ecx, edx
lea eax, [ebp - 0x43c]
cmp dword [ebp - 0x428], 0x10
push ecx
cmovae eax, dword [ebp - 0x43c]
lea ecx, [ebp - 0x218]
push ecx
push dword [ebp - 0x42c]
push eax
call fcn.00407630
add esp, 0x10
test eax, eax
jne 0x40a97d
mov ecx, 0x501e84
lea eax, [ebp - 0x31c]
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40a8c0
test dl, dl
je 0x40a8bc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40a8c0
add eax, 2
add ecx, 2
test dl, dl
jne 0x40a8a0
xor eax, eax
jmp 0x40a8c5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40ab40
push 0x568
push eax
lea eax, [ebp - 0xa04]
push eax
call fcn.004cf400
add esp, 0xc
lea eax, [ebp - 0x424]
lea ecx, [ebp - 0xa04]
push eax
call fcn.004155e0
push 0
push 0
push 0
push 0
push 0
push 0x100
push 0x10ce0000
push 0x501e3c
mov ecx, edi
mov byte [ebp - 4], 0xa
call dword [0x5273cc]
push eax
lea ecx, [ebp - 0xa04]
call dword [0x5273d0]
lea ecx, [ebp - 0xa04]
call dword [0x5273d8]
push 1
lea ecx, [ebp - 0xa04]
call fcn.00416960
push 0x50200c
lea ecx, [ebp - 0xa04]
call fcn.00416dc0
lea ecx, [ebp - 0xa04]
call dword [0x5273d4]
cmp dword [ebp - 0x424], 1
lea ecx, [ebp - 0xa04]
jne 0x40a974
call fcn.00415740
jmp 0x40ad47
mov byte [ebp - 4], 7
call fcn.00415740
cmp dword [edi + 0x54c], 0x10
lea ecx, [edi + 0x538]
jb 0x40a992
mov ecx, dword [edi + 0x538]
cmp dword [ebp - 0x428], 0x10
lea eax, [ebp - 0x43c]
mov edx, esi
cmovae eax, dword [ebp - 0x43c]
cmp dword [esi + 0x14], 0x10
jb 0x40a9b0
mov edx, dword [esi]
push ecx
push eax
push 0x501ffc
push edx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp dword [edi + 0x54c], 0x10
lea ecx, [edi + 0x538]
jb 0x40a9d3
mov ecx, dword [edi + 0x538]
cmp dword [ebp - 0x440], 0x10
lea eax, [ebp - 0x454]
mov edx, esi
cmovae eax, dword [ebp - 0x454]
cmp dword [esi + 0x14], 0x10
jb 0x40a9f1
mov edx, dword [esi]
push ecx
push eax
push 0x5018d8
push edx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp dword [edi + 0x54c], 0x10
lea ecx, [edi + 0x538]
jb 0x40aa14
mov ecx, dword [edi + 0x538]
cmp dword [ebp - 0x440], 0x10
lea eax, [ebp - 0x454]
mov edx, esi
cmovae eax, dword [ebp - 0x454]
cmp dword [esi + 0x14], 0x10
jb 0x40aa32
mov edx, dword [esi]
push ecx
push eax
push str.progress
push edx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp dword [edi + 0x54c], 0x10
lea eax, [edi + 0x538]
jb 0x40aa51
mov eax, dword [eax]
cmp dword [esi + 0x14], 0x10
jb 0x40aa59
mov esi, dword [esi]
push eax
push 0x502060
push str.complete
push esi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp dword [ebp - 0x458], 0x10
lea eax, [ebp - 0x46c]
mov ecx, edi
cmovae eax, dword [ebp - 0x46c]
push eax
call fcn.00407ce0
mov byte [edi + 0x585], 1
lea ecx, [ebp - 0xa05]
call fcn.00405ba0
cmp dword [ebp - 0x458], 0x10
lea eax, [ebp - 0x46c]
cmovae eax, dword [ebp - 0x46c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40aad7
cmp dword [ebp - 0x458], 0x10
lea eax, [ebp - 0x46c]
push 0
cmovae eax, dword [ebp - 0x46c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExA]
push 0x34
call fcn.004cd26e
mov esi, eax
add esp, 4
test esi, esi
je 0x40ac91
mov dword [esi + 0x28], 0
lea eax, [ebp - 0x43c]
mov dword [esi + 0x2c], 0
xorps xmm0, xmm0
mov dword [esi + 0x30], 0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
movups xmmword [esi + 0x18], xmm0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0xf
mov byte [esi + 0x18], 0
cmp esi, eax
je 0x40acb5
jmp 0x40ac93
cmp byte [edi + 0x585], 0
jne 0x40ac1a
push 0x568
lea eax, [ebp - 0xa04]
mov byte [edi + 0x585], 1
push 0
push eax
call fcn.004cf400
add esp, 0xc
lea eax, [ebp - 0x424]
lea ecx, [ebp - 0xa04]
push eax
call fcn.004155e0
push 0
push 0
push 0
push 0
push 0
push 0x100
push 0x10ce0000
push 0x501e3c
mov ecx, edi
mov byte [ebp - 4], 0xb
call dword [0x5273cc]
push eax
lea ecx, [ebp - 0xa04]
call dword [0x5273d0]
lea ecx, [ebp - 0xa04]
call dword [0x5273d8]
push 1
lea ecx, [ebp - 0xa04]
call fcn.00416960
push 0x50203c
lea ecx, [ebp - 0xa04]
call fcn.00416dc0
lea ecx, [ebp - 0xa04]
call dword [0x5273d4]
movzx eax, byte [ebp - 0xa05]
mov ecx, 1
cmp dword [ebp - 0x424], ecx
mov byte [ebp - 4], 7
cmove eax, ecx
lea ecx, [ebp - 0xa04]
mov dword [ebp - 0xa10], eax
call fcn.00415740
cmp byte [ebp - 0xa10], 0
jne 0x40a97d
lea ecx, [ebp - 0xa05]
call fcn.00405b00
lea eax, [ebp - 0x4cc]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.004daa28
add esp, 8
test eax, eax
jne 0x40aa8e
mov eax, dword [ebp - 0x4b8]
mov dword [edi + 0x588], eax
lea eax, [ebp - 0x420]
push eax
mov byte [edi + 0x583], 1
call fcn.004d9b06
mov ecx, dword [edi + 0x518]
add esp, 4
mov dword [edi + 0x58c], eax
test ecx, ecx
je 0x40aa8e
lea edx, [eax - 1]
cmp edx, 0x62
ja 0x40aa8e
push eax
call dword [0x5273f8]
jmp 0x40aa8e
xor esi, esi
cmp dword [ebp - 0x428], 0x10
lea eax, [ebp - 0x43c]
push dword [ebp - 0x42c]
cmovae eax, dword [ebp - 0x43c]
mov ecx, esi
push eax
call fcn.00403350
lea ecx, [esi + 0x18]
lea eax, [ebp - 0x454]
cmp ecx, eax
je 0x40acdc
cmp dword [ebp - 0x440], 0x10
push dword [ebp - 0x444]
cmovae eax, dword [ebp - 0x454]
push eax
call fcn.00403350
mov ecx, edi
lea eax, [edi + 0x4b8]
neg ecx
sbb ecx, ecx
and ecx, eax
mov dword [esi + 0x30], ecx
lea ecx, [ebp - 0xa06]
call fcn.00405c40
push esi
lea ecx, [edi + 0x51c]
call fcn.00412020
mov ecx, dword [edi + 0x50c]
mov byte [edi + 0x580], 1
test ecx, ecx
je 0x40ad1f
mov eax, dword [ecx]
push 0
call dword [eax + 0xec]
mov ecx, dword [edi + 0x510]
test ecx, ecx
je 0x40ad33
mov eax, dword [ecx]
push 0x502064
call dword [eax + 0x3c]
mov ecx, dword [edi + 0x514]
test ecx, ecx
je 0x40ad47
mov eax, dword [ecx]
push 0x50206c
call dword [eax + 0x3c]
lea ecx, [ebp - 0x454]
call fcn.00403880
lea ecx, [ebp - 0x43c]
call fcn.00403880
mov ecx, dword [ebp - 0x458]
cmp ecx, 0x10
jb 0x40ad93
mov edx, dword [ebp - 0x46c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40ad89
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40add4
push ecx
push edx
call fcn.004cd29e
add esp, 8
lea ecx, [ebp - 0x49c]
mov dword [ebp - 0x45c], 0
mov dword [ebp - 0x458], 0xf
mov byte [ebp - 0x46c], 0
call fcn.00403730
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004cd2ac
mov esp, ebp
pop ebp
ret
call fcn.004d2fbf
int3