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

Disassembly:
sub esp, 0x440
push ebp
push esi
push edi
mov edi, dword [esp + 0x458]
cmp edi, 1
je 0x45553f
mov byte [esp + 0xf], 0
cmp edi, 2
jne 0x455544
mov byte [esp + 0xf], 1
mov edx, dword [esp + 0x450]
mov esi, dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x38]
push ecx
push 0x104
push edx
call esi
lea eax, [esp + 0x34]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x455570
sub eax, edx
sar eax, 1
je 0x455592
cmp word [esp + eax*2 + 0x32], 0x5c
lea eax, [esp + eax*2 + 0x32]
jne 0x455592
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [esp + 0x454]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x244]
push eax
push 0x104
push ecx
call esi
lea eax, [esp + 0x240]
lea edx, [eax + 2]
jmp 0x4555c0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4555c0
sub eax, edx
sar eax, 1
je 0x4555e8
cmp word [esp + eax*2 + 0x23e], 0x5c
lea eax, [esp + eax*2 + 0x23e]
jne 0x4555e8
xor edx, edx
mov word [eax], dx
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [esp + 0x34]
push eax
call ebp
cmp eax, 0xffffffff
je 0x4555fe
test al, 0x10
jne 0x45560a
pop edi
pop esi
xor al, al
pop ebp
add esp, 0x440
ret
push ebx
mov bl, byte [esp + 0x460]
test bl, bl
je 0x4556a9
movzx esi, word [esp + 0x38]
test esi, 0xffffff80
jne 0x455639
push 1
push esi
call fcn.00490ebe
add esp, 8
test eax, eax
je 0x455639
or esi, 0x20
movzx edi, word [esp + 0x244]
test edi, 0xffffff80
jne 0x45565b
push 1
push edi
call fcn.00490ebe
add esp, 8
test eax, eax
je 0x45565b
or edi, 0x20
cmp si, di
jne 0x455668
cmp word [esp + 0x3a], 0x3a
je 0x4556a2
movzx ecx, byte [esp + 0x13]
push 0
push ecx
lea edx, [esp + 0x24c]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00455520
add esp, 0x10
test al, al
je 0x4556ea
push 1
lea eax, [esp + 0x3c]
call fcn.004557e0
add esp, 4
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x440
ret
mov edi, dword [esp + 0x45c]
lea ecx, [esp + 0x244]
push ecx
call ebp
cmp eax, 0xffffffff
je 0x4556d0
test al, 0x10
je 0x4556ea
cmp byte [esp + 0x13], 0
jne 0x4556f7
pop ebx
pop edi
pop esi
xor al, al
pop ebp
add esp, 0x440
ret
test bl, bl
jne 0x45572a
lea edx, [esp + 0x244]
push 0
push edx
call fcn.004428e0
add esp, 8
test al, al
jne 0x4556fb
pop ebx
pop edi
pop esi
xor al, al
pop ebp
add esp, 0x440
ret
test bl, bl
jne 0x45572a
lea eax, [esp + 0x38]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x455702
mov ecx, dword [0x4ae700]
mov edx, dword [0x4ae704]
mov dword [eax], ecx
mov cx, word [0x4ae708]
mov dword [eax + 4], edx
mov word [eax + 8], cx
lea eax, [esp + 0x38]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x455731
sub eax, edx
sar eax, 1
xor edx, edx
mov word [esp + eax*2 + 0x3a], dx
lea eax, [esp + 0x244]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x455751
sub eax, edx
sar eax, 1
xor ecx, ecx
mov word [esp + eax*2 + 0x246], cx
xor eax, eax
test bl, bl
mov dword [esp + 0x18], ecx
sete cl
lea edx, [esp + 0x38]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov word [esp + 0x34], ax
mov dword [esp + 0x20], edx
inc ecx
lea eax, [esp + 0x244]
mov edx, 0x614
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], ecx
mov word [esp + 0x28], dx
cmp edi, 2
jne 0x4557c3
mov eax, 0x615
mov word [esp + 0x28], ax
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
pop ebx
neg eax
pop edi
sbb eax, eax
pop esi
inc eax
pop ebp
add esp, 0x440
ret