Function at 0x440360
Capabilities:
Check if file exists
Get file attributes
Set current directory

Disassembly:
mov eax, 0x10d68
call fcn.00493660
cmp dword [0x4ac470], 4
mov eax, dword [0x4ac218]
push ebx
push ebp
mov ebp, dword [esp + 0x10d7c]
push esi
push edi
mov edi, ecx
mov dword [esp + 0x14], eax
jl 0x4403ae
mov ecx, dword [esp + 0x10d7c]
push 0x49a8ad
push 0
push 0x4a0174
call fcn.0042efe0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10d68
ret 0xc
xor ebx, ebx
mov byte [esp + 0xd78], bl
cmp edx, ebx
je 0x4404db
cmp byte [edx], bl
je 0x4404db
mov eax, edx
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4403d0
sub eax, esi
cmp eax, 0x104
jb 0x4403f3
push 0x104
lea ecx, [esp + 0x74]
push ecx
push edx
call dword [sym.imp.KERNEL32.DLL_GetShortPathNameA]
jmp 0x44040d
push 0x103
push edx
lea edx, [esp + 0x78]
push edx
call fcn.00489e40
add esp, 0xc
mov byte [esp + 0x173], bl
push 3
lea eax, [esp + 0x74]
push 0x4a01ac
push eax
call fcn.00489239
add esp, 0xc
test eax, eax
sete al
mov byte [esp + 0x12], al
cmp al, bl
je 0x440467
lea ecx, [esp + 0x70]
push 0x7d
push ecx
call fcn.00487e91
add esp, 8
cmp eax, ebx
je 0x4404df
cmp byte [eax + 1], bl
je 0x4404df
lea eax, [esp + 0x70]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x440455
sub eax, edx
cmp byte [esp + eax + 0x6f], 0x5c
jne 0x44047b
jmp 0x4404df
lea edx, [esp + 0x70]
push edx
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x44047b
test al, 0x10
jne 0x4404df
lea eax, [esp + 0x70]
push 0x5c
push eax
call fcn.004892fd
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x4404b4
push 0xfffe
lea ecx, [esi + 1]
push ecx
lea edx, [esp + 0xd80]
push edx
call fcn.00489e40
mov byte [esp + 0x10d82], bl
add esp, 0xc
mov byte [esi], bl
jmp 0x4404df
cmp byte [esp + 0x12], bl
jne 0x4404df
push 0xfffe
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0xd80]
push ecx
call fcn.00489e40
add esp, 0xc
mov byte [esp + 0x10d76], bl
mov byte [esp + 0x70], bl
cmp edi, ebx
je 0x440506
cmp byte [edi], bl
je 0x440506
push 0x3ff
lea edx, [esp + 0x97c]
push edi
push edx
call fcn.00489e40
add esp, 0xc
mov byte [esp + 0xd77], bl
jmp 0x440525
mov eax, dword [0x4ad870]
push eax
push 0x4a01b0
mov esi, 0x400
lea edi, [esp + 0x980]
call fcn.00473d20
add esp, 8
mov byte [esp + 0x578], bl
mov byte [esp + 0x178], bl
cmp byte [ebp], bl
je 0x44058d
push 0x28
push ebp
call fcn.00487e91
add esp, 8
push 0x3ff
cmp eax, ebx
je 0x4405c9
inc eax
push eax
lea ecx, [esp + 0x180]
push ecx
call fcn.00489e40
add esp, 0xc
lea edx, [esp + 0x178]
push 0x29
push edx
mov byte [esp + 0x57f], bl
call fcn.004892fd
add esp, 8
cmp eax, ebx
je 0x44057f
mov byte [eax], bl
jmp 0x4405e1
mov byte [esp + 0x178], bl
mov byte [esp + 0x578], bl
push 0x54
lea eax, [esp + 0x20]
push ebx
push eax
call fcn.00490360
mov ebx, dword [0x4a8978]
add esp, 0xc
add ebx, 0x4c
mov dword [esp + 0x18], 0x58
call fcn.0045b5e0
test eax, eax
je 0x440636
mov ecx, dword [0x4a8978]
mov edx, dword [ecx + 0x4c]
mov eax, dword [edx + 4]
mov dword [esp + 0x1c], eax
jmp 0x44063e
lea eax, [esp + 0x17c]
push ebp
push eax
call fcn.00489e40
add esp, 0xc
mov byte [esp + 0x577], bl
cmp byte [esp + 0x178], bl
je 0x440586
push ebx
push 0xffffffffffffffff
push 1
push 0x49a8ad
lea ecx, [esp + 0x188]
push 0x49eafc
push ecx
xor eax, eax
or ecx, 0xffffffff
call fcn.00474490
push ebx
push ebx
push ebx
lea edx, [esp + 0x19c]
push edx
push ebx
push ebp
push 0x4a01c4
mov esi, 0x400
lea edi, [esp + 0x5ac]
call fcn.00473d20
add esp, 0x34
jmp 0x44058d
mov dword [esp + 0x1c], 0
cmp byte [esp + 0x578], 0
lea ecx, [esp + 0x978]
mov dword [esp + 0x48], ecx
je 0x440660
lea edx, [esp + 0x578]
mov dword [esp + 0x24], edx
jmp 0x440668
mov dword [esp + 0x24], 0x4a01e4
movsx ecx, byte [esp + 0x70]
mov esi, dword [esp + 0x10d80]
mov bl, byte [esi]
lea eax, [esp + 0xd78]
neg ecx
mov dword [esp + 0x34], eax
sbb ecx, ecx
movzx eax, bl
lea edx, [esp + 0x70]
and ecx, edx
mov dword [esp + 0x38], 0xfffe
mov dword [esp + 0x44], ecx
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
test eax, 0xffffff80
jne 0x4406bd
push 2
push eax
call fcn.004883de
add esp, 8
test eax, eax
je 0x4406bd
and bl, 0xdf
cmp bl, 0x4d
je 0x4406ce
cmp bl, 0x53
jne 0x4406d4
mov byte [esp + 0x12], 1
jmp 0x4406d3
mov byte [esp + 0x13], 1
inc esi
mov eax, esi
call fcn.0040e3e0
test al, al
je 0x4406ee
push 0x10
push 0
push esi
call fcn.00488945
add esp, 0xc
jmp 0x4406f7
push esi
call fcn.00488426
add esp, 4
mov dword [esp + 0x4c], 0x80004
test al, 0x20
je 0x44070b
mov dword [esp + 0x4c], 0x180004
test al, 0x10
je 0x440714
or dword [esp + 0x4c], 2
test al, 8
je 0x440720
or dword [esp + 0x4c], 0x2000
cmp byte [esp + 0x13], 0
mov ebp, 0x200
jne 0x440730
test al, 4
je 0x440734
or dword [esp + 0x4c], ebp
test al, 2
je 0x440740
or dword [esp + 0x4c], 0x800
test al, 1
je 0x44074c
or dword [esp + 0x4c], 0x1000
call fcn.00479580
push 0
push 0x403
mov bl, al
mov eax, dword [0x4ac2cc]
push 0x44
push eax
call dword [sym.imp.USER32.DLL_PostMessageA]
mov edi, 1
add dword [0x4ac470], edi
cmp byte [esp + 0x12], 0
jne 0x440796
mov eax, dword [esp + 0x4c]
test al, 2
je 0x440789
test eax, 0x2000
je 0x440796
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.COMDLG32.DLL_GetOpenFileNameA]
jmp 0x4407a1
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.COMDLG32.DLL_GetSaveFileNameA]
sub dword [0x4ac470], edi
test bl, bl
mov esi, eax
mov eax, dword [0x4a8978]
sete cl
mov byte [eax + 0xce], bl
mov byte [eax + 0xcc], cl
mov eax, dword [0x4a9aac]
test eax, eax
je 0x4407e3
mov eax, dword [eax]
test eax, eax
je 0x4407e3
cmp byte [eax], 0
je 0x4407e3
test eax, eax
jne 0x4407dc
mov eax, 0x49a8ad
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
test esi, esi
jne 0x440849
mov ecx, dword [esp + 0x14]
call fcn.00414350
cmp eax, edi
je 0x440803
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10d68
ret 0xc
call dword [sym.imp.COMDLG32.DLL_CommDlgExtendedError]
test eax, eax
je 0x440827
mov edx, dword [esp + 0x10d7c]
push edx
call fcn.00431650
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10d68
ret 0xc
mov eax, dword [0x4acad0]
push edi
push 0
push 0xffffffffffffffff
push 0x49bec0
push eax
call fcn.00476c10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10d68
ret 0xc
mov ecx, dword [0x4acad0]
push edi
push 0
push 0xffffffffffffffff
push 0x49a8c8
push ecx
call fcn.00476c10
test dword [esp + 0x4c], ebp
je 0x440920
cmp byte [esp + 0x13], 0
lea eax, [esp + 0xd78]
je 0x440907
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x440880
sub eax, edx
cmp byte [esp + eax + 0xd79], cl
jne 0x4408e3
lea edx, [esp + 0xd78]
push 0x5c
push edx
call fcn.004892fd
mov esi, eax
add esp, 8
test esi, esi
je 0x440920
lea ecx, [esp + 0xd78]
sub eax, ecx
mov byte [esi], 0xa
cmp eax, 2
jne 0x440920
cmp byte [esi - 1], 0x3a
jne 0x440920
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4408c6
sub eax, edx
inc eax
push eax
lea edx, [esi + 1]
push esi
push edx
call fcn.00487a80
add esp, 0xc
mov byte [esi], 0x5c
jmp 0x440920
lea eax, [esp + 0xd78]
lea ebx, [ebx]
cmp byte [eax], 0
je 0x4408fc
add eax, edi
cmp byte [eax], 0
jne 0x4408f5
cmp byte [eax + 1], 0
je 0x440920
mov byte [eax], 0xa
jmp 0x4408f0
cmp byte [eax], 0
je 0x440917
lea esp, [esp]
add eax, edi
cmp byte [eax], 0
jne 0x440910
cmp byte [eax + 1], 0
mov byte [eax], 0xa
jne 0x440907
mov ecx, dword [esp + 0x14]
push edi
push 0
push 0xffffffffffffffff
lea eax, [esp + 0xd84]
push eax
push ecx
call fcn.00476c10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10d68
ret 0xc