Function at 0x5c6220
Capabilities:
Check if file exists
Copy file
Get file attributes
Get file size
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6661b2
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x699d0
call fcn.00621970
mov eax, dword [0x758898]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x699e0], esi
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp byte [esi + 0xaf9], bl
jne 0x5c6b2f
cmp byte [esi + 0xafa], bl
jne 0x5c6b2f
mov eax, dword [esi + 0x4f8]
cmp eax, ebx
je 0x5c628e
push eax
lea ecx, [esi + 0x20]
call fcn.005d0660
push esi
call fcn.004b7cc0
add esp, 4
mov edx, dword [esi + 0x4f8]
cmp edx, ebx
jne 0x5c6625
cmp byte [esi + 0xaea], bl
je 0x5c6625
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x24], ebx
xor eax, eax
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 1
push ebx
mov ecx, dword [esi + 0x4c]
push ecx
push 0x678ea8
lea ecx, [ebp - 0x2c]
call fcn.004021c0
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
jne 0x5c62dd
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x5c644c
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
jne 0x5c62f7
lea eax, [ebp - 0x28]
push 0x5c
add eax, 6
push eax
call fcn.00621db0
add esp, 8
mov edi, eax
cmp edi, ebx
je 0x5c644c
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
jne 0x5c6319
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x20]
call fcn.00402190
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x20]
cmp eax, ebx
mov ecx, eax
jne 0x5c6332
lea ecx, [ebp - 0x1c]
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
jne 0x5c633c
lea eax, [ebp - 0x28]
mov edx, edi
sub edx, eax
sar edx, 1
xor eax, eax
mov word [ecx + edx*2], ax
mov eax, dword [ebp - 0x20]
cmp eax, ebx
jne 0x5c6352
lea eax, [ebp - 0x1c]
push 1
push eax
call fcn.004ab030
add esp, 8
test eax, eax
jne 0x5c642b
mov eax, dword [ebp - 0x20]
cmp eax, ebx
jne 0x5c636f
lea eax, [ebp - 0x1c]
push 1
push eax
call fcn.004ab210
add esp, 8
test eax, eax
jne 0x5c642b
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x30], ebx
xor ecx, ecx
mov word [ebp - 0x34], cx
mov byte [ebp - 4], 3
push ebx
push ebx
lea edx, [ebp - 0x699d0]
push edx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov eax, dword [0x75dd28]
push eax
mov ecx, dword [ebp - 0x699d0]
push ecx
mov edx, dword [0x75ed3c]
push edx
lea ecx, [ebp - 0x38]
call fcn.004021c0
mov eax, dword [ebp - 0x699d0]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x2c]
cmp ecx, ebx
jne 0x5c63e6
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 0x38]
cmp eax, ebx
jne 0x5c63f0
lea eax, [ebp - 0x34]
push 0x30
push ecx
push eax
push ebx
call fcn.00473410
add esp, 0x10
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x38]
call fcn.00401210
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x20]
call fcn.00401210
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.00401210
mov eax, 0x7546
jmp 0x5c6bc6
push 0x5c
add edi, 2
push edi
call fcn.00621db0
add esp, 8
mov edi, eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x20]
call fcn.00401210
jmp 0x5c6307
cmp dword [esi + 0xae0], ebx
je 0x5c6617
cmp dword [esi + 0xae4], ebx
je 0x5c6617
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x699d4]
push edx
push ebx
push 0xf003f
push ebx
push 0x67997c
push ebx
push str.SoftwareDownloadManagerGrabberStsProjects_
push 0x80000001
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
call edi
cmp eax, ebx
jne 0x5c6617
mov eax, dword [ebp - 0x699d4]
push eax
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call ebx
lea ecx, [ebp - 0x699d0]
call fcn.00402510
mov byte [ebp - 4], 4
mov ecx, dword [esi + 0xae0]
push ecx
push str.SoftwareDownloadManagerGrabberStsProjects_ld_
lea edx, [ebp - 0x699d0]
push edx
call fcn.00402f80
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x699d4]
push ecx
push 0
push 0xf003f
push 0
push 0x67997c
push 0
mov edx, dword [ebp - 0x699d0]
push edx
push 0x80000001
call edi
test eax, eax
jne 0x5c6606
mov eax, dword [ebp - 0x699d4]
push eax
call ebx
mov ecx, dword [esi + 0xae4]
push ecx
mov edx, dword [esi + 0xae0]
push edx
push str.SoftwareDownloadManagerGrabberStsProjects_ld_ld_
lea eax, [ebp - 0x699d0]
push eax
call fcn.00402f80
add esp, 0x10
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x699d4]
push edx
push 0
push 0xf003f
push 0
push 0x67997c
push 0
mov eax, dword [ebp - 0x699d0]
push eax
push 0x80000001
call edi
test eax, eax
jne 0x5c6606
mov edx, dword [esi + 0x50]
mov eax, edx
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x5c6564
sub eax, edi
sar eax, 1
lea ecx, [eax + eax + 1]
push ecx
push edx
push 1
push 0
push 0x687b9c
mov edx, dword [ebp - 0x699d4]
push edx
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
call edi
mov ecx, dword [esi + 0x4c]
mov eax, ecx
lea edx, [eax + 2]
lea esp, [esp]
mov bx, word [eax]
add eax, 2
test bx, bx
jne 0x5c65a0
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 1]
push eax
push ecx
push 1
push 0
push str.LocalPath
mov ecx, dword [ebp - 0x699d4]
push ecx
call edi
lea ecx, [esi + 0x530]
mov eax, ecx
lea ebx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x5c65d2
sub eax, ebx
sar eax, 1
lea edx, [eax + eax + 1]
push edx
push ecx
push 1
push 0
push str.LogFileName
mov eax, dword [ebp - 0x699d4]
push eax
call edi
mov ecx, dword [ebp - 0x699d4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x699d0]
call fcn.00402580
xor ebx, ebx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.00401210
jmp 0x5c6659
mov al, byte [esi + 0xad0]
test al, al
je 0x5c6637
mov ecx, dword [esi + 0xae4]
jmp 0x5c6639
xor ecx, ecx
test al, al
je 0x5c6645
mov eax, dword [esi + 0xae0]
jmp 0x5c6647
xor eax, eax
push ecx
push eax
push edx
lea ecx, [esi + 0x20]
call fcn.005d3980
mov byte [esi + 0xaea], 1
lea ecx, [esi + 0x20]
mov edx, dword [esi + 0x4f8]
push edx
call fcn.005cf0a0
mov eax, dword [esi + 0x14]
cmp eax, ebx
je 0x5c6687
mov ecx, dword [esi + 0x4f8]
push ecx
push 0x13cd
push 0x111
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov dword [esi + 0xacc], ebx
mov dword [esi + 0xadc], ebx
push 1
mov ecx, esi
call fcn.005b6e00
lea ecx, [esi + 0x52c]
call fcn.0056abe0
cmp byte [esi + 0xaee], 0
jne 0x5c66d1
cmp dword [esi + 4], ebx
jne 0x5c66c9
cmp dword [esi + 8], ebx
jne 0x5c66c9
mov ecx, esi
call fcn.005b7a40
test eax, eax
je 0x5c66c9
mov al, 1
jmp 0x5c66cb
xor al, al
mov byte [esi + 0xaed], al
mov eax, dword [esi + 0x38]
cmp eax, ebx
je 0x5c66f2
lea edx, [eax + 1]
jmp 0x5c66e0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5c66e0
sub eax, edx
mov dword [ebp - 0x18], eax
jne 0x5c682e
mov eax, dword [esi + 0x44]
cmp eax, 2
je 0x5c6703
cmp eax, 1
jne 0x5c682e
xor bl, bl
mov byte [ebp - 0x699d5], bl
mov eax, dword [esi + 0x24]
test eax, eax
je 0x5c6741
push str._simtelnet_
push eax
call fcn.006218e0
add esp, 8
test eax, eax
je 0x5c6741
mov eax, dword [esi + 0x20]
push str.simtel.net
push eax
call fcn.006218e0
add esp, 8
test eax, eax
jne 0x5c6741
mov bl, 1
mov byte [ebp - 0x699d5], bl
test dword [esi + 0x17c], 0x80000
jne 0x5c682e
test bl, bl
jne 0x5c682e
cmp dword [esi + 0xad4], 0
jne 0x5c682e
lea ecx, [ebp - 0x699d0]
call fcn.00402510
mov byte [ebp - 4], 5
mov eax, dword [esi + 0x34]
cmp eax, 0x50
jne 0x5c6783
cmp dword [esi + 0x44], 1
je 0x5c6790
cmp eax, 0x1bb
jne 0x5c67a3
cmp dword [esi + 0x44], 2
jne 0x5c67a3
push 0x67997c
lea edx, [ebp - 0x1c]
push edx
call fcn.0062311b
add esp, 8
jmp 0x5c67b5
push eax
push str.:_ld
lea eax, [ebp - 0x1c]
push eax
call fcn.0062311b
add esp, 0xc
mov eax, dword [esi + 0x24]
test eax, eax
mov edx, eax
jne 0x5c67c5
mov edx, 0x67997c
jmp 0x5c67cf
cmp byte [eax], 0x2f
mov ecx, 0x67997c
je 0x5c67d4
mov ecx, 0x67e070
cmp dword [esi + 0x44], 1
mov eax, 0x67a490
je 0x5c67e4
mov eax, 0x679be4
push edx
push ecx
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [esi + 0x20]
push edx
push eax
push str._s:___s_s_s_s
lea eax, [ebp - 0x699d0]
push eax
call fcn.00402f80
add esp, 0x1c
mov ecx, dword [ebp - 0x699d0]
push ecx
mov ecx, esi
call fcn.005b7780
mov byte [esi + 0x372], 1
mov byte [esi + 0x373], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x699d0]
call fcn.00402580
mov byte [esi + 0x371], 0
xor ebx, ebx
mov dword [esi + 0xcc], ebx
mov byte [ebp - 0x699c9], bl
cmp dword [esi + 0xb14], ebx
je 0x5c6853
mov eax, dword [esi + 0xb14]
jmp 0x5c6859
lea eax, [esi + 0xb18]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x5c6860
sub eax, edx
sar eax, 1
je 0x5c6adf
cmp dword [esi + 0xb14], ebx
je 0x5c6885
mov eax, dword [esi + 0xb14]
jmp 0x5c688b
lea eax, [esi + 0xb18]
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x5c6adf
lea edx, [ebp - 0x18]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x500], eax
mov dword [esi + 0x504], ebx
cmp eax, 0xffffffff
jne 0x5c68e1
cmp ebx, ebx
jne 0x5c68e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
je 0x5c68e1
mov dword [esi + 0x500], ebx
mov dword [esi + 0x504], ebx
jmp 0x5c68fa
push 1
push ebx
push ebx
mov eax, dword [ebp - 0x18]
push eax
call fcn.00624b80
add dword [esi + 0x500], eax
adc dword [esi + 0x504], edx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push fcn.005db390
push fcn.0057ec30
push 0x20
push 0x3488
lea ecx, [ebp - 0x699c8]
push ecx
call fcn.00622939
mov byte [ebp - 4], 6
mov edx, dword [esi]
push edx
lea eax, [esi + 0x52c]
push eax
lea eax, [esi + 0x20]
push eax
lea eax, [ebp - 0x699c8]
push eax
lea ecx, [esi + 0x95c]
push ecx
lea ecx, [ebp - 0x8c8]
call fcn.005912f0
mov byte [ebp - 4], 7
mov dword [ebp - 0x668], esi
lea edi, [esi + 0x10]
mov dword [ebp - 0x8b8], edi
mov dword [ebp - 0x7c8], edi
lea eax, [esi + 0x14]
mov dword [ebp - 0x8b4], eax
lea edx, [esi + 0x18]
mov dword [ebp - 0x8b0], edx
mov eax, dword [esi + 0xad4]
push eax
mov ecx, dword [esi + 0xad8]
push ecx
mov edx, dword [esi + 0xae4]
push edx
mov eax, dword [esi + 0xae0]
push eax
xor ecx, ecx
cmp byte [esi + 0xad0], cl
sete cl
push ecx
mov edx, dword [esi + 0x4f8]
push edx
lea ecx, [ebp - 0x8c8]
call fcn.005b5030
push 1
mov eax, dword [esi + 0x504]
push eax
mov ecx, dword [esi + 0x500]
push ecx
lea ecx, [ebp - 0x8c8]
call fcn.005b5320
cmp byte [esi + 0xad0], 0
je 0x5c69ea
mov dword [esi + 0xacc], ebx
mov dword [ebp - 0x699dc], ebx
mov byte [ebp - 0x699c9], 1
jmp 0x5c6aab
cmp dword [esi + 0xb14], ebx
je 0x5c69fa
mov eax, dword [esi + 0xb14]
jmp 0x5c6a00
lea eax, [esi + 0xb18]
push ebx
mov edx, dword [esi + 0x50]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x5c6a99
mov ebx, dword [esi + 0x500]
mov eax, dword [esi + 0x504]
push eax
push ebx
lea ecx, [ebp - 0x8c8]
call fcn.00577120
mov dword [esi + 0xacc], 0
mov dword [esi + 0x508], ebx
mov eax, dword [esi + 0x504]
mov dword [esi + 0x50c], eax
push 0
lea ecx, [ebp - 0x8c8]
call fcn.005b4020
mov dword [ebp - 0x699dc], 0
mov byte [ebp - 0x699c9], 1
mov dword [esi + 0x954], 3
cmp dword [esi + 0x5c], 0
je 0x5c6a99
mov edi, dword [edi]
test edi, edi
je 0x5c6a90
push 0
push 0x1472
push 0x111
push edi
call dword [sym.imp.USER32.dll_SendMessageA]
push 1
mov ecx, esi
call fcn.005bc190
push 0
push 0x67997c
lea ecx, [esi + 0xb14]
call fcn.00401990
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x8c8]
call fcn.0058fe90
mov byte [ebp - 4], 0
push fcn.005db390
push 0x20
push 0x3488
lea eax, [ebp - 0x699c8]
push eax
call fcn.006207e3
cmp byte [ebp - 0x699c9], 0
jne case.default.0x5c6ae7
mov eax, dword [esi + 0x44]
cmp eax, 5
ja case.default.0x5c6ae7
jmp dword [eax*4 + 0x5c6be4]
mov ecx, esi
call fcn.005c5a10
jmp 0x5c6b10
mov ecx, esi
call fcn.005c4ed0
jmp 0x5c6b10
mov ecx, esi
call fcn.005c54f0
jmp 0x5c6b10
mov ecx, esi
call fcn.005c5720
mov dword [ebp - 0x699dc], eax
mov byte [esi + 0x377], 0
mov byte [esi + 0x1aa], 0
mov eax, dword [ebp - 0x699dc]
jmp 0x5c6bc6
mov byte [esi + 0xaf9], bl
cmp byte [esi + 0xafa], bl
jne 0x5c6b74
mov ecx, dword [esi + 0x34c]
cmp ecx, 4
je 0x5c6b64
mov eax, dword [esi + 0x354]
cmp eax, 0x40
je 0x5c6b64
cmp eax, 0x800
je 0x5c6b64
cmp ecx, 8
je 0x5c6b64
cmp ecx, 0x40
jne 0x5c6b74
cmp dword [esi + 0x340], ebx
je 0x5c6b93
cmp dword [esi + 0x344], ebx
je 0x5c6b93
push 5
mov ecx, esi
call fcn.005b6e00
cmp byte [esi + 0xafa], bl
jne 0x5c6b8c
mov ecx, esi
call fcn.005c0c50
mov ecx, esi
call fcn.005c0650
xor eax, eax
jmp 0x5c6bc6
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0062023e
mov esp, ebp
pop ebp
ret