Function at 0x5a9640
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 0x63d2c2
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x693b8
call fcn.005f9ca0
mov eax, dword [0x70a308]
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 - 0x693c8], esi
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp byte [esi + 0xac1], bl
je 0x5a96dd
mov byte [esi + 0xac1], bl
mov eax, dword [esi + 0x328]
cmp eax, 4
je 0x5a96af
cmp dword [esi + 0x330], 0x40
je 0x5a96af
cmp eax, 8
je 0x5a96af
cmp eax, 0x40
jne 0x5a96bf
cmp dword [esi + 0x320], ebx
je 0x5a96d6
cmp dword [esi + 0x324], ebx
je 0x5a96d6
push 5
mov ecx, esi
call fcn.0059ae20
mov ecx, esi
call fcn.005a4120
mov ecx, esi
call fcn.005a3b70
xor eax, eax
jmp 0x5a9fbb
mov eax, dword [esi + 0x4c0]
cmp eax, ebx
je 0x5a96f0
push eax
lea ecx, [esi + 0x20]
call fcn.005b3460
push esi
call fcn.004a8200
add esp, 4
mov edx, dword [esi + 0x4c0]
cmp edx, ebx
jne 0x5a9a8a
cmp byte [esi + 0xab2], bl
je 0x5a9a8a
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 0x64edec
lea ecx, [ebp - 0x2c]
call fcn.00402190
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
jne 0x5a973f
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x5a98b5
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
jne 0x5a9759
lea eax, [ebp - 0x28]
push 0x5c
add eax, 6
push eax
call fcn.005fa163
add esp, 8
mov edi, eax
lea esp, [esp]
cmp edi, ebx
je 0x5a98b5
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
jne 0x5a9782
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x20]
call fcn.00402160
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x20]
cmp eax, ebx
mov ecx, eax
jne 0x5a979b
lea ecx, [ebp - 0x1c]
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
jne 0x5a97a5
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 0x5a97bb
lea eax, [ebp - 0x1c]
push 1
push eax
call fcn.0049bfe0
add esp, 8
test eax, eax
jne 0x5a9894
mov eax, dword [ebp - 0x20]
cmp eax, ebx
jne 0x5a97d8
lea eax, [ebp - 0x1c]
push 1
push eax
call fcn.0049c1c0
add esp, 8
test eax, eax
jne 0x5a9894
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 - 0x693b8]
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 [0x70f730]
push eax
mov ecx, dword [ebp - 0x693b8]
push ecx
mov edx, dword [0x71063c]
push edx
lea ecx, [ebp - 0x38]
call fcn.00402190
mov eax, dword [ebp - 0x693b8]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x2c]
cmp ecx, ebx
jne 0x5a984f
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 0x38]
cmp eax, ebx
jne 0x5a9859
lea eax, [ebp - 0x34]
push 0x30
push ecx
push eax
push ebx
call fcn.00469fc0
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 0x5a9fbb
push 0x5c
add edi, 2
push edi
call fcn.005fa163
add esp, 8
mov edi, eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x20]
call fcn.004011f0
jmp 0x5a9770
cmp dword [esi + 0xaa8], ebx
je 0x5a9a7c
cmp dword [esi + 0xaac], ebx
je 0x5a9a7c
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x693bc]
push edx
push ebx
push 0xf003f
push ebx
push 0x64f8bc
push ebx
push str.SoftwareDownloadManagerGrabberStsProjects_
push 0x80000001
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
call edi
cmp eax, ebx
jne 0x5a9a7c
mov eax, dword [ebp - 0x693bc]
push eax
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call ebx
lea ecx, [ebp - 0x693b8]
call fcn.004024e0
mov byte [ebp - 4], 4
mov ecx, dword [esi + 0xaa8]
push ecx
push str.SoftwareDownloadManagerGrabberStsProjects_ld_
lea edx, [ebp - 0x693b8]
push edx
call fcn.00402f60
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x693bc]
push ecx
push 0
push 0xf003f
push 0
push 0x64f8bc
push 0
mov edx, dword [ebp - 0x693b8]
push edx
push 0x80000001
call edi
test eax, eax
jne 0x5a9a6b
mov eax, dword [ebp - 0x693bc]
push eax
call ebx
mov ecx, dword [esi + 0xaac]
push ecx
mov edx, dword [esi + 0xaa8]
push edx
push str.SoftwareDownloadManagerGrabberStsProjects_ld_ld_
lea eax, [ebp - 0x693b8]
push eax
call fcn.00402f60
add esp, 0x10
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0x693bc]
push edx
push 0
push 0xf003f
push 0
push 0x64f8bc
push 0
mov eax, dword [ebp - 0x693b8]
push eax
push 0x80000001
call edi
test eax, eax
jne 0x5a9a6b
mov edx, dword [esi + 0x50]
mov eax, edx
lea edi, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x5a99d0
sub eax, edi
sar eax, 1
lea ecx, [eax + eax + 1]
push ecx
push edx
push 1
push 0
push 0x65d364
mov edx, dword [ebp - 0x693bc]
push edx
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
call edi
mov ecx, dword [esi + 0x4c]
mov eax, ecx
lea edx, [eax + 2]
mov bx, word [eax]
add eax, 2
test bx, bx
jne 0x5a9a05
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 - 0x693bc]
push ecx
call edi
lea ecx, [esi + 0x4f8]
mov eax, ecx
lea ebx, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x5a9a37
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 - 0x693bc]
push eax
call edi
mov ecx, dword [ebp - 0x693bc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x693b8]
call fcn.00402550
xor ebx, ebx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.004011f0
jmp 0x5a9abe
mov al, byte [esi + 0xa98]
test al, al
je 0x5a9a9c
mov ecx, dword [esi + 0xaac]
jmp 0x5a9a9e
xor ecx, ecx
test al, al
je 0x5a9aaa
mov eax, dword [esi + 0xaa8]
jmp 0x5a9aac
xor eax, eax
push ecx
push eax
push edx
lea ecx, [esi + 0x20]
call fcn.005b64a0
mov byte [esi + 0xab2], 1
lea ecx, [esi + 0x20]
mov edx, dword [esi + 0x4c0]
push edx
call fcn.005b2710
mov eax, dword [esi + 0x14]
cmp eax, ebx
je 0x5a9aec
mov ecx, dword [esi + 0x4c0]
push ecx
push 0x13cd
push 0x111
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov dword [esi + 0xa94], ebx
mov dword [esi + 0xaa4], ebx
push 1
mov ecx, esi
call fcn.0059ae20
lea ecx, [esi + 0x4f4]
call fcn.00554c10
cmp byte [esi + 0xab6], 0
jne 0x5a9b36
cmp dword [esi + 4], ebx
jne 0x5a9b2e
cmp dword [esi + 8], ebx
jne 0x5a9b2e
mov ecx, esi
call fcn.0059bab0
test eax, eax
je 0x5a9b2e
mov al, 1
jmp 0x5a9b30
xor al, al
mov byte [esi + 0xab5], al
mov eax, dword [esi + 0x38]
cmp eax, ebx
je 0x5a9b52
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5a9b40
sub eax, edx
mov dword [ebp - 0x18], eax
jne 0x5a9c8e
mov eax, dword [esi + 0x44]
cmp eax, 2
je 0x5a9b63
cmp eax, 1
jne 0x5a9c8e
xor bl, bl
mov byte [ebp - 0x693bd], bl
mov eax, dword [esi + 0x24]
test eax, eax
je 0x5a9ba1
push str._simtelnet_
push eax
call fcn.005f9c10
add esp, 8
test eax, eax
je 0x5a9ba1
mov eax, dword [esi + 0x20]
push str.simtel.net
push eax
call fcn.005f9c10
add esp, 8
test eax, eax
jne 0x5a9ba1
mov bl, 1
mov byte [ebp - 0x693bd], bl
test dword [esi + 0x16c], 0x80000
jne 0x5a9c8e
test bl, bl
jne 0x5a9c8e
cmp dword [esi + 0xa9c], 0
jne 0x5a9c8e
lea ecx, [ebp - 0x693b8]
call fcn.004024e0
mov byte [ebp - 4], 5
mov eax, dword [esi + 0x34]
cmp eax, 0x50
jne 0x5a9be3
cmp dword [esi + 0x44], 1
je 0x5a9bf0
cmp eax, 0x1bb
jne 0x5a9c03
cmp dword [esi + 0x44], 2
jne 0x5a9c03
push 0x64f8bc
lea edx, [ebp - 0x1c]
push edx
call fcn.005fb4cb
add esp, 8
jmp 0x5a9c15
push eax
push str.:_ld
lea eax, [ebp - 0x1c]
push eax
call fcn.005fb4cb
add esp, 0xc
mov eax, dword [esi + 0x24]
test eax, eax
mov edx, eax
jne 0x5a9c25
mov edx, 0x64f8bc
jmp 0x5a9c2f
cmp byte [eax], 0x2f
mov ecx, 0x64f8bc
je 0x5a9c34
mov ecx, 0x653d00
cmp dword [esi + 0x44], 1
mov eax, 0x6503c0
je 0x5a9c44
mov eax, 0x64fb24
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 - 0x693b8]
push eax
call fcn.00402f60
add esp, 0x1c
mov ecx, dword [ebp - 0x693b8]
push ecx
mov ecx, esi
call fcn.0059b7f0
mov byte [esi + 0x34e], 1
mov byte [esi + 0x34f], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x693b8]
call fcn.00402550
mov byte [esi + 0x34d], 0
xor ebx, ebx
mov dword [esi + 0xcc], ebx
mov byte [ebp - 0x693b1], bl
cmp dword [esi + 0xad8], ebx
je 0x5a9cb3
mov eax, dword [esi + 0xad8]
jmp 0x5a9cb9
lea eax, [esi + 0xadc]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x5a9cc0
sub eax, edx
sar eax, 1
je 0x5a9f3f
cmp dword [esi + 0xad8], ebx
je 0x5a9ce5
mov eax, dword [esi + 0xad8]
jmp 0x5a9ceb
lea eax, [esi + 0xadc]
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 0x5a9f3f
lea edx, [ebp - 0x18]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x4c8], eax
mov dword [esi + 0x4cc], ebx
cmp eax, 0xffffffff
jne 0x5a9d41
cmp ebx, ebx
jne 0x5a9d41
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
je 0x5a9d41
mov dword [esi + 0x4c8], ebx
mov dword [esi + 0x4cc], ebx
jmp 0x5a9d5a
push 1
push ebx
push ebx
mov eax, dword [ebp - 0x18]
push eax
call fcn.005fd4d0
add dword [esi + 0x4c8], eax
adc dword [esi + 0x4cc], edx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push fcn.005bdc40
push fcn.00568340
push 0x20
push 0x3458
lea ecx, [ebp - 0x693b0]
push ecx
call fcn.005face9
mov byte [ebp - 4], 6
mov edx, dword [esi]
push edx
lea eax, [esi + 0x4f4]
push eax
lea eax, [esi + 0x20]
push eax
lea eax, [ebp - 0x693b0]
push eax
lea ecx, [esi + 0x924]
push ecx
lea ecx, [ebp - 0x8b0]
call fcn.005793b0
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 + 0xa9c]
push eax
mov ecx, dword [esi + 0xaa0]
push ecx
mov edx, dword [esi + 0xaac]
push edx
mov eax, dword [esi + 0xaa8]
push eax
xor ecx, ecx
cmp byte [esi + 0xa98], cl
sete cl
push ecx
mov edx, dword [esi + 0x4c0]
push edx
lea ecx, [ebp - 0x8b0]
call fcn.00599270
push 1
mov eax, dword [esi + 0x4cc]
push eax
mov ecx, dword [esi + 0x4c8]
push ecx
lea ecx, [ebp - 0x8b0]
call fcn.00599560
cmp byte [esi + 0xa98], 0
je 0x5a9e4a
mov dword [esi + 0xa94], ebx
mov dword [ebp - 0x693c4], ebx
mov byte [ebp - 0x693b1], 1
jmp 0x5a9f0b
cmp dword [esi + 0xad8], ebx
je 0x5a9e5a
mov eax, dword [esi + 0xad8]
jmp 0x5a9e60
lea eax, [esi + 0xadc]
push ebx
mov edx, dword [esi + 0x50]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x5a9ef9
mov ebx, dword [esi + 0x4c8]
mov eax, dword [esi + 0x4cc]
push eax
push ebx
lea ecx, [ebp - 0x8b0]
call fcn.00560d20
mov dword [esi + 0xa94], 0
mov dword [esi + 0x4d0], ebx
mov eax, dword [esi + 0x4cc]
mov dword [esi + 0x4d4], eax
push 0
lea ecx, [ebp - 0x8b0]
call fcn.005981f0
mov dword [ebp - 0x693c4], 0
mov byte [ebp - 0x693b1], 1
mov dword [esi + 0x91c], 3
cmp dword [esi + 0x5c], 0
je 0x5a9ef9
mov edi, dword [edi]
test edi, edi
je 0x5a9ef0
push 0
push 0x1472
push 0x111
push edi
call dword [sym.imp.USER32.dll_SendMessageA]
push 1
mov ecx, esi
call fcn.005a01e0
push 0
push 0x64f8bc
lea ecx, [esi + 0xad8]
call fcn.00401960
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x8b0]
call fcn.00577fc0
mov byte [ebp - 4], 0
push fcn.005bdc40
push 0x20
push 0x3458
lea eax, [ebp - 0x693b0]
push eax
call fcn.005f8b6f
cmp byte [ebp - 0x693b1], 0
jne case.default.0x5a9f47
mov eax, dword [esi + 0x44]
cmp eax, 5
ja case.default.0x5a9f47
jmp dword [eax*4 + 0x5a9fd8]
mov ecx, esi
call fcn.005a8d50
jmp 0x5a9f70
mov ecx, esi
call fcn.005a8210
jmp 0x5a9f70
mov ecx, esi
call fcn.005a8830
jmp 0x5a9f70
mov ecx, esi
call fcn.005a8a60
mov dword [ebp - 0x693c4], eax
mov byte [esi + 0x353], 0
mov byte [esi + 0x192], 0
mov eax, dword [ebp - 0x693c4]
jmp 0x5a9fbb
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.005f85e7
mov esp, ebp
pop ebp
ret