Function at 0x40fa80
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5499c7
push eax
mov dword fs:[0], esp
sub esp, 0x174
lea eax, [esp + 0x74]
lea ecx, [esp + 0x24]
push ebx
push ebp
mov ebp, dword [esp + 0x18c]
push esi
push edi
push 0
push 0
push 0
push 0
push 0x100
push eax
push ecx
push ebp
call fcn.0050e5e0
add esp, 0x20
test eax, eax
jne 0x40feda
mov edx, dword [0x5b5ecc]
mov dword [esp + 0x18], edx
mov ecx, dword [0x5ba8a4]
mov dword [esp + 0x18c], eax
lea eax, [esp + 0x84]
lea edx, [esp + 0x18]
push eax
push str.idmmzcc2
push ecx
push 0x599928
push edx
call fcn.0053091a
add esp, 0x14
lea ecx, [esp + 0x18]
push 0x598f5c
push 0x599924
call fcn.0053031b
mov eax, dword [0x5b5ecc]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x14]
push ecx
push 0x597ddc
push edx
mov byte [esp + 0x198], 1
call fcn.0053091a
mov eax, dword [esp + 0x20]
push 0x5c
push eax
call fcn.0051c7b0
add esp, 0x14
test eax, eax
je 0x40fbf2
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov byte [eax + 1], 0
mov ecx, dword [esp + 0x14]
push ecx
call edi
cmp eax, 0xffffffff
jne 0x40fbf2
push 3
push 0x5c
lea ecx, [esp + 0x1c]
call fcn.00537fd9
mov esi, eax
cmp esi, 0xffffffff
je 0x40fbf2
mov ebp, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea edx, [esp + 0x2c]
push esi
push edx
lea ecx, [esp + 0x1c]
call fcn.005304fa
mov eax, dword [eax]
push eax
call edi
cmp eax, 0xffffffff
lea ecx, [esp + 0x2c]
sete bl
call fcn.00537b04
test bl, bl
je 0x40fbd7
lea eax, [esp + 0x28]
push esi
push eax
lea ecx, [esp + 0x1c]
call fcn.005304fa
mov eax, dword [eax]
push 0
push eax
call ebp
test eax, eax
lea ecx, [esp + 0x28]
sete bl
call fcn.00537b04
test bl, bl
jne 0x40fbeb
inc esi
lea ecx, [esp + 0x14]
push esi
push 0x5c
call fcn.00537fd9
mov esi, eax
cmp esi, 0xffffffff
jne 0x40fb88
mov ebp, dword [esp + 0x194]
push 0x2000
call fcn.0051cfae
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x30], edi
jne 0x40fc37
lea ecx, [esp + 0x14]
mov byte [esp + 0x18c], al
call fcn.00537b04
lea ecx, [esp + 0x18]
mov dword [esp + 0x18c], 0xffffffff
call fcn.00537b04
mov eax, 0xffffff98
jmp 0x40feda
mov ecx, dword [0x5b5ecc]
mov byte [esp + 0x13], 0
mov dword [esp + 0x20], ecx
push ebp
mov byte [esp + 0x190], 2
call fcn.0050ea90
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x40fe93
mov edx, dword [esp + 0x18]
push 0x599920
push edx
call fcn.0051dc3f
mov esi, eax
add esp, 8
test esi, esi
jne 0x40fcae
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
push str._s
push ecx
call fcn.0053091a
mov edx, dword [esp + 0x2c]
push 0x599920
push edx
call fcn.0051dc3f
mov esi, eax
add esp, 0x14
test esi, esi
je 0x40fe93
mov byte [esp + 0x13], 1
push 0x2000
push edi
push ebp
call fcn.0050edd0
add esp, 0xc
mov dword [esp + 0x24], eax
test eax, eax
jl 0x40fd02
jmp 0x40fccb
mov eax, dword [esp + 0x24]
test eax, eax
jle 0x40fd02
push esi
push 1
push eax
push edi
call fcn.0051dad5
add esp, 0x10
cmp eax, 1
jne 0x40fcfa
push 0x2000
push edi
push ebp
call fcn.0050edd0
add esp, 0xc
mov dword [esp + 0x24], eax
test eax, eax
jge 0x40fcc7
jmp 0x40fd02
mov dword [esp + 0x24], 0xffffffff
push esi
call fcn.0051da58
mov eax, dword [esp + 0x19c]
add esp, 4
test eax, eax
je 0x40fe75
lea eax, [esp + 0x84]
push str.idmmzcc.dll
push eax
call fcn.0051cb70
add esp, 8
test eax, eax
je 0x40fe75
mov al, byte [esp + 0x13]
test al, al
lea eax, [esp + 0x20]
jne 0x40fd47
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x2c]
call fcn.00537879
mov ecx, dword [0x5b5ecc]
mov dword [esp + 0x1c], ecx
mov edx, dword [0x5ba8a4]
lea eax, [esp + 0x1c]
push edx
push 0x597ddc
push eax
mov byte [esp + 0x198], 4
call fcn.0053091a
mov ecx, dword [esp + 0x28]
push str.IDM_
push ecx
call fcn.0051cb70
add esp, 0x14
test eax, eax
je 0x40fd93
mov byte [eax + 1], 0
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x1c]
push edx
push eax
call fcn.0040f810
mov ebx, dword [esp + 0x1a4]
add esp, 8
mov dword [esp + 0x2c], 0
mov eax, dword [ebx + 0x28]
test eax, eax
jle 0x40fe53
xor esi, esi
mov eax, dword [ebx + 0x24]
xor ebp, ebp
mov ecx, dword [esi + eax]
mov edx, dword [ecx + 0x1c]
test edx, edx
jle 0x40fe35
xor edi, edi
mov edx, dword [esi + eax]
mov ecx, dword [edx + 0x18]
mov edx, dword [ecx + edi + 8]
test edx, edx
je 0x40fe22
mov edx, dword [esi + eax]
mov eax, dword [edx + 0x18]
lea edx, [esp + 0x1c]
mov ecx, dword [eax + edi]
push ecx
push 0x597ddc
push edx
call fcn.0053091a
mov eax, dword [esp + 0x28]
push 0x5c
push eax
call fcn.0051c7b0
add esp, 0x14
test eax, eax
je 0x40fe10
mov byte [eax + 1], 0
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x1c]
push ecx
push edx
call fcn.0040f810
add esp, 8
mov eax, dword [ebx + 0x24]
inc ebp
add edi, 0x24
mov ecx, dword [esi + eax]
cmp ebp, dword [ecx + 0x1c]
jl 0x40fdd2
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebx + 0x28]
inc eax
add esi, 4
cmp eax, ecx
mov dword [esp + 0x2c], eax
jl 0x40fdc1
mov ebp, dword [esp + 0x194]
lea ecx, [esp + 0x1c]
mov byte [esp + 0x18c], 3
call fcn.00537b04
lea ecx, [esp + 0x28]
mov byte [esp + 0x18c], 2
call fcn.00537b04
mov al, byte [esp + 0x13]
test al, al
je 0x40fe8f
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
push edx
push eax
call fcn.0040f5a0
add esp, 8
mov ebx, dword [esp + 0x24]
push ebp
call fcn.0050efc0
push edi
call fcn.0051cec5
add esp, 8
lea ecx, [esp + 0x20]
mov byte [esp + 0x18c], 1
call fcn.00537b04
lea ecx, [esp + 0x14]
mov byte [esp + 0x18c], 0
call fcn.00537b04
lea ecx, [esp + 0x18]
mov dword [esp + 0x18c], 0xffffffff
call fcn.00537b04
mov eax, ebx
mov ecx, dword [esp + 0x184]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x180
ret