Function at 0x4317b0
Capabilities:
Check if file exists
Check mutex on windows
Delete file
Get file attributes
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d357a
mov eax, dword fs:[0]
push eax
sub esp, 0x504
mov eax, dword [0x64c00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x4ec], ebx
mov eax, dword fs:[0x2c]
mov esi, dword [eax]
mov eax, dword [0x65cc38]
cmp eax, dword [esi + 4]
jle 0x43183e
push 0x65cc38
call fcn.00483c2d
add esp, 4
cmp dword [0x65cc38], 0xffffffff
jne 0x43183e
mov dword [ebp - 4], 0
call fcn.00414990
push 0x5d7c10
call fcn.00484084
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0x65cc38
call fcn.00483be3
add esp, 4
lea eax, [ebp - 0x4f4]
mov ecx, 0x65cc40
push eax
call fcn.00413a30
mov dword [ebp - 4], 1
push dword [ebp - 0x4f4]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, eax
mov dword [ebp - method.KEvent.virtual_0], vtable.KEvent.0
mov dword [ebp - 0x504], edi
mov dword [ebp - 0x508], edi
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
jne 0x431958
cmp eax, 5
je 0x431963
lea ecx, [ebp - 0x4f0]
call fcn.0044cb50
push dword [eax]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [ebp - 0x4f0]
or edi, 0xffffffff
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4318cc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.pre_download
mov ecx, ebx
call fcn.0040efd0
test eax, eax
jne 0x431c7c
mov eax, dword [0x65cc38]
cmp eax, dword [esi + 4]
jle 0x43192a
push 0x65cc38
call fcn.00483c2d
add esp, 4
cmp dword [0x65cc38], 0xffffffff
jne 0x43192a
mov byte [ebp - 4], 6
call fcn.00414990
push 0x5d7c10
call fcn.00484084
add esp, 4
mov byte [ebp - 4], 2
push 0x65cc38
call fcn.00483be3
add esp, 4
lea eax, [ebp - 0x4e4]
mov ecx, 0x65cc40
push eax
call fcn.004127f0
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x4e4]
cmp dword [edx - 0xc], 0
jne 0x431c12
mov byte [ebp - 4], 2
jmp 0x431c65
cmp eax, 0xb7
jne 0x431899
lea ecx, [ebp - 0x4e8]
call fcn.004792d0
push 0
push dword [eax]
call dword [sym.imp.USER32.dll_FindWindowW]
mov edx, dword [ebp - 0x4e8]
or edi, 0xffffffff
mov esi, eax
add edx, 0xfffffff0
mov ecx, edi
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x43199a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
test esi, esi
je 0x4319d5
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4319d5
lea eax, [ebp - 0x500]
mov dword [ebp - 0x4f8], 0
push eax
push 0x104
push 0x4a
xorps xmm0, xmm0
push esi
movq qword [ebp - 0x500], xmm0
call ebx
lea ecx, [ebp - 0x4e8]
call fcn.0047d950
push 0
push dword [eax]
call dword [sym.imp.USER32.dll_FindWindowW]
mov edx, dword [ebp - 0x4e8]
mov esi, eax
add edx, 0xfffffff0
mov ecx, edi
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x431a09
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
je 0x431a32
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
mov dword [ebp - 0x500], eax
lea eax, [ebp - 0x500]
push eax
push 0x104
push 0x4a
push esi
movlpd qword [ebp - 0x4fc], xmm0
call ebx
lea ecx, [ebp - 0x4e8]
call fcn.00481e40
push 0
push dword [eax]
call dword [sym.imp.USER32.dll_FindWindowW]
mov edx, dword [ebp - 0x4e8]
mov esi, eax
mov dword [ebp - 0x4f0], esi
add edx, 0xfffffff0
mov ecx, edi
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x431a6c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.00405800
mov ecx, eax
test ecx, ecx
je 0x431e2e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x4e4], eax
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
lea eax, [ebp - 0x4e4]
push str.KDownloadFuncDlg_NotifyCopyData_hwnd:_d__errcode:_d
push eax
call fcn.00408c40
mov esi, dword [ebp - 0x4e4]
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 0x4f0]
test ecx, ecx
je 0x431ae5
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
mov dword [ebp - 0x500], eax
lea eax, [ebp - 0x500]
push eax
push 0x104
push 0x4a
push ecx
movlpd qword [ebp - 0x4fc], xmm0
call ebx
mov byte [ebp - 4], 2
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x431b00
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x4e4]
call fcn.0044cce0
mov byte [ebp - 4], 4
push dword [ebp - 0x4e4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x431b24
test al, 0x10
je 0x431b37
mov ecx, dword [ebp - 0x4e4]
call fcn.0044c8f0
test eax, eax
je 0x431bda
mov ebx, dword [ebp - 0x4ec]
lea eax, [ebp - 0x4e8]
push eax
mov ecx, ebx
call fcn.004324c0
push 0
push str.exe_param
lea eax, [ebp - 0x4ec]
mov byte [ebp - 4], 5
push eax
mov ecx, ebx
call fcn.0040f190
push dword [ebp - 0x4e4]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push dword [ebp - 0x4e8]
push 0x6380a0
push 0x6380a8
call esi
push dword [ebp - 0x4e4]
push dword [ebp - 0x4ec]
push 0x6380b0
push 0x6380a8
call esi
mov edx, dword [ebp - 0x4ec]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x431bb7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
mov eax, edi
mov edx, dword [ebp - 0x4e8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x431be0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x431be0
mov ebx, dword [ebp - 0x4ec]
mov byte [ebp - 4], 2
mov eax, edi
mov edx, dword [ebp - 0x4e4]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x431c01
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, ebx
call fcn.0042f9e0
mov esi, 5
jmp 0x431dd7
lea ecx, [ebp - 0x4e8]
call fcn.00410cd0
push dword [ebp - 0x4e8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edx, dword [ebp - 0x4e8]
cmp eax, 0xffffffff
mov eax, edi
setne bl
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x431c4c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, bl
je 0x431c5b
mov ecx, dword [ebp - 0x4e4]
call fcn.0044b920
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x4e4]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x431c7c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp - 0x4ec]
push ebx
call fcn.00431e40
mov esi, eax
test esi, esi
jne 0x431cde
mov ecx, dword [ebp - 0x4ec]
lea eax, [ebp - 0x4f0]
push eax
call fcn.004324c0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x431cbc
mov esi, 1
test al, 0x10
je 0x431cc1
mov esi, 2
mov edx, dword [ebp - 0x4f0]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x431cde
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.00451de0
test ebx, ebx
je 0x431dd7
cmp esi, 2
jne 0x431dd7
push ecx
lea ecx, [ebp - 0x4e0]
call fcn.00480e80
lea eax, [ebp - 0x50]
mov dword [ebp - method.ShadowDlg_class_KDownloadDlg_.virtual_0], vtable.ShadowDlg_class_KDownloadFailDlg_.0
mov dword [ebp - 0x88], eax
lea eax, [ebp - 0x30]
push eax
mov dword [ebp - 0x50], vtable.ShadowDlg_class_KDownloadFailDlg_.1.0
mov dword [ebp - 0xb8], 0
mov dword [ebp - 0x98], 0x1c
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [ebp - 0x50]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x44], 0x989680
mov dword [ebp - 0x48], 0
mov dword [ebp - method.KDownloadFailDlg.1.virtual_0], vtable.KDownloadFailDlg.1.0
mov dword [ebp - 0x50], vtable.KDownloadFailDlg.0
mov dword [ebp - 0xb8], 0
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x98], 0x1c
sub esp, 8
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x4e0]
call fcn.00434090
lea ecx, [ebp - 0x4c]
mov dword [ebp - method.KDownloadFailDlg.1.virtual_0], vtable.KDownloadFailDlg.1.0
mov dword [ebp - 0x50], vtable.KDownloadFailDlg.0
call fcn.00432bb0
lea ecx, [ebp - 0x4e0]
mov dword [ebp - method.ShadowDlg_class_KDownloadDlg_.virtual_0], vtable.ShadowDlg_class_KDownloadFailDlg_.0
mov dword [ebp - 0x50], vtable.ShadowDlg_class_KDownloadFailDlg_.1.0
call fcn.004338a0
mov eax, dword [ebp - 0x504]
mov byte [ebp - 4], 9
test eax, eax
je 0x431dec
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x4f4]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
jg 0x431e0e
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00483ab6
mov esp, ebp
pop ebp
ret 8
push 0x80004005
call fcn.00405600
int3