Function at 0x403ba0
Capabilities:
Delete registry value
Get file size
Persist via windows service
Read file via mapping
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41bb50
push 0x405f5c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
mov eax, dword [0x422948]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov edi, ecx
mov dword [ebp - 0x48], edi
mov esi, dword [ebp + 8]
test esi, esi
jle 0x404043
cmp esi, 0x7fff
jg 0x404043
call fcn.004035e0
mov dword [ebp - 0x4c], eax
test eax, eax
jl 0x404043
cmp dword [edi], 0
je 0x404043
cmp eax, esi
je 0x403e10
mov eax, dword [0x4238b4]
test eax, eax
jne 0x403c60
push str.imagehlp.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x4238b4], eax
test eax, eax
je 0x404043
push str.CheckSumMappedFile
push eax
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call esi
mov dword [0x4238b0], eax
push str.ImageNtHeader
mov eax, dword [0x4238b4]
push eax
call esi
mov dword [0x4238ac], eax
mov eax, dword [0x4238b4]
test eax, eax
je 0x404043
mov eax, dword [0x4238b0]
test eax, eax
je 0x404043
mov eax, dword [0x4238ac]
test eax, eax
je 0x404043
mov ecx, edi
call fcn.004035b0
test eax, eax
je 0x403c98
push 0
push 0x10000000
lea ecx, [edi + 0x14]
push ecx
call fcn.00403150
add esp, 0xc
lea esi, [edi + 0x14]
push 0
push esi
call fcn.00403390
add esp, 8
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
test esi, esi
je 0x404043
cmp esi, 0xffffffff
je 0x404043
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x54], eax
cmp eax, 0xffffffff
je 0x40403c
mov edx, dword [edi]
add edx, 0x80
cmp eax, edx
jbe 0x40403c
push 0
push 0
push 0
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edi, eax
mov dword [ebp - 0x30], edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x404043
cmp edi, 0xffffffff
je 0x404043
push 0
push 0
push 0
push 6
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
mov dword [ebp - 0x3c], ebx
xor esi, esi
cmp ebx, esi
je 0x403fad
cmp dword [ebp + 8], 0xa
je 0x403d9e
mov eax, dword [0x4238bc]
cmp eax, esi
je 0x403d9e
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x403d9e
push ebx
call dword [0x4238ac]
cmp eax, esi
je 0x403d9e
cmp dword [eax], 0x4550
jne 0x403d9e
cmp dword [eax + 0x98], esi
jne 0x403d80
cmp dword [eax + 0x9c], esi
je 0x403d9e
push esi
push esi
push 0x2401
mov eax, dword [0x4238bc]
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
cmp eax, 0x3e7
jne 0x403fa6
mov dword [ebp - 0x34], esi
mov edx, dword [ebp - 0x48]
mov ecx, edx
call fcn.004035b0
mov ecx, dword [edx]
test eax, eax
je 0x403f94
mov byte [ebp - 0x2c], 0xf
mov byte [ebp - 0x2b], 0x87
mov byte [ebp - 0x2a], 0x8b
mov byte [ebp - 0x29], 0
mov byte [ebp - 0x28], 0
mov byte [ebp - 0x27], 0
mov al, 0x90
mov byte [ebp - 0x24], al
mov byte [ebp - 0x23], al
mov byte [ebp - 0x22], al
mov byte [ebp - 0x21], al
mov byte [ebp - 0x20], al
mov byte [ebp - 0x1f], al
lea eax, [ecx + ebx]
mov ecx, 3
lea edi, [ebp - 0x2c]
mov esi, eax
xor edx, edx
repe cmpsw word [esi], word es:[edi]
jne 0x403f3f
cmp dword [ebp + 8], 0xa
jg 0x403e1a
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x404045
mov dword [ebp - 4], 0
push 6
lea ecx, [ebp - 0x24]
push ecx
push eax
call fcn.004058f0
add esp, 0xc
mov dword [ebp - 0x34], 1
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp - 0x30]
xor esi, esi
cmp dword [ebp - 0x34], esi
je 0x403ea1
mov dword [0x4238b8], 1
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x44], esi
lea edx, [ebp - 0x44]
push edx
lea eax, [ebp - 0x40]
push eax
mov ecx, dword [ebp - 0x54]
push ecx
push ebx
call dword [0x4238b0]
push ebx
call dword [0x4238ac]
cmp eax, esi
je 0x403ea1
mov ecx, dword [eax + 0x58]
cmp ecx, dword [ebp - 0x40]
jne 0x403ea1
cmp dword [eax], 0x4550
jne 0x403ea1
mov dword [ebp - 4], 3
mov edx, dword [ebp - 0x44]
cmp ecx, edx
je 0x403e97
mov dword [eax + 0x58], edx
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x34], esi
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x34]
cmp edi, esi
jne 0x40400d
mov ecx, dword [ebp - 0x48]
call fcn.004035b0
test eax, eax
je 0x40400d
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x5c], esi
lea ecx, [ebp - 0x5c]
push ecx
lea edx, [ebp - 0x38]
push edx
push esi
push 2
push esi
push esi
push esi
push str.SYSTEMCurrentControlSetServicesTcpipParameters
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x404043
mov eax, dword [ebp + 8]
cmp eax, 0xa
jle 0x403fea
mov dword [ebp - 0x50], eax
push 4
lea eax, [ebp - 0x50]
push eax
push 4
push esi
push str.TcpNumConnections
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x403ff9
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x404043
mov ecx, 3
lea edi, [ebp - 0x24]
mov esi, eax
xor edx, edx
repe cmpsw word [esi], word es:[edi]
jne 0x403f84
cmp dword [ebp + 8], 0xa
jg 0x403e3e
mov esi, 1
mov dword [ebp - 4], esi
push 6
lea ecx, [ebp - 0x2c]
push ecx
push eax
call fcn.004058f0
add esp, 0xc
mov dword [ebp - 0x34], esi
jmp 0x403e37
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp - 0x30]
push ecx
jmp 0x40403d
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x58], eax
lea eax, [ecx + ebx]
lea edx, [ebp - 0x58]
mov ecx, dword [eax]
cmp ecx, dword [edx]
je 0x403fb3
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push edi
jmp 0x40403d
mov edx, dword [ebp + 8]
mov dword [ebp - 0x60], edx
mov dword [ebp - 4], 2
push 4
lea ecx, [ebp - 0x60]
push ecx
push eax
call fcn.004058f0
add esp, 0xc
mov dword [ebp - 0x34], 1
mov dword [ebp - 4], 0xffffffff
jmp 0x403e43
push str.TcpNumConnections
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [0x4238b8], 1
xor eax, eax
cmp edi, esi
sete al
jmp 0x404045
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.004053fe
mov esp, ebp
pop ebp
ret 4