Function at 0x505f30
Capabilities:
Delete file
Get common file path
Query or enumerate registry value
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57370d
mov eax, dword fs:[0]
push eax
sub esp, 0x314
mov eax, dword [0x5d6b80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x308], ebx
mov eax, dword [ebp + 8]
or edi, 0xffffffff
cmp dword [ebx + 0x28], 0
mov dword [ebp - 0x314], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x30c], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x310], eax
jne 0x506228
mov dword [ebx + 0x28], 1
mov dword [ebp - 0x320], 0
mov dword [ebp - 0x31c], 0
mov dword [ebp - 0x318], 0
push 0x20019
push str.SoftwareAPNUDebug
push reloc.WS2_32.dll_accept
lea ecx, [ebp - 0x320]
mov dword [ebp - 4], 0
call fcn.0045b220
mov edi, dword [ebp - 0x320]
test eax, eax
jne 0x506213
lea eax, [ebp - 0x2fc]
mov dword [ebp - 0x2fc], 4
push eax
lea eax, [ebx + 0x34]
push eax
lea eax, [ebp - 0x304]
push eax
push 0
push 0x58deac
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x2fc]
mov dword [ebp - 0x2fc], 4
push eax
lea esi, [ebx + 0x38]
push esi
lea eax, [ebp - 0x304]
push eax
push 0
push str.DbgFormat
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [esi], 0
jne 0x506041
mov dword [esi], 0x11
lea eax, [ebp - 0x2fc]
mov dword [ebp - 0x2fc], 4
push eax
lea eax, [ebp - 0x300]
push eax
lea eax, [ebp - 0x304]
push eax
push 0
push str.DbgFileOut
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x506088
cmp dword [ebp - 0x304], 4
jne 0x506088
cmp eax, dword [ebp - 0x300]
sbb eax, eax
neg eax
mov dword [ebx + 0x2c], eax
mov eax, dword [ebx + 0x30]
lea esi, [ebx + 0x30]
mov ecx, 1
mov dword [ebp - 0x2fc], 0x104
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x14], 0xffffffff
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x5060c2
push 0x104
mov ecx, esi
call fcn.0045b530
mov eax, dword [esi]
lea ecx, [ebp - 0x2fc]
push ecx
push eax
push str.DbgFilePath
lea ecx, [ebp - 0x320]
mov dword [ebp - 0x18], eax
call fcn.0045d730
test eax, eax
lea ecx, [ebp - 0x1c]
setne bl
call fcn.0045c070
test bl, bl
je 0x5060f7
mov ecx, esi
call fcn.0045abd0
mov ebx, dword [ebp - 0x308]
cmp dword [ebx + 0x2c], 0
je 0x506213
call fcn.0045adc0
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x506123
push 0x80004005
call fcn.0045a8f0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x2f8], eax
mov eax, dword [esi]
mov byte [ebp - 4], 1
cmp dword [eax - 0xc], 0
jne 0x506181
push 0x208
call fcn.005243ff
add esp, 4
mov esi, eax
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push esi
lea ecx, [ebp - 0x2f8]
call fcn.0045a5f0
push esi
call fcn.00525873
add esp, 4
lea ecx, [ebp - 0x2f8]
push str.TBNotifier.log
call fcn.0047f960
jmp 0x50618d
push esi
lea ecx, [ebp - 0x2f8]
call fcn.0045a580
mov esi, dword [ebp - 0x2f8]
lea eax, [ebp - 0x2f4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x5061c7
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x2d4], 0x100000
jbe 0x5061c7
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x5061c7
mov dword [ebx + 0x2c], eax
cmp dword [ebx + 0x2c], 0
je 0x5061f5
push 0
push 0x80
push 4
push 0
push 3
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebx + 0xc], eax
cmp eax, 0xffffffff
jne 0x5061f5
mov dword [ebx + 0x2c], 0
add esi, 0xfffffff0
mov byte [ebp - 4], 0
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x506213
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x506225
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
or edi, 0xffffffff
mov eax, dword [ebp + 0xc]
test dword [ebp + 0x10], eax
jne 0x506237
xor eax, eax
jmp 0x5065bd
mov ecx, dword [ebx + 0x34]
test ecx, ecx
je 0x506230
test al, 1
je 0x506247
test cl, 1
je 0x506230
test al, 2
je 0x506250
test cl, 2
je 0x506230
test al, 4
je 0x506259
test cl, 4
je 0x506230
test al, 8
je 0x506262
test cl, 8
je 0x506230
call fcn.0045adc0
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x50627e
push 0x80004005
call fcn.0045a8f0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x2f8], eax
mov dword [ebp - 4], 2
call fcn.0045adc0
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x5062b1
push 0x80004005
call fcn.0045a8f0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x2fc], esi
mov eax, dword [ebx + 0x38]
mov byte [ebp - 4], 3
test al, 8
jne 0x5062d6
cmp dword [ebx + 0x2c], 0
je 0x50630e
test al, 0x10
je 0x50630e
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0x12]
push eax
movzx eax, word [ebp - 0x14]
push eax
movzx eax, word [ebp - 0x16]
push eax
movzx eax, word [ebp - 0x18]
push eax
lea eax, [ebp - 0x2fc]
push str._0.2d:_0.2d:_0.2d._0.3d
push eax
call fcn.0045acb0
mov esi, dword [ebp - 0x2fc]
add esp, 0x18
test byte [ebx + 0x38], 8
je 0x506339
push dword [esi - 0xc]
lea ecx, [ebp - 0x2f8]
push esi
call fcn.00472540
test byte [ebx + 0x38], 8
je 0x506339
push 0x58df54
lea ecx, [ebp - 0x2f8]
call fcn.0047f960
push dword [ebp - 0x30c]
lea ecx, [ebp - 0x300]
call fcn.0045a3a0
push 0x58df58
lea ecx, [ebp - 0x300]
mov byte [ebp - 4], 4
call fcn.0047f960
push 5
lea eax, [ebp - 0x30c]
push eax
lea ecx, [ebp - 0x300]
call fcn.0045b030
push dword [eax]
lea eax, [ebp - 0x2f8]
mov byte [ebp - 4], 5
push 0x581bc4
push eax
call fcn.0045ccb0
mov edx, dword [ebp - 0x30c]
add esp, 0xc
add edx, 0xfffffff0
mov byte [ebp - 4], 4
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5063af
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x300]
mov ecx, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 3
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5063d2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test byte [ebx + 0x38], 2
je 0x5063fc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push edi
push eax
lea eax, [ebp - 0x2f8]
push str.__5d:_5d_
push eax
call fcn.0045ccb0
add esp, 0x10
test byte [ebx + 0x38], 4
je 0x50641c
push dword [ebp - 0x314]
lea eax, [ebp - 0x2f8]
push str.__s_
push eax
call fcn.0045ccb0
add esp, 0xc
push dword [ebp - 0x310]
lea eax, [ebp - 0x2f8]
push str.__s_r_n
push eax
call fcn.0045ccb0
mov edi, dword [ebp - 0x2f8]
add esp, 0xc
cmp dword [ebx + 0x2c], 0
je 0x50656d
lea ecx, [ebp - 0x300]
call fcn.0045a530
mov eax, dword [ebx + 0x38]
mov byte [ebp - 4], 6
test al, 8
je 0x506470
lea eax, [ebp - 0x2f8]
push eax
lea ecx, [ebp - 0x300]
call fcn.0045a580
jmp 0x50648a
test al, 0x10
je 0x50648a
push edi
push esi
lea eax, [ebp - 0x300]
push str._s__s
push eax
call fcn.0045acb0
add esp, 0x10
push 0xfde9
push dword [ebp - 0x300]
lea eax, [ebp - 0xa0]
lea ecx, [ebp - 0xa4]
mov dword [ebp - 0xa4], eax
call fcn.00491750
mov ecx, dword [ebp - 0xa4]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5064b5
lea eax, [ebx + 0x10]
sub ecx, edx
push eax
mov dword [ebp - 0x304], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 2
push 0
push 0
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push dword [ebp - 0x304]
mov ebx, eax
mov eax, dword [ebp - 0x308]
push 0
push ebx
push dword [eax + 0xc]
call dword [sym.imp.KERNEL32.dll_LockFile]
push 0
lea eax, [ebp - 0x314]
push eax
push dword [ebp - 0x304]
mov eax, dword [ebp - 0x308]
push dword [ebp - 0xa4]
push dword [eax + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push dword [ebp - 0x304]
push 0
push ebx
mov ebx, dword [ebp - 0x308]
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_UnlockFile]
lea eax, [ebx + 0x10]
test eax, eax
je 0x506545
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0xa4]
lea ecx, [ebp - 0xa0]
cmp eax, ecx
je 0x50655e
push eax
call fcn.0052616f
add esp, 4
lea ecx, [ebp - 0x300]
mov byte [ebp - 4], 3
call fcn.0048ceb0
mov eax, dword [ebx]
push edi
push ebx
call dword [eax]
add esi, 0xfffffff0
mov dword [ebp - 0x310], eax
or ebx, 0xffffffff
mov byte [ebp - 4], 2
mov edx, ebx
lea ecx, [esi + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x506599
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x5065b7
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x310]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00525878
mov esp, ebp
pop ebp
ret 0x14