Function at 0x403940
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x504730
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x52d324]
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
cmp dword [ecx + 0x10], 0
jne 0x403978
xor al, al
jmp 0x403ba5
push ecx
lea ecx, [ebp - 0x28]
call fcn.00402570
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x18]
lea ecx, [edx - 1]
cmp edx, ecx
jbe 0x403bc1
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov edi, dword [ebp - 0x28]
cmp esi, 8
cmovae eax, edi
cmp word [eax + ecx*2], 0x5c
je 0x4039d3
cmp edx, ecx
jbe 0x403bc6
cmp esi, 8
lea eax, [ebp - 0x28]
cmovae eax, edi
cmp word [eax + ecx*2], 0x2f
je 0x4039d3
push 1
push 0x51e7c0
lea ecx, [ebp - 0x28]
call fcn.004029e0
lea ecx, [ebp - 0x28]
call fcn.00403440
test al, al
jne 0x4039e7
mov byte [ebp - 0x41], al
jmp 0x403b6a
cmp dword [ebp - 0x18], 0
je 0x403a0a
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x403a0a
mov bl, 1
jmp 0x403b6d
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
lea edx, [ebp - 0x50]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.004035d0
mov ebx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x4c]
cmp ebx, eax
jne 0x403a41
mov byte [ebp - 0x41], 0
jmp 0x403b19
mov byte [ebp - 0x41], 1
mov esi, ebx
cmp dword [esi + 0x14], 8
mov edx, esi
jb 0x403a51
mov edx, dword [esi]
mov ecx, edx
mov dword [ebp - 0x30], 0
xor eax, eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
lea edi, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403a70
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x40]
call fcn.00402710
cmp dword [ebp - 0x30], 0
jne 0x403a93
mov bl, 1
jmp 0x403aaa
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
sete bl
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x403ae4
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403ada
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403bcb
push edx
push ecx
call fcn.004dc783
add esp, 8
test bl, bl
je 0x403aff
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x403af2
mov eax, dword [esi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x403b0f
mov eax, dword [ebp - 0x4c]
add esi, 0x18
cmp esi, eax
jne 0x403a47
jmp 0x403b16
mov eax, dword [ebp - 0x4c]
mov byte [ebp - 0x41], 0
mov ebx, dword [ebp - 0x50]
test ebx, ebx
je 0x403b6a
push ecx
mov edx, eax
mov ecx, ebx
call fcn.00402de0
mov ecx, dword [ebp - 0x48]
mov eax, 0x2aaaaaab
sub ecx, ebx
add esp, 4
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, ebx
shl ecx, 3
cmp ecx, 0x1000
jb 0x403b60
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403bcb
push ecx
push ebx
call fcn.004dc783
add esp, 8
mov bl, byte [ebp - 0x41]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x403ba3
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403b99
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403bd0
push edx
push ecx
call fcn.004dc783
add esp, 8
mov al, bl
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.004dc214
mov esp, ebp
pop ebp
ret
call fcn.00406bd0
call fcn.00406bd0
call fcn.004e2bf9
call fcn.004e2bf9
int3