Function at 0x5415d0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x103c
call fcn.005d9b90
mov eax, dword [0x67f864]
xor eax, esp
mov dword [esp + 0x1038], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov ebx, ecx
lea ecx, [esp + 0x838]
push ecx
lea edx, [esp + 0xc3c]
push edx
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x24]
push edx
xor edi, edi
push eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], 1
mov word [esp + 0x234], di
call fcn.005d41fa
lea eax, [esp + 0x34]
add esp, 0x14
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x541636
sub eax, edx
sar eax, 1
je 0x5418ea
mov cx, word [esp + 0x18]
cmp cx, di
mov ax, word [esp + 0x20]
lea esi, [esp + 0x20]
jne 0x5416a5
cmp ax, 0x5c
je 0x54166a
cmp ax, 0x2f
jne 0x5416a5
cmp word [esp + 0x22], ax
jne 0x5416a5
lea eax, [esp + 0x24]
push 0x645010
push eax
call fcn.005d466c
mov esi, eax
add esp, 8
cmp esi, edi
je 0x5418ea
lea edx, [esp + 0x20]
mov ecx, esi
sub ecx, edx
sar ecx, 1
push ecx
mov eax, edx
push eax
lea ecx, [esp + 0x228]
push ecx
jmp 0x541702
cmp ax, 0x5c
je 0x5416b1
cmp ax, 0x2f
jne 0x54170a
cmp cx, ax
jne 0x54170a
cmp word [esp + 0x1a], di
jne 0x54170a
lea edx, [esp + 0x22]
push 0x645010
push edx
mov word [esp + 0x20], di
mov word [esp + 0x228], ax
mov word [esp + 0x22a], di
call fcn.005d466c
mov esi, eax
add esp, 8
cmp esi, edi
je 0x5418ea
lea ecx, [esp + 0x20]
sub eax, ecx
sar eax, 1
push eax
mov edx, ecx
push edx
lea eax, [esp + 0x228]
push eax
call fcn.005d49c0
add esp, 0xc
lea ecx, [esi + 2]
push 0x645010
push ecx
call fcn.005d466c
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0xc], edi
je 0x541729
sub eax, esi
jmp 0x54173d
mov eax, esi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x541730
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x224]
push esi
push edx
call fcn.005d49c0
add esp, 0xc
push 0x6382f0
push 0x6382f0
lea eax, [esp + 0x228]
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x438]
push edx
call fcn.005d435f
add esp, 0x14
lea eax, [esp + 0x428]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x541793
test al, 0x10
jne 0x5418dc
lea eax, [esp + 0x428]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x5417a0
sub eax, edx
sar eax, 1
test eax, eax
jle 0x5417ce
lea ecx, [esp + eax*2 + 0x426]
movzx eax, word [ecx]
cmp ax, 0x5c
je 0x5417c9
cmp ax, 0x2f
jne 0x5417ce
mov word [ecx], 0
lea eax, [esp + 0x428]
add eax, 0xfffffffe
jmp 0x5417e0
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x5417e0
mov ecx, dword [str..lnk]
mov edx, dword [0x64501c]
mov dword [eax], ecx
mov cx, word [0x645020]
mov dword [eax + 4], edx
lea ebx, [esp + 0xe38]
lea edi, [esp + 0x428]
mov word [eax + 8], cx
call fcn.005419b0
test eax, eax
je 0x541955
push 0
lea edx, [esp + 0xa3c]
push edx
lea eax, [esp + 0x228]
push eax
lea ecx, [esp + 0x24]
push ecx
mov edx, ebx
push edx
call fcn.005d41fa
lea eax, [esp + 0xa4c]
add esp, 0x14
mov edx, eax
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x541850
lea edi, [esp + 0x220]
sub eax, edx
add edi, 0xfffffffe
jmp 0x541870
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x541870
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x220]
rep movsb byte es:[edi], byte [esi]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x541896
sub eax, edx
sar eax, 1
je 0x5418bb
movzx eax, word [esp + eax*2 + 0x426]
cmp ax, 0x5c
je 0x5418d8
cmp ax, 0x2f
je 0x5418d8
lea edi, [esp + 0x428]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x5418c5
mov eax, dword [0x639920]
mov dword [edi], eax
mov edi, dword [esp + 0xc]
test edi, edi
mov esi, edi
jne 0x54170a
mov ebx, dword [esp + 0x14]
lea ecx, [esp + 0x838]
push ecx
lea edx, [esp + 0xc3c]
push edx
lea eax, [esp + 0x228]
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x640]
push edx
call fcn.005d435f
add esp, 0x14
lea eax, [esp + 0x838]
push str..lnk
push eax
call fcn.005d39f7
add esp, 8
test eax, eax
jne 0x54196c
lea edi, [esp + 0x630]
call fcn.005419b0
mov dword [esp + 0x10], eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1038]
xor ecx, esp
call fcn.005ce60a
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1038]
xor ecx, esp
call fcn.005ce60a
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x630]
mov edx, ebx
mov ecx, eax
sub edx, ecx
lea esp, [esp]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, di
jne 0x541980
mov ecx, dword [esp + 0x1044]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005ce60a
mov esp, ebp
pop ebp
ret