Function at 0x423598
Capabilities:
Check if file exists
Get common file path
Get file attributes
Set current directory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff9b4
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp word [eax], 0x5c
jne 0x4235c3
mov eax, dword [ebp - 4]
cmp word [eax + 2], 0x5c
jne 0x4235c3
mov dword [ebp - 8], 0x23bd
jmp 0x4238ca
mov eax, dword [ebp - 4]
cmp word [eax], 0x2e
jne 0x423627
mov eax, dword [ebp - 4]
cmp word [eax + 2], 0x2e
jne 0x423627
xor eax, eax
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 4]
call fcn.00419fec
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
dec eax
sub eax, 2
jl 0x423618
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], 2
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 4]
cmp word [edx + eax*2], 0x20
je 0x423610
mov dword [ebp - 0x2c], 1
jmp 0x423618
inc dword [ebp - 0x28]
dec dword [ebp - 0x30]
jne 0x4235fa
cmp dword [ebp - 0x2c], 0
jne 0x423627
mov eax, dword [ebp - 4]
mov word [eax + 4], 0
lea eax, [ebp - 0x64c]
push eax
push 0x104
call sub.kernel32.dll_GetCurrentDirectoryW
mov ax, word [ebp - 0x64c]
call fcn.00404214
mov word [ebp - 0x12], ax
mov word [ebp - 0x10], 0x3d
mov eax, dword [ebp - 4]
mov ax, word [eax]
call fcn.0041a200
test al, al
je 0x42367c
mov eax, dword [ebp - 4]
cmp word [eax + 2], 0x3a
jne 0x42367c
mov eax, dword [ebp - 4]
mov ax, word [eax]
call fcn.00404214
mov word [ebp - 0xe], ax
add dword [ebp - 4], 4
jmp 0x423684
mov ax, word [ebp - 0x12]
mov word [ebp - 0xe], ax
mov word [ebp - 0xc], 0x3a
mov word [ebp - 0xa], 0
mov eax, dword [ebp - 4]
call fcn.00419fec
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 4]
cmp word [eax], 0x5c
jne 0x4236e6
mov eax, dword [ebp - 0x20]
add eax, 2
cmp eax, 0x208
jbe 0x4236bd
mov dword [ebp - 8], 0xce
jmp 0x4238ca
mov ax, word [ebp - 0xe]
mov word [ebp - 0x442], ax
mov ax, word [ebp - 0xc]
mov word [ebp - 0x440], ax
lea eax, [ebp - 0x43e]
mov edx, dword [ebp - 4]
call fcn.0041a014
jmp 0x423797
lea eax, [ebp - 0x10]
call fcn.00420fe8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x423707
lea eax, [ebp - 0x442]
mov edx, dword [ebp - 0x18]
call fcn.0041a014
jmp 0x423726
mov ax, word [ebp - 0xe]
mov word [ebp - 0x442], ax
mov ax, word [ebp - 0xc]
mov word [ebp - 0x440], ax
mov word [ebp - 0x43e], 0
lea eax, [ebp - 0x442]
call fcn.00419fec
add eax, eax
lea edx, [ebp - 0x442]
add eax, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov word [eax], 0x5c
add dword [ebp - 0x18], 2
lea eax, [ebp - 0x442]
push eax
mov eax, dword [ebp - 0x18]
pop edx
sub eax, edx
sar eax, 1
jns 0x42375e
adc eax, 0
cdq
push edx
push eax
mov eax, dword [ebp - 0x20]
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
cmp edx, 0
jne 0x42377e
cmp eax, 0x208
jbe 0x42378c
jmp 0x423780
jle 0x42378c
mov dword [ebp - 8], 0xce
jmp 0x4238ca
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
call fcn.0041a014
mov word [ebp - 0x446], 0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x64c]
push eax
push 0x104
lea eax, [ebp - 0x442]
push eax
call sub.kernel32.dll_GetFullPathNameW
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4237d1
mov dword [ebp - 8], 5
jmp 0x4238ca
cmp dword [ebp - 0x18], 0
jne 0x4237ef
lea eax, [ebp - 0x64c]
call fcn.00419fec
add eax, eax
lea edx, [ebp - 0x64c]
add eax, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp word [eax], 0
jne 0x423819
lea eax, [ebp - 0x646]
cmp eax, dword [ebp - 0x18]
jae 0x423819
mov eax, dword [ebp - 0x18]
cmp word [eax - 2], 0x5c
jne 0x423819
sub dword [ebp - 0x18], 2
mov eax, dword [ebp - 0x18]
mov word [eax], 0
mov eax, dword [0x436a44]
cmp byte [eax], 0
je 0x423830
lea eax, [ebp - 0x64c]
xor edx, edx
call fcn.00423154
lea eax, [ebp - 0x64c]
push eax
call sub.kernel32.dll_GetFileAttributesW
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
je 0x42384e
test dword [ebp - 0x1c], 0x410
jne 0x42387a
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x423871
call sub.kernel32.dll_GetLastError_2
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 2
jne 0x423869
mov dword [ebp - 0x1c], 3
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], eax
jmp 0x4238ca
mov dword [ebp - 8], 0x10b
jmp 0x4238ca
mov ax, word [ebp - 0x12]
cmp ax, word [ebp - 0xe]
jne 0x42389e
lea eax, [ebp - 0x64c]
push eax
call sub.kernel32.dll_SetCurrentDirectoryW
test eax, eax
jne 0x42389e
call sub.kernel32.dll_GetLastError_2
mov dword [ebp - 8], eax
jmp 0x4238ca
lea edx, [ebp - 0x64c]
lea eax, [ebp - 0x10]
call fcn.00421324
test eax, eax
je 0x4238b9
mov dword [ebp - 8], 8
jmp 0x4238ca
mov eax, dword [0x436d4c]
xor edx, edx
call fcn.004230a8
xor eax, eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret