Function at 0x5ba000
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 0x658aa2
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x696b8
call fcn.00614970
mov eax, dword [0x7496c8]
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 - 0x696c8], esi
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp byte [esi + 0xae1], bl
jne 0x5ba90f
cmp byte [esi + 0xae2], bl
jne 0x5ba90f
mov eax, dword [esi + 0x4e0]
cmp eax, ebx
je 0x5ba06e
push eax
lea ecx, [esi + 0x20]
call fcn.005c4380
push esi
call fcn.004af220
add esp, 4
mov edx, dword [esi + 0x4e0]
cmp edx, ebx
jne 0x5ba405
cmp byte [esi + 0xad2], bl
je 0x5ba405
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 0x66ae98
lea ecx, [ebp - 0x2c]
call fcn.004021b0
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
jne 0x5ba0bd
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x5ba22c
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
jne 0x5ba0d7
lea eax, [ebp - 0x28]
push 0x5c
add eax, 6
push eax
call fcn.00614db0
add esp, 8
mov edi, eax
cmp edi, ebx
je 0x5ba22c
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
jne 0x5ba0f9
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x20]
call fcn.00402180
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x20]
cmp eax, ebx
mov ecx, eax
jne 0x5ba112
lea ecx, [ebp - 0x1c]
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
jne 0x5ba11c
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 0x5ba132
lea eax, [ebp - 0x1c]
push 1
push eax
call fcn.004a29e0
add esp, 8
test eax, eax
jne 0x5ba20b
mov eax, dword [ebp - 0x20]
cmp eax, ebx
jne 0x5ba14f
lea eax, [ebp - 0x1c]
push 1
push eax
call fcn.004a2bc0
add esp, 8
test eax, eax
jne 0x5ba20b
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 - 0x696b8]
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 [0x74eb40]
push eax
mov ecx, dword [ebp - 0x696b8]
push ecx
mov edx, dword [0x74fb24]
push edx
lea ecx, [ebp - 0x38]
call fcn.004021b0
mov eax, dword [ebp - 0x696b8]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x2c]
cmp ecx, ebx
jne 0x5ba1c6
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 0x38]
cmp eax, ebx
jne 0x5ba1d0
lea eax, [ebp - 0x34]
push 0x30
push ecx
push eax
push ebx
call fcn.0046dfd0
add esp, 0x10
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x38]
call fcn.004011f0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x20]
call fcn.004011f0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.004011f0
mov eax, 0x7546
jmp 0x5ba9a6
push 0x5c
add edi, 2
push edi
call fcn.00614db0
add esp, 8
mov edi, eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x20]
call fcn.004011f0
jmp 0x5ba0e7
cmp dword [esi + 0xac8], ebx
je 0x5ba3f7
cmp dword [esi + 0xacc], ebx
je 0x5ba3f7
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x696bc]
push edx
push ebx
push 0xf003f
push ebx
push 0x66b96c
push ebx
push str.SoftwareDownloadManagerGrabberStsProjects_
push 0x80000001
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
call edi
cmp eax, ebx
jne 0x5ba3f7
mov eax, dword [ebp - 0x696bc]
push eax
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call ebx
lea ecx, [ebp - 0x696b8]
call fcn.00402500
mov byte [ebp - 4], 4
mov ecx, dword [esi + 0xac8]
push ecx
push str.SoftwareDownloadManagerGrabberStsProjects_ld_
lea edx, [ebp - 0x696b8]
push edx
call fcn.00402f80
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x696bc]
push ecx
push 0
push 0xf003f
push 0
push 0x66b96c
push 0
mov edx, dword [ebp - 0x696b8]
push edx
push 0x80000001
call edi
test eax, eax
jne 0x5ba3e6
mov eax, dword [ebp - 0x696bc]
push eax
call ebx
mov ecx, dword [esi + 0xacc]
push ecx
mov edx, dword [esi + 0xac8]
push edx
push str.SoftwareDownloadManagerGrabberStsProjects_ld_ld_
lea eax, [ebp - 0x696b8]
push eax
call fcn.00402f80
add esp, 0x10
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x696bc]
push edx
push 0
push 0xf003f
push 0
push 0x66b96c
push 0
mov eax, dword [ebp - 0x696b8]
push eax
push 0x80000001
call edi
test eax, eax
jne 0x5ba3e6
mov edx, dword [esi + 0x50]
mov eax, edx
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x5ba344
sub eax, edi
sar eax, 1
lea ecx, [eax + eax + 1]
push ecx
push edx
push 1
push 0
push 0x67975c
mov edx, dword [ebp - 0x696bc]
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 0x5ba380
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 - 0x696bc]
push ecx
call edi
lea ecx, [esi + 0x518]
mov eax, ecx
lea ebx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x5ba3b2
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 - 0x696bc]
push eax
call edi
mov ecx, dword [ebp - 0x696bc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x696b8]
call fcn.00402570
xor ebx, ebx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.004011f0
jmp 0x5ba439
mov al, byte [esi + 0xab8]
test al, al
je 0x5ba417
mov ecx, dword [esi + 0xacc]
jmp 0x5ba419
xor ecx, ecx
test al, al
je 0x5ba425
mov eax, dword [esi + 0xac8]
jmp 0x5ba427
xor eax, eax
push ecx
push eax
push edx
lea ecx, [esi + 0x20]
call fcn.005c75d0
mov byte [esi + 0xad2], 1
lea ecx, [esi + 0x20]
mov edx, dword [esi + 0x4e0]
push edx
call fcn.005c2e00
mov eax, dword [esi + 0x14]
cmp eax, ebx
je 0x5ba467
mov ecx, dword [esi + 0x4e0]
push ecx
push 0x13cd
push 0x111
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov dword [esi + 0xab4], ebx
mov dword [esi + 0xac4], ebx
push 1
mov ecx, esi
call fcn.005aaf10
lea ecx, [esi + 0x514]
call fcn.00560800
cmp byte [esi + 0xad6], 0
jne 0x5ba4b1
cmp dword [esi + 4], ebx
jne 0x5ba4a9
cmp dword [esi + 8], ebx
jne 0x5ba4a9
mov ecx, esi
call fcn.005abb30
test eax, eax
je 0x5ba4a9
mov al, 1
jmp 0x5ba4ab
xor al, al
mov byte [esi + 0xad5], al
mov eax, dword [esi + 0x38]
cmp eax, ebx
je 0x5ba4d2
lea edx, [eax + 1]
jmp 0x5ba4c0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5ba4c0
sub eax, edx
mov dword [ebp - 0x18], eax
jne 0x5ba60e
mov eax, dword [esi + 0x44]
cmp eax, 2
je 0x5ba4e3
cmp eax, 1
jne 0x5ba60e
xor bl, bl
mov byte [ebp - 0x696bd], bl
mov eax, dword [esi + 0x24]
test eax, eax
je 0x5ba521
push str._simtelnet_
push eax
call fcn.006148e0
add esp, 8
test eax, eax
je 0x5ba521
mov eax, dword [esi + 0x20]
push str.simtel.net
push eax
call fcn.006148e0
add esp, 8
test eax, eax
jne 0x5ba521
mov bl, 1
mov byte [ebp - 0x696bd], bl
test dword [esi + 0x174], 0x80000
jne 0x5ba60e
test bl, bl
jne 0x5ba60e
cmp dword [esi + 0xabc], 0
jne 0x5ba60e
lea ecx, [ebp - 0x696b8]
call fcn.00402500
mov byte [ebp - 4], 5
mov eax, dword [esi + 0x34]
cmp eax, 0x50
jne 0x5ba563
cmp dword [esi + 0x44], 1
je 0x5ba570
cmp eax, 0x1bb
jne 0x5ba583
cmp dword [esi + 0x44], 2
jne 0x5ba583
push 0x66b96c
lea edx, [ebp - 0x1c]
push edx
call fcn.0061611b
add esp, 8
jmp 0x5ba595
push eax
push str.:_ld
lea eax, [ebp - 0x1c]
push eax
call fcn.0061611b
add esp, 0xc
mov eax, dword [esi + 0x24]
test eax, eax
mov edx, eax
jne 0x5ba5a5
mov edx, 0x66b96c
jmp 0x5ba5af
cmp byte [eax], 0x2f
mov ecx, 0x66b96c
je 0x5ba5b4
mov ecx, 0x66fdf0
cmp dword [esi + 0x44], 1
mov eax, 0x66c488
je 0x5ba5c4
mov eax, 0x66bbd4
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 - 0x696b8]
push eax
call fcn.00402f80
add esp, 0x1c
mov ecx, dword [ebp - 0x696b8]
push ecx
mov ecx, esi
call fcn.005ab870
mov byte [esi + 0x35e], 1
mov byte [esi + 0x35f], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x696b8]
call fcn.00402570
mov byte [esi + 0x35d], 0
xor ebx, ebx
mov dword [esi + 0xcc], ebx
mov byte [ebp - 0x696b1], bl
cmp dword [esi + 0xafc], ebx
je 0x5ba633
mov eax, dword [esi + 0xafc]
jmp 0x5ba639
lea eax, [esi + 0xb00]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x5ba640
sub eax, edx
sar eax, 1
je 0x5ba8bf
cmp dword [esi + 0xafc], ebx
je 0x5ba665
mov eax, dword [esi + 0xafc]
jmp 0x5ba66b
lea eax, [esi + 0xb00]
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 0x5ba8bf
lea edx, [ebp - 0x18]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x4e8], eax
mov dword [esi + 0x4ec], ebx
cmp eax, 0xffffffff
jne 0x5ba6c1
cmp ebx, ebx
jne 0x5ba6c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
je 0x5ba6c1
mov dword [esi + 0x4e8], ebx
mov dword [esi + 0x4ec], ebx
jmp 0x5ba6da
push 1
push ebx
push ebx
mov eax, dword [ebp - 0x18]
push eax
call fcn.00617ef0
add dword [esi + 0x4e8], eax
adc dword [esi + 0x4ec], edx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push fcn.005cede0
push fcn.005745e0
push 0x20
push 0x3470
lea ecx, [ebp - 0x696b0]
push ecx
call fcn.00615939
mov byte [ebp - 4], 6
mov edx, dword [esi]
push edx
lea eax, [esi + 0x514]
push eax
lea eax, [esi + 0x20]
push eax
lea eax, [ebp - 0x696b0]
push eax
lea ecx, [esi + 0x944]
push ecx
lea ecx, [ebp - 0x8b0]
call fcn.00586090
mov byte [ebp - 4], 7
mov dword [ebp - 0x658], esi
lea edi, [esi + 0x10]
mov dword [ebp - 0x8a0], edi
mov dword [ebp - 0x7b0], edi
lea eax, [esi + 0x14]
mov dword [ebp - 0x89c], eax
lea edx, [esi + 0x18]
mov dword [ebp - 0x898], edx
mov eax, dword [esi + 0xabc]
push eax
mov ecx, dword [esi + 0xac0]
push ecx
mov edx, dword [esi + 0xacc]
push edx
mov eax, dword [esi + 0xac8]
push eax
xor ecx, ecx
cmp byte [esi + 0xab8], cl
sete cl
push ecx
mov edx, dword [esi + 0x4e0]
push edx
lea ecx, [ebp - 0x8b0]
call fcn.005a9190
push 1
mov eax, dword [esi + 0x4ec]
push eax
mov ecx, dword [esi + 0x4e8]
push ecx
lea ecx, [ebp - 0x8b0]
call fcn.005a9480
cmp byte [esi + 0xab8], 0
je 0x5ba7ca
mov dword [esi + 0xab4], ebx
mov dword [ebp - 0x696c4], ebx
mov byte [ebp - 0x696b1], 1
jmp 0x5ba88b
cmp dword [esi + 0xafc], ebx
je 0x5ba7da
mov eax, dword [esi + 0xafc]
jmp 0x5ba7e0
lea eax, [esi + 0xb00]
push ebx
mov edx, dword [esi + 0x50]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x5ba879
mov ebx, dword [esi + 0x4e8]
mov eax, dword [esi + 0x4ec]
push eax
push ebx
lea ecx, [ebp - 0x8b0]
call fcn.0056cc40
mov dword [esi + 0xab4], 0
mov dword [esi + 0x4f0], ebx
mov eax, dword [esi + 0x4ec]
mov dword [esi + 0x4f4], eax
push 0
lea ecx, [ebp - 0x8b0]
call fcn.005a8110
mov dword [ebp - 0x696c4], 0
mov byte [ebp - 0x696b1], 1
mov dword [esi + 0x93c], 3
cmp dword [esi + 0x5c], 0
je 0x5ba879
mov edi, dword [edi]
test edi, edi
je 0x5ba870
push 0
push 0x1472
push 0x111
push edi
call dword [sym.imp.USER32.dll_SendMessageA]
push 1
mov ecx, esi
call fcn.005b0250
push 0
push 0x66b96c
lea ecx, [esi + 0xafc]
call fcn.00401980
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x8b0]
call fcn.00584c80
mov byte [ebp - 4], 0
push fcn.005cede0
push 0x20
push 0x3470
lea eax, [ebp - 0x696b0]
push eax
call fcn.006137c9
cmp byte [ebp - 0x696b1], 0
jne case.default.0x5ba8c7
mov eax, dword [esi + 0x44]
cmp eax, 5
ja case.default.0x5ba8c7
jmp dword [eax*4 + 0x5ba9c4]
mov ecx, esi
call fcn.005b97f0
jmp 0x5ba8f0
mov ecx, esi
call fcn.005b8cb0
jmp 0x5ba8f0
mov ecx, esi
call fcn.005b92d0
jmp 0x5ba8f0
mov ecx, esi
call fcn.005b9500
mov dword [ebp - 0x696c4], eax
mov byte [esi + 0x363], 0
mov byte [esi + 0x19a], 0
mov eax, dword [ebp - 0x696c4]
jmp 0x5ba9a6
mov byte [esi + 0xae1], bl
cmp byte [esi + 0xae2], bl
jne 0x5ba954
mov ecx, dword [esi + 0x338]
cmp ecx, 4
je 0x5ba944
mov eax, dword [esi + 0x340]
cmp eax, 0x40
je 0x5ba944
cmp eax, 0x800
je 0x5ba944
cmp ecx, 8
je 0x5ba944
cmp ecx, 0x40
jne 0x5ba954
cmp dword [esi + 0x330], ebx
je 0x5ba973
cmp dword [esi + 0x334], ebx
je 0x5ba973
push 5
mov ecx, esi
call fcn.005aaf10
cmp byte [esi + 0xae2], bl
jne 0x5ba96c
mov ecx, esi
call fcn.005b4bb0
mov ecx, esi
call fcn.005b4620
xor eax, eax
jmp 0x5ba9a6
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.00613241
mov esp, ebp
pop ebp
ret