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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55a4d0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x28], esi
mov edx, dword [esi + 0x408]
mov dword [ebp - 4], 0
test edx, edx
jne 0x4f9cb2
mov al, byte [esi + 0x786]
test al, al
je 0x4f9cb2
mov eax, dword [0x5b5ecc]
mov dword [ebp - 0x18], eax
mov ecx, dword [esi + 0x4c]
lea edx, [ebp - 0x18]
push ecx
push 0x597ddc
push edx
mov byte [ebp - 4], 1
call fcn.0053091a
mov eax, dword [ebp - 0x18]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4f9b37
mov edi, 2
inc edi
lea ecx, [ebp - 0x18]
push edi
push 0x5c
call fcn.00537fd9
mov edi, eax
cmp edi, 0xffffffff
je 0x4f9b37
lea ecx, [ebp - 0x20]
push edi
push ecx
lea ecx, [ebp - 0x18]
call fcn.005304fa
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
lea ecx, [ebp - 0x20]
sete bl
call fcn.00537b04
test bl, bl
je 0x4f9a42
lea edx, [ebp - 0x1c]
push edi
push edx
lea ecx, [ebp - 0x18]
call fcn.005304fa
mov eax, dword [eax]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
lea ecx, [ebp - 0x1c]
sete bl
call fcn.00537b04
test bl, bl
je 0x4f9a42
mov eax, dword [0x5b5ecc]
mov dword [ebp - 0x1c], eax
push 0
lea ecx, [ebp - 0x14]
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 - 0x14]
mov eax, dword [0x5bb3ac]
push edx
lea ecx, [ebp - 0x1c]
push eax
push ecx
call fcn.0053091a
mov edx, dword [ebp - 0x14]
add esp, 0xc
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
push 0x30
push eax
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.00537b04
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0
call fcn.00537b04
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 + 0x77c]
test eax, eax
je 0x4f9ca4
mov eax, dword [esi + 0x780]
test eax, eax
je 0x4f9ca4
lea edx, [ebp - 0x20]
lea eax, [ebp - 0x14]
push edx
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push eax
push 0
push 0xf003f
push 0
push 0x5ba440
push 0
push str.SoftwareDownloadManagerGrabberStsProjects_
push 0x80000001
call edi
test eax, eax
jne 0x4f9ca4
mov ecx, dword [ebp - 0x14]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call ebx
mov edx, dword [0x5b5ecc]
mov dword [ebp - 0x1c], edx
mov eax, dword [esi + 0x77c]
lea ecx, [ebp - 0x1c]
push eax
push str.SoftwareDownloadManagerGrabberStsProjects_ld_
push ecx
mov byte [ebp - 4], 3
call fcn.0053091a
add esp, 0xc
mov ecx, dword [ebp - 0x1c]
lea edx, [ebp - 0x20]
lea eax, [ebp - 0x14]
push edx
push eax
push 0
push 0xf003f
push 0
push 0x5ba440
push 0
push ecx
push 0x80000001
call edi
test eax, eax
jne 0x4f9c98
mov edx, dword [ebp - 0x14]
push edx
call ebx
mov eax, dword [esi + 0x780]
mov ecx, dword [esi + 0x77c]
push eax
push ecx
lea edx, [ebp - 0x1c]
push str.SoftwareDownloadManagerGrabberStsProjects_ld_ld_
push edx
call fcn.0053091a
add esp, 0x10
mov edx, dword [ebp - 0x1c]
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x14]
push eax
push ecx
push 0
push 0xf003f
push 0
push 0x5ba440
push 0
push edx
push 0x80000001
call edi
test eax, eax
jne 0x4f9c98
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 - 0x14]
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 - 0x14]
push edx
push 1
push eax
push str.LocalPath
push ecx
call ebx
lea edx, [esi + 0x430]
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 - 0x14]
push 1
push eax
push str.LogFileName
push edx
call ebx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.00537b04
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0
call fcn.00537b04
jmp 0x4f9ce6
mov al, byte [esi + 0x76c]
test al, al
je 0x4f9cc4
mov ecx, dword [esi + 0x780]
jmp 0x4f9cc6
xor ecx, ecx
test al, al
je 0x4f9cd2
mov eax, dword [esi + 0x77c]
jmp 0x4f9cd4
xor eax, eax
push ecx
push eax
push edx
lea ecx, [esi + 0x20]
call fcn.004fdf80
mov byte [esi + 0x786], 1
mov ecx, dword [esi + 0x408]
lea ebx, [esi + 0x20]
push ecx
mov ecx, ebx
call fcn.004fdc40
mov eax, dword [esi + 0x18]
xor edi, edi
cmp eax, edi
je 0x4f9d18
mov edx, dword [esi + 0x408]
push edx
push 0x13cd
push 0x111
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
push 1
mov ecx, esi
mov dword [esi + 0x768], edi
mov dword [esi + 0x778], edi
call fcn.004f9050
lea ecx, [esi + 0x42c]
call fcn.004c99e0
mov edi, dword [esi + 0x38]
test edi, edi
je 0x4f9d52
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [ebp - 0x20], ecx
jne 0x4f9e64
mov eax, dword [esi + 0x44]
cmp eax, 2
je 0x4f9d63
cmp eax, 1
jne 0x4f9e64
mov eax, dword [esi + 0x24]
test eax, eax
je 0x4f9d94
push str._simtelnet_
push eax
call fcn.0051cb70
add esp, 8
test eax, eax
je 0x4f9d94
mov eax, dword [ebx]
push str.simtel.net
push eax
call fcn.0051cb70
add esp, 8
test eax, eax
je 0x4f9e64
mov eax, dword [esi + 0x770]
test eax, eax
jne 0x4f9e64
mov ecx, dword [0x5b5ecc]
mov dword [ebp - 0x1c], ecx
mov eax, dword [esi + 0x34]
mov byte [ebp - 4], 4
cmp eax, 0x50
jne 0x4f9dbd
cmp dword [esi + 0x44], 1
je 0x4f9dca
cmp eax, 0x1bb
jne 0x4f9ddd
cmp dword [esi + 0x44], 2
jne 0x4f9ddd
lea edx, [ebp - 0x24]
push 0x5ba440
push edx
call fcn.0051d0e8
add esp, 8
jmp 0x4f9def
push eax
lea eax, [ebp - 0x24]
push str.:_ld
push eax
call fcn.0051d0e8
add esp, 0xc
mov eax, dword [esi + 0x24]
test eax, eax
mov edx, eax
jne 0x4f9dfd
mov edx, 0x5ba440
test eax, eax
je 0x4f9e0d
mov cl, byte [eax]
cmp cl, 0x2f
mov ecx, 0x5ba440
je 0x4f9e12
mov ecx, 0x599924
mov eax, dword [esi + 0x44]
cmp eax, 1
mov eax, 0x598034
je 0x4f9e24
mov eax, 0x597fe8
push edx
mov edx, dword [ebx]
push ecx
lea ecx, [ebp - 0x24]
push ecx
push edx
push eax
lea eax, [ebp - 0x1c]
push str._s:___s_s_s_s
push eax
call fcn.0053091a
mov ecx, dword [ebp - 0x1c]
add esp, 0x1c
push ecx
mov ecx, esi
call fcn.004fb310
lea ecx, [ebp - 0x1c]
mov byte [esi + 0x349], 1
mov byte [esi + 0x34a], 1
mov byte [ebp - 4], 0
call fcn.00537b04
mov eax, dword [esi + 0x44]
mov byte [esi + 0x348], 0
cmp eax, 1
mov dword [esi + 0x1c0], 0
je 0x4f9ec3
cmp eax, 2
je 0x4f9ec3
cmp eax, 3
mov ecx, esi
jne 0x4f9ea6
call fcn.004f69d0
mov byte [esi + 0x34e], 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.004f6400
mov byte [esi + 0x34e], 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.004f6eb0
mov byte [esi + 0x34e], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret