Function at 0x409820
Capabilities:
Check if file exists
Delete file
Extract resource via kernel32 functions
Get common file path
Get file attributes
Get program files directory
Print debug messages
Set current directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x53764d
mov eax, dword fs:[0]
push eax
sub esp, 0x6c8
mov eax, dword [0x596120]
xor eax, esp
mov dword [esp + 0x6c0], eax
push ebx
push esi
push edi
mov eax, dword [0x596120]
xor eax, esp
push eax
lea eax, [esp + 0x6d8]
mov dword fs:[0], eax
xor eax, eax
push 0x206
push eax
mov word [esp + 0x4cc], ax
lea eax, [esp + 0x4ce]
push eax
call fcn.00521b90
add esp, 0xc
lea eax, [esp + 0x4c4]
push 0
push 0x26
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [esp + 0x4c4]
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4098a0
sub ecx, edx
sar ecx, 1
cmp word [esp + ecx*2 + 0x4c2], 0x5c
je 0x4098d7
lea edi, [esp + 0x4c4]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x4098c4
mov eax, dword [0x578880]
mov dword [edi], eax
lea edi, [esp + 0x4c4]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4098e1
lea eax, [esp + 0x4c4]
mov ecx, 7
mov esi, str.JinDunPlayer_
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.004036b0
xor esi, esi
push esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.DATA
mov edi, eax
push 0x81
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x409955
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x409955
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x409955
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esp + 0x20], eax
mov ecx, dword [esi]
mov dword [esp + 0x4bc], ecx
mov cl, byte [esi + 4]
mov byte [esp + 0x4c0], cl
mov ecx, dword [esi + 5]
push ecx
mov dword [esp + 0x2c], ecx
call fcn.0040a01c
mov ecx, dword [esp + 0x24]
add esp, 4
add ecx, 0xfffffff7
mov dword [esp + 0x2c], eax
mov dword [esp + 0x38], ecx
lea ecx, [esp + 0x4bc]
push 5
push ecx
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esi + 9]
push ecx
lea ecx, [esp + 0x38]
push ecx
push eax
call fcn.00401020
test eax, eax
je 0x4099b6
push str.lzuncompr_play_x_
call fcn.004095b0
add esp, 4
lea eax, [esp + 0x4c4]
push eax
lea ecx, [esp + 0x18]
call fcn.00405270
mov dword [esp + 0x6e0], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
push eax
call fcn.00404b90
add esp, 4
lea ebx, [eax + 0x10]
mov dword [esp + 0x44], ebx
push ebx
mov byte [esp + 0x6e4], 1
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push str.VideoPlay.exe
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.00404030
mov esi, eax
add esp, 0xc
mov edx, dword [esi]
mov ecx, dword [edx - 0xc]
test ecx, ecx
je 0x409a3f
cmp ecx, 4
jl 0x409a3f
push 0x20
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x409a37
push 0x578800
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [esp + 0x1c]
or edi, 0xffffffff
add edx, 0xfffffff0
mov eax, edi
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x409a5f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esp + 0x28]
push 0x340
mov dword [esp + 0x20], eax
call fcn.00409fef
mov esi, eax
add esp, 4
test esi, esi
je 0x409a93
mov dword [esi], 0
mov dword [esi + 4], 0xffffffff
mov dword [esi + 0x134], 0xffffffff
jmp 0x409a95
xor esi, esi
push ecx
push dword [esp + 0x20]
mov ecx, esi
push dword [esp + 0x34]
call fcn.00408900
mov dword [0x5a1230], eax
test eax, eax
je 0x409ac9
push esi
call fcn.0040a025
add esp, 4
xor esi, esi
mov dword [esp + 0x18], esi
push str.uzp_failed_
call fcn.004095b0
jmp 0x409adf
push 8
call fcn.00409fef
mov dword [esp + 0x1c], eax
mov dword [eax + 4], esi
mov esi, eax
mov dword [eax], 1
add esp, 4
lea eax, [esp + 0x5c]
mov edx, edi
mov ecx, esi
push eax
call fcn.00409490
mov eax, dword [esp + 0x60]
xor edi, edi
add esp, 4
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edi
test eax, eax
jle 0x409d6a
lea esp, [esp]
lea eax, [esp + 0x5c]
mov edx, edi
push eax
mov ecx, esi
call fcn.00409490
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call fcn.0040ae72
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x409e5c
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x60]
mov byte [esp + 0x6e0], 2
push eax
push edi
lea eax, [esp + 0x24]
push str.i__d__name_ws
push eax
call fcn.00404b20
mov edi, dword [esp + 0x2c]
push edi
call fcn.004095b0
add esp, 0x14
call fcn.0040ae72
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x409e5c
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x10], esi
lea eax, [esp + 0x60]
mov byte [esp + 0x6e0], 3
test eax, 0xffff0000
jne 0x409bca
movzx eax, ax
push eax
call fcn.0040aaef
test eax, eax
je 0x409bf3
lea edx, [esp + 0x60]
movzx ecx, dx
push ecx
push eax
lea ecx, [esp + 0x18]
call fcn.00404e20
jmp 0x409bef
lea ecx, [esp + 0x60]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409bd1
sub ecx, edx
lea eax, [esp + 0x60]
sar ecx, 1
push ecx
push eax
lea ecx, [esp + 0x18]
call fcn.00405170
mov esi, dword [esp + 0x10]
push esi
mov byte [esp + 0x6e4], 2
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x409c11
mov dword [esp + 0x10], 0
jmp 0x409c20
not al
movzx edx, al
shr edx, 4
and edx, 1
mov dword [esp + 0x10], edx
add esi, 0xfffffff0
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409c3a
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [esp + 0x10], 0
je 0x409df3
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x38]
push eax
call fcn.00404030
add esp, 0xc
mov byte [esp + 0x6e0], 4
lea ecx, [esp + 0x48]
mov esi, dword [eax]
xorps xmm0, xmm0
movlpd qword [esp + 0x28c], xmm0
movlpd qword [esp + 0x294], xmm0
movlpd qword [esp + 0x29c], xmm0
call fcn.0040afe0
push 0
lea eax, [esp + 0x290]
mov byte [esp + 0x6e4], 5
push eax
push esi
call fcn.0040c48f
lea ecx, [esp + 0x48]
test eax, eax
je 0x409cd6
mov eax, dword [esp + 0x2a4]
mov esi, dword [esp + 0x2a8]
mov dword [esp + 0x10], eax
mov byte [esp + 0x6e0], 4
call fcn.0040b056
mov dword [esp + 0x40], esi
mov esi, dword [esp + 0x10]
jmp 0x409cf0
mov byte [esp + 0x6e0], 4
call fcn.0040b056
xorps xmm0, xmm0
movlpd qword [esp + 0x3c], xmm0
mov esi, dword [esp + 0x3c]
mov byte [esp + 0x6e0], 2
or ecx, 0xffffffff
mov edx, dword [esp + 0x30]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409d16
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esp + 0x60]
push eax
cmp esi, dword [esp + 0x28c]
jne 0x409d81
push str._____no_ned_upt__ws
call fcn.004095b0
add edi, 0xfffffff0
mov byte [esp + 0x6e8], 1
add esp, 8
or ecx, 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409d53
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
inc edi
mov dword [esp + 0x20], edi
cmp edi, dword [esp + 0x24]
jl 0x409b10
test esi, esi
jne 0x409e66
mov dword [0x5a1230], 0x10000
jmp 0x409ef5
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.00404030
mov esi, eax
add esp, 0xc
mov edx, dword [esi]
mov ecx, dword [edx - 0xc]
test ecx, ecx
je 0x409dc3
cmp ecx, 4
jl 0x409dc3
push 0x20
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x409dbb
push 0x578800
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [esp + 0x34]
or ecx, 0xffffffff
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409de1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esp + 0x60]
push eax
push str.wil_udt__ws
call fcn.004095b0
add esp, 8
mov esi, dword [esp + 0x18]
test esi, esi
jne 0x409e07
mov dword [0x5a1230], 0x10000
jmp 0x409e31
cmp dword [esi], 1
je 0x409e18
mov dword [0x5a1230], 0x80000
jmp 0x409e31
mov ecx, dword [esi + 4]
lea eax, [esp + 0x60]
sub esp, 8
push eax
push dword [esp + 0x2c]
call fcn.00409170
mov dword [0x5a1230], eax
add edi, 0xfffffff0
mov byte [esp + 0x6e0], 1
or ecx, 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409d57
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x409d57
push 0x80004005
call fcn.00405120
cmp dword [esi], 1
je 0x409e77
mov dword [0x5a1230], 0x80000
jmp 0x409ef5
mov esi, dword [esi + 4]
cmp dword [esi + 4], 0xffffffff
je 0x409e87
mov ecx, dword [esi]
call fcn.00408880
mov edi, dword [esi]
mov dword [esi + 4], 0xffffffff
test edi, edi
je 0x409ecf
cmp dword [edi + 0x7c], 0
je 0x409ea1
mov ecx, edi
call fcn.00408880
mov eax, dword [edi]
mov dword [esp + 0x24], eax
test eax, eax
je 0x409ec6
cmp byte [eax], 0
je 0x409ebd
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x24]
push eax
call fcn.0040a025
add esp, 4
push edi
call fcn.00520f94
add esp, 4
push esi
mov dword [esi], 0
mov dword [0x5a1230], 0
call fcn.0040a025
mov eax, dword [esp + 0x1c]
add esp, 4
push eax
call fcn.0040a025
add esp, 4
push dword [esp + 0x2c]
call fcn.0040a025
add esp, 4
push 6
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push str.VideoPlay.exe
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.00404030
add esp, 0xc
mov byte [esp + 0x6e0], 6
push dword [esp + 0x14]
push ecx
mov ecx, dword [eax]
call fcn.004096c0
mov byte [esp + 0x6e8], 1
or esi, 0xffffffff
mov edx, dword [esp + 0x2c]
add esp, 8
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409f63
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add ebx, 0xfffffff0
mov byte [esp + 0x6e0], 0
mov ecx, esi
lea eax, [ebx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x409f84
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [esp + 0x6e0], 0xffffffff
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x409faa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, 1
mov ecx, dword [esp + 0x6d8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6c0]
xor ecx, esp
call fcn.0051ef35
mov esp, ebp
pop ebp
ret