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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5657b4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x30fd8
call fcn.00527220
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x2c], esi
mov edx, dword [esi + 0x420]
mov dword [ebp - 4], 0
test edx, edx
jne 0x5037ba
mov al, byte [esi + 0x79e]
test al, al
je 0x5037ba
mov eax, dword [0x5c2a74]
mov dword [ebp - 0x20], eax
mov ecx, dword [esi + 0x4c]
lea edx, [ebp - 0x20]
push ecx
push 0x5a3e24
push edx
mov byte [ebp - 4], 1
call fcn.0053afda
mov eax, dword [ebp - 0x20]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x50363f
mov edi, 2
inc edi
lea ecx, [ebp - 0x20]
push edi
push 0x5c
call fcn.00542693
mov edi, eax
cmp edi, 0xffffffff
je 0x50363f
lea ecx, [ebp - 0x24]
push edi
push ecx
lea ecx, [ebp - 0x20]
call fcn.0053abba
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
lea ecx, [ebp - 0x24]
sete bl
call fcn.005421be
test bl, bl
je 0x50354a
lea edx, [ebp - 0x14]
push edi
push edx
lea ecx, [ebp - 0x20]
call fcn.0053abba
mov eax, dword [eax]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
lea ecx, [ebp - 0x14]
sete bl
call fcn.005421be
test bl, bl
je 0x50354a
mov eax, dword [0x5c2a74]
mov dword [ebp - 0x14], eax
push 0
lea ecx, [ebp - 0x18]
push 0
push ecx
push 0x400
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, dword [ebp - 0x18]
mov eax, dword [0x5c8004]
push edx
lea ecx, [ebp - 0x14]
push eax
push ecx
call fcn.0053afda
mov edx, dword [ebp - 0x18]
add esp, 0xc
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
push 0x30
push eax
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.005421be
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0
call fcn.005421be
mov eax, 0x7546
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x794]
test eax, eax
je 0x5037ac
mov eax, dword [esi + 0x798]
test eax, eax
je 0x5037ac
lea edx, [ebp - 0x24]
lea eax, [ebp - 0x18]
push edx
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push eax
push 0
push 0xf003f
push 0
push 0x5c6ff0
push 0
push str.SoftwareDownloadManagerGrabberStsProjects_
push reloc.WSOCK32.dll_accept
call edi
test eax, eax
jne 0x5037ac
mov ecx, dword [ebp - 0x18]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call ebx
mov edx, dword [0x5c2a74]
mov dword [ebp - 0x14], edx
mov eax, dword [esi + 0x794]
lea ecx, [ebp - 0x14]
push eax
push str.SoftwareDownloadManagerGrabberStsProjects_ld_
push ecx
mov byte [ebp - 4], 3
call fcn.0053afda
add esp, 0xc
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x24]
lea eax, [ebp - 0x18]
push edx
push eax
push 0
push 0xf003f
push 0
push 0x5c6ff0
push 0
push ecx
push reloc.WSOCK32.dll_accept
call edi
test eax, eax
jne 0x5037a0
mov edx, dword [ebp - 0x18]
push edx
call ebx
mov eax, dword [esi + 0x798]
mov ecx, dword [esi + 0x794]
push eax
push ecx
lea edx, [ebp - 0x14]
push str.SoftwareDownloadManagerGrabberStsProjects_ld_ld_
push edx
call fcn.0053afda
add esp, 0x10
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0x18]
push eax
push ecx
push 0
push 0xf003f
push 0
push 0x5c6ff0
push 0
push edx
push reloc.WSOCK32.dll_accept
call edi
test eax, eax
jne 0x5037a0
mov edx, dword [esi + 0x50]
or ecx, 0xffffffff
mov edi, edx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
push 1
push eax
mov eax, dword [ebp - 0x18]
push str.LocalFileName
push eax
call ebx
mov edx, dword [esi + 0x4c]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [ebp - 0x18]
push edx
push 1
push eax
push str.LocalPath
push ecx
call ebx
lea edx, [esi + 0x448]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
mov edx, dword [ebp - 0x18]
push 1
push eax
push str.LogFileName
push edx
call ebx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.005421be
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0
call fcn.005421be
jmp 0x5037ee
mov al, byte [esi + 0x784]
test al, al
je 0x5037cc
mov ecx, dword [esi + 0x798]
jmp 0x5037ce
xor ecx, ecx
test al, al
je 0x5037da
mov eax, dword [esi + 0x794]
jmp 0x5037dc
xor eax, eax
push ecx
push eax
push edx
lea ecx, [esi + 0x20]
call fcn.00508260
mov byte [esi + 0x79e], 1
mov ecx, dword [esi + 0x420]
lea ebx, [esi + 0x20]
push ecx
mov ecx, ebx
call fcn.00507f20
mov eax, dword [esi + 0x18]
xor edi, edi
cmp eax, edi
je 0x503820
mov edx, dword [esi + 0x420]
push edx
push 0x13cd
push 0x111
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
push 1
mov ecx, esi
mov dword [esi + 0x780], edi
mov dword [esi + 0x790], edi
call fcn.00502b50
lea ecx, [esi + 0x444]
call fcn.004d1fb0
mov edi, dword [esi + 0x38]
test edi, edi
je 0x50385a
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [ebp - 0x24], ecx
jne 0x50396c
mov eax, dword [esi + 0x44]
cmp eax, 2
je 0x50386b
cmp eax, 1
jne 0x50396c
mov eax, dword [esi + 0x24]
test eax, eax
je 0x50389c
push str._simtelnet_
push eax
call fcn.005271a0
add esp, 8
test eax, eax
je 0x50389c
mov eax, dword [ebx]
push str.simtel.net
push eax
call fcn.005271a0
add esp, 8
test eax, eax
je 0x50396c
mov eax, dword [esi + 0x788]
test eax, eax
jne 0x50396c
mov ecx, dword [0x5c2a74]
mov dword [ebp - 0x14], ecx
mov eax, dword [esi + 0x34]
mov byte [ebp - 4], 4
cmp eax, 0x50
jne 0x5038c5
cmp dword [esi + 0x44], 1
je 0x5038d2
cmp eax, 0x1bb
jne 0x5038e5
cmp dword [esi + 0x44], 2
jne 0x5038e5
lea edx, [ebp - 0x28]
push 0x5c6ff0
push edx
call fcn.00527718
add esp, 8
jmp 0x5038f7
push eax
lea eax, [ebp - 0x28]
push str.:_ld
push eax
call fcn.00527718
add esp, 0xc
mov eax, dword [esi + 0x24]
test eax, eax
mov edx, eax
jne 0x503905
mov edx, 0x5c6ff0
test eax, eax
je 0x503915
mov cl, byte [eax]
cmp cl, 0x2f
mov ecx, 0x5c6ff0
je 0x50391a
mov ecx, 0x5a5a48
mov eax, dword [esi + 0x44]
cmp eax, 1
mov eax, 0x5a407c
je 0x50392c
mov eax, 0x5a4030
push edx
mov edx, dword [ebx]
push ecx
lea ecx, [ebp - 0x28]
push ecx
push edx
push eax
lea eax, [ebp - 0x14]
push str._s:___s_s_s_s
push eax
call fcn.0053afda
mov ecx, dword [ebp - 0x14]
add esp, 0x1c
push ecx
mov ecx, esi
call fcn.005050c0
lea ecx, [ebp - 0x14]
mov byte [esi + 0x362], 1
mov byte [esi + 0x363], 1
mov byte [ebp - 4], 0
call fcn.005421be
mov edx, dword [esi + 0x7b0]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
mov byte [esi + 0x361], 0
mov dword [esi + 0x1c0], 0
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [ebp - 0x19], 0
je 0x503bd3
push eax
push eax
push 3
push eax
push 1
push connect
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x503bd3
lea edx, [ebp - 0x24]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
xor ebx, ebx
mov dword [esi + 0x428], eax
mov dword [esi + 0x42c], ebx
mov eax, dword [esi + 0x428]
cmp eax, 0xffffffff
jne 0x5039f9
mov eax, ebx
cmp eax, ebx
jne 0x5039f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
je 0x5039f9
mov dword [esi + 0x428], ebx
mov dword [esi + 0x42c], ebx
jmp 0x503a22
mov eax, dword [ebp - 0x24]
push 1
push ebx
push ebx
push eax
call fcn.005291e0
mov ecx, dword [esi + 0x428]
add ecx, eax
mov dword [esi + 0x428], ecx
mov eax, dword [esi + 0x42c]
adc eax, edx
mov dword [esi + 0x42c], eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x4ddad0
push fcn.004dd8c0
push 0x10
lea ecx, [ebp - 0x30fe8]
push 0x3070
push ecx
call fcn.0052798f
mov edx, dword [esi]
lea eax, [esi + 0x444]
push edx
push eax
lea eax, [esi + 0x20]
lea ecx, [esi + 0x664]
push eax
lea eax, [ebp - 0x30fe8]
push eax
push ecx
lea ecx, [ebp - 0x8e8]
mov byte [ebp - 4], 5
call fcn.004e79f0
mov ecx, dword [esi + 0x78c]
lea eax, [esi + 0x18]
mov dword [ebp - 0x8d4], eax
mov eax, dword [esi + 0x788]
lea edx, [esi + 0x1c]
push eax
mov eax, dword [esi + 0x794]
mov dword [ebp - 0x8d0], edx
mov edx, dword [esi + 0x798]
push ecx
push edx
mov edx, dword [esi + 0x420]
push eax
mov al, byte [esi + 0x784]
xor ecx, ecx
lea ebx, [esi + 0x14]
test al, al
sete cl
push ecx
push edx
lea ecx, [ebp - 0x8e8]
mov byte [ebp - 4], 6
mov dword [ebp - 0x8d8], ebx
mov dword [ebp - 0x850], ebx
call fcn.004fe230
mov eax, dword [esi + 0x42c]
mov ecx, dword [esi + 0x428]
push eax
push ecx
lea ecx, [ebp - 0x8e8]
call fcn.004fe510
mov al, byte [esi + 0x784]
test al, al
je 0x503b04
xor edi, edi
mov bl, 1
mov dword [esi + 0x780], edi
jmp 0x503ba4
mov edx, dword [esi + 0x50]
mov eax, dword [esi + 0x7b0]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x503b8e
mov eax, dword [esi + 0x428]
mov ecx, dword [esi + 0x42c]
mov dword [esi + 0x430], eax
mov dword [ebp - 0x6cc], ecx
mov dword [esi + 0x434], ecx
lea ecx, [ebp - 0x8e8]
mov dword [ebp - 0x6d0], eax
mov dword [esi + 0x780], 0
call fcn.004fe4a0
mov eax, dword [esi + 0x54]
xor edi, edi
test eax, eax
mov byte [ebp - 0x19], 1
mov dword [esi + 0x65c], 3
je 0x503b91
mov eax, dword [ebx]
test eax, eax
je 0x503b83
push edi
push 0x138a
push 0x111
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
push 1
mov ecx, esi
call fcn.00502750
jmp 0x503b91
mov edi, dword [ebp - 0x2c]
push 0x5c6ff0
lea ecx, [esi + 0x7b0]
call fcn.00542347
mov bl, byte [ebp - 0x19]
lea ecx, [ebp - 0x8e8]
mov byte [ebp - 4], 5
call fcn.004e7aa0
push 0x4ddad0
push 0x10
lea eax, [ebp - 0x30fe8]
push 0x3070
push eax
mov byte [ebp - 4], 0
call fcn.005278b1
test bl, bl
jne 0x503c2e
mov eax, dword [esi + 0x44]
cmp eax, 1
je 0x503c25
cmp eax, 2
je 0x503c25
cmp eax, 3
mov ecx, esi
jne 0x503c06
call fcn.005002e0
mov edi, eax
mov byte [esi + 0x367], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.004ffd10
mov edi, eax
mov byte [esi + 0x367], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.005007c0
mov edi, eax
mov byte [esi + 0x367], 0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret