joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4010a9
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push 0
lea eax, [ebp - 8]
push eax
push 0
push 2
push 0
push 0
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [0x41f004]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4010da
xor eax, eax
jmp 0x40114e
cmp dword [ebp + 0x18], 3
je 0x4010e6
cmp dword [ebp + 0x18], 7
jne 0x4010e8
jmp 0x40113f
cmp dword [ebp + 0x18], 4
je 0x401125
cmp dword [ebp + 0x18], 4
je 0x401125
cmp dword [ebp + 0x18], 5
je 0x401125
mov eax, dword [ebp + 0x14]
push eax
call fcn.00401ac8
add esp, 4
lea ecx, [eax + eax + 2]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x18]
push eax
push 0
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [0x41f008]
jmp 0x40113f
push 4
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x18]
push ecx
push 0
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [0x41f008]
mov ecx, dword [ebp - 8]
push ecx
call dword [0x41f00c]
mov eax, 1
mov esp, ebp
pop ebp
ret
Function at 0x407200
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41d278
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
push 1
lea ecx, [esp + 8]
call fcn.00411450
mov eax, dword [esp + 8]
mov dword [esp + 0x38], 0
mov ecx, dword [eax + 4]
mov eax, dword [esp + 0x48]
push eax
mov edx, dword [esp + ecx + 0xc]
lea esi, [esp + ecx + 0xc]
mov ecx, dword [esp + 0x48]
push ecx
mov ecx, esi
call dword [edx + 4]
mov eax, dword [esp + 0x40]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 8]
lea ecx, [esp + 0x2c]
mov dword [esp + 0x38], 0xffffffff
call fcn.0040fa90
mov ecx, dword [esp + 0x30]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret

Function at 0x407300
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41d301
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xac
push esi
push edi
lea ecx, [esp + 0x30]
call fcn.00409fb0
lea ecx, [esp + 0x18]
mov dword [esp + 0xbc], 0
call fcn.00409fb0
lea ecx, [esp + 0xc]
mov byte [esp + 0xbc], 1
call fcn.00409fb0
lea ecx, [esp + 0x24]
mov byte [esp + 0xbc], 2
call fcn.00409fb0
mov edi, dword [esp + 0xd0]
lea eax, [esp + 0x30]
push edi
push eax
mov byte [esp + 0xc4], 3
call fcn.004071b0
mov esi, eax
lea ecx, [esp + 0x20]
add esi, edi
push esi
push ecx
call fcn.004071b0
add esi, eax
lea edx, [esp + 0x1c]
push esi
push edx
call fcn.004071b0
add esi, eax
lea eax, [esp + 0x3c]
push esi
push eax
call fcn.004071b0
add esp, 0x20
lea ecx, [esp + 0x24]
lea edx, [esp + 0xc]
lea eax, [esp + 0x18]
push 1
push ecx
push edx
lea ecx, [esp + 0x3c]
push eax
push ecx
lea ecx, [esp + 0x54]
call fcn.004122c0
mov edx, dword [esp + 0xcc]
mov eax, dword [esp + 0xc8]
mov ecx, dword [esp + 0xc4]
push edx
mov edx, dword [esp + 0x4c]
push eax
push ecx
mov byte [esp + 0xc8], 4
mov eax, dword [edx + 0x10]
lea ecx, [esp + eax + 0x54]
call fcn.00411f40
and eax, 0xff
lea ecx, [esp + 0x94]
mov esi, eax
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x4c]
mov byte [esp + 0xbc], 5
call fcn.004077a0
lea eax, [esp + 0x40]
lea edx, [esp + 0x48]
neg eax
sbb eax, eax
mov byte [esp + 0xbc], 3
and eax, edx
lea ecx, [eax + 0x48]
call fcn.004074f0
mov dword [esp + 0xa4], 0x41f710
mov dword [esp + 0x9c], 0x41f704
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
xor eax, eax
mov dword [esp + 0x94], 0x41f6f4
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x28]
push eax
call fcn.00401bbb
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x14]
push ecx
call fcn.00401bbb
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
xor eax, eax
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x24]
push edx
call fcn.00401bbb
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x40]
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x40]
push eax
call fcn.00401bbb
mov ecx, dword [esp + 0xc4]
add esp, 0x10
mov eax, esi
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0xb8
ret
Function at 0x40bdf0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41d658
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push esi
xor esi, esi
push edi
lea ecx, [esp + 0xc]
mov dword [esp + 8], esi
call fcn.00409fb0
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
push eax
lea edx, [esp + 0x10]
push ecx
push edx
mov dword [esp + 0x2c], esi
call fcn.0040bdb0
mov esi, dword [esp + 0x34]
add esp, 0xc
lea eax, [esp + 0xc]
mov ecx, esi
push eax
call fcn.00409fe0
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00401bbb
mov ecx, dword [esp + 0x1c]
add esp, 4
mov eax, esi
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0x1c
ret

Function at 0x40d690
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push 0xffffffffffffffff
push 0x41d954
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
mov dword [esi], 0x41f9c0
push esi
lea ecx, [esi + 4]
mov dword [esp + 0x1c], 0
call fcn.0040e420
mov dword [esi], 0x41f8ec
mov ebx, dword [esp + 0x20]
lea edi, [esi + 0xc]
push ebx
mov ecx, edi
mov dword [esp + 0x1c], 1
call fcn.00409fe0
mov eax, dword [ebx]
lea ecx, [esi + 0x18]
push eax
push 0
mov byte [esp + 0x20], 2
call fcn.0040a790
lea ecx, [esi + 0x24]
mov byte [esp + 0x18], 3
call fcn.00409fb0
mov dword [esi], 0x41f7b0
mov ecx, dword [edi]
mov dword [esp + 0x18], 4
push ecx
push 0
lea ecx, [esi + 0x30]
call fcn.0040a790
mov eax, dword [edi]
mov byte [esp + 0x18], 5
lea eax, [eax + eax*4]
mov dword [esi + 0x3c], eax
lea edx, [eax*4]
push edx
call fcn.00401bc6
mov dword [esi + 0x40], eax
mov eax, dword [edi]
mov dword [esi], 0x41f968
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0x40]
push eax
mov eax, dword [esi + 0x34]
push ecx
push edx
push eax
mov byte [esp + 0x2c], 6
call fcn.00409190
mov ecx, dword [esp + 0x24]
add esp, 0x14
mov eax, esi
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x10
ret 4

Function at 0x40fe10
Capabilities:
Hash data using sha1

Disassembly:
xor eax, eax
mov dword [ecx + 0x10], eax
mov dword [ecx + 0xc], eax
mov eax, dword [ecx + 0x20]
mov dword [eax], 0x67452301
mov edx, dword [ecx + 0x20]
mov dword [edx + 4], 0xefcdab89
mov eax, dword [ecx + 0x20]
mov dword [eax + 8], 0x98badcfe
mov edx, dword [ecx + 0x20]
mov dword [edx + 0xc], 0x10325476
mov eax, dword [ecx + 0x20]
mov dword [eax + 0x10], 0xc3d2e1f0
ret

Function at 0x4114f0
Capabilities:
Hash data with md5

Disassembly:
xor eax, eax
mov dword [ecx + 0x10], eax
mov dword [ecx + 0xc], eax
mov eax, dword [ecx + 0x20]
mov dword [eax], 0x67452301
mov edx, dword [ecx + 0x20]
mov dword [edx + 4], 0xefcdab89
mov eax, dword [ecx + 0x20]
mov dword [eax + 8], 0x98badcfe
mov ecx, dword [ecx + 0x20]
mov dword [ecx + 0xc], 0x10325476
ret
Function at 0x4121b0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41dd28
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push esi
push edi
mov esi, ecx
xor edi, edi
lea ecx, [esp + 0xc]
mov dword [esp + 8], edi
call fcn.00409fb0
add esi, 0x10
mov dword [esp + 0x20], edi
mov ecx, esi
call fcn.0040a870
mov ecx, dword [esp + 0x30]
push edi
lea edx, [ecx*8]
cmp edx, eax
ja 0x41220a
mov eax, dword [esp + 0x30]
push ecx
push eax
lea ecx, [esp + 0x18]
call fcn.0040a8b0
jmp 0x41223f
mov ecx, esi
call fcn.0040a840
mov ecx, dword [esp + 0x30]
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.0040a8b0
mov ecx, esi
call fcn.0040a840
shl eax, 3
mov ecx, esi
mov edi, eax
call fcn.0040a870
sub edi, eax
lea ecx, [esp + 0xc]
push edi
call fcn.0040bae0
mov esi, dword [esp + 0x28]
lea edx, [esp + 0xc]
push edx
mov ecx, esi
call fcn.00409fe0
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
push eax
call fcn.00401bbb
mov ecx, dword [esp + 0x1c]
add esp, 4
mov eax, esi
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0x1c
ret 0xc

Function at 0x4132a0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x41df90
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov eax, dword [esp + 0x2c]
push ebp
push esi
mov esi, ecx
xor edx, edx
push edi
mov ecx, dword [esi + 4]
lea eax, [ecx + eax - 1]
div ecx
lea ecx, [esp + 0xc]
push eax
push ecx
call fcn.0040a1a0
add esp, 8
lea ecx, [esi + 8]
push eax
mov dword [esp + 0x30], 0
call fcn.0040a2f0
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
xor eax, eax
mov dword [esp + 0x2c], 0xffffffff
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x10]
push edx
call fcn.00401bbb
mov eax, dword [esp + 0x38]
mov ecx, dword [esi + 0x18]
add esp, 4
push eax
call fcn.0040a2f0
mov eax, dword [esi + 4]
mov ebp, 1
cmp eax, ebp
jbe 0x413383
push ebx
mov ebx, 0xc
mov eax, dword [esi + 0x18]
mov ecx, dword [esi]
lea edx, [esi + 8]
mov edi, dword [ecx]
push edx
lea edx, [ebx + eax - 0xc]
lea eax, [esp + 0x20]
push edx
push eax
call dword [edi + 0x24]
mov ecx, dword [esi + 0x18]
push eax
add ecx, ebx
mov dword [esp + 0x34], 1
call fcn.0040a2f0
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
xor eax, eax
mov dword [esp + 0x30], 0xffffffff
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x20]
push ecx
call fcn.00401bbb
mov eax, dword [esi + 4]
add esp, 4
inc ebp
add ebx, 0xc
cmp ebp, eax
jb 0x41332b
pop ebx
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x24
ret 8
Function at 0x413b20
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41e080
push eax
mov dword fs:[0], esp
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x18], 0
lea esi, [edi + edi + 2]
mov dword [esp + 0x24], edi
cmp esi, eax
jge 0x413bbd
lea eax, [esi + esi*2]
lea ebx, [ebp + eax*8]
mov ecx, ebx
lea eax, [ebx - 0x18]
push eax
call fcn.0040c5b0
test eax, eax
jl 0x413b8c
push ebx
lea ecx, [ebx - 0x18]
call fcn.0040c5b0
test eax, eax
jl 0x413b8d
lea ecx, [ebx - 0xc]
push ecx
lea ecx, [ebx + 0xc]
call fcn.0040c5b0
test eax, eax
jge 0x413b8d
dec esi
lea edx, [esi + esi*2]
lea eax, [edi + edi*2]
lea ebx, [ebp + edx*8]
lea edi, [ebp + eax*8]
push ebx
mov ecx, edi
call fcn.0040a2f0
add ebx, 0xc
lea ecx, [edi + 0xc]
push ebx
call fcn.0040a2f0
mov eax, dword [esp + 0x28]
mov edi, esi
lea esi, [esi + esi + 2]
cmp esi, eax
jl 0x413b59
cmp esi, dword [esp + 0x28]
jne 0x413be8
lea ecx, [esi + esi*2]
lea edx, [edi + edi*2]
lea ebx, [ebp + ecx*8 - 0x18]
lea edi, [ebp + edx*8]
push ebx
mov ecx, edi
call fcn.0040a2f0
add ebx, 0xc
lea ecx, [edi + 0xc]
push ebx
call fcn.0040a2f0
lea edi, [esi - 1]
sub esp, 0x18
lea eax, [esp + 0x44]
mov esi, esp
mov dword [esp + 0x40], esp
push eax
mov ecx, esi
mov dword [esp + 0x44], esi
call fcn.00409fe0
lea ecx, [esp + 0x50]
mov byte [esp + 0x30], 1
push ecx
lea ecx, [esi + 0xc]
call fcn.00409fe0
mov edx, dword [esp + 0x3c]
mov byte [esp + 0x30], 0
push edx
push edi
push ebp
call fcn.00413d40
mov ecx, dword [esp + 0x5c]
mov edi, dword [esp + 0x60]
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x60]
push eax
call fcn.00401bbb
mov ecx, dword [esp + 0x54]
mov edi, dword [esp + 0x58]
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x58]
push ecx
call fcn.00401bbb
mov ecx, dword [esp + 0x3c]
add esp, 0x2c
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x413c70
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41e0a0
push eax
mov dword fs:[0], esp
push esi
push edi
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
push esi
mov ecx, edi
mov dword [esp + 0x14], 0
call fcn.0040a2f0
lea eax, [esi + 0xc]
lea ecx, [edi + 0xc]
push eax
call fcn.0040a2f0
sub esp, 0x18
lea ecx, [esp + 0x3c]
mov dword [esp + 0x30], esp
mov edi, esp
push ecx
mov ecx, edi
mov dword [esp + 0x34], edi
call fcn.00409fe0
lea edx, [esp + 0x48]
lea ecx, [edi + 0xc]
push edx
mov byte [esp + 0x2c], 1
call fcn.00409fe0
mov ecx, dword [esp + 0x34]
mov eax, 0x2aaaaaab
sub ecx, esi
mov byte [esp + 0x28], 0
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
push edx
push 0
push esi
call fcn.00413b20
mov ecx, dword [esp + 0x54]
mov edi, dword [esp + 0x58]
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x58]
push ecx
call fcn.00401bbb
mov ecx, dword [esp + 0x4c]
mov edi, dword [esp + 0x50]
xor eax, eax
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x50]
push edx
call fcn.00401bbb
mov ecx, dword [esp + 0x34]
add esp, 0x2c
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0xc
ret

Function at 0x413d40
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41e0b8
push eax
mov dword fs:[0], esp
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x18], 0
lea eax, [edi - 1]
cdq
sub eax, edx
mov esi, eax
mov eax, dword [esp + 0x28]
sar esi, 1
cmp eax, edi
jge 0x413de0
lea eax, [esi + esi*2]
lea ecx, [esp + 0x2c]
push ecx
lea ebx, [ebp + eax*8]
mov ecx, ebx
call fcn.0040c5b0
test eax, eax
jl 0x413db1
push ebx
lea ecx, [esp + 0x30]
call fcn.0040c5b0
test eax, eax
jl 0x413de0
lea edx, [esp + 0x38]
lea ecx, [ebx + 0xc]
push edx
call fcn.0040c5b0
test eax, eax
jge 0x413de0
lea eax, [edi + edi*2]
push ebx
lea edi, [ebp + eax*8]
mov ecx, edi
call fcn.0040a2f0
add ebx, 0xc
lea ecx, [edi + 0xc]
push ebx
call fcn.0040a2f0
lea eax, [esi - 1]
mov edi, esi
cdq
sub eax, edx
sar eax, 1
mov esi, eax
mov eax, dword [esp + 0x28]
cmp eax, edi
jl 0x413d7b
lea ecx, [edi + edi*2]
lea edx, [esp + 0x2c]
push edx
lea esi, [ebp + ecx*8]
mov ecx, esi
call fcn.0040a2f0
lea eax, [esp + 0x38]
lea ecx, [esi + 0xc]
push eax
call fcn.0040a2f0
mov ecx, dword [esp + 0x38]
mov edi, dword [esp + 0x3c]
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.00401bbb
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
xor eax, eax
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x34]
push edx
call fcn.00401bbb
mov ecx, dword [esp + 0x18]
add esp, 8
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x401570
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x1004
call fcn.0040a1c0
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ecx, 0x3ff
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x1018]
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x14]
push eax
push 0x20
push ecx
mov ecx, esi
call fcn.004016e0
test eax, eax
je 0x4016c8
lea edx, [esp + 0x14]
mov ecx, esi
push edx
push 0x20
push eax
call fcn.004016e0
test eax, eax
je 0x401675
lea ecx, [esp + 0x14]
push ecx
push 0x20
push eax
mov ecx, esi
call fcn.004016e0
mov edi, eax
test edi, edi
je 0x401675
mov ebp, dword [sym.imp.MSVCRT.dll_atol]
lea edx, [esp + 0x14]
push edx
call ebp
add esp, 4
lea ecx, [esp + 0x14]
mov ebx, eax
mov eax, dword [esp + 0x1020]
push ecx
push 0x20
push edi
mov ecx, esi
mov dword [eax], ebx
call fcn.004016e0
test eax, eax
je 0x401675
lea edx, [esp + 0x14]
mov ecx, esi
push edx
push 0x20
push eax
call fcn.004016e0
mov edi, eax
test edi, edi
je 0x401675
lea eax, [esp + 0x14]
push eax
call ebp
mov ebp, dword [esp + 0x1020]
add esp, 4
mov dword [ebp], eax
mov al, byte [edi]
test al, al
mov byte [esp + 0x13], al
je 0x401675
test ebx, ebx
jne 0x40165a
pop edi
pop esi
pop ebp
mov eax, 0xc9
pop ebx
add esp, 0x1004
ret 0xc
add esi, 0x428
push 0x40d330
push esi
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x401687
pop edi
pop esi
pop ebp
mov eax, 0xc9
pop ebx
add esp, 0x1004
ret 0xc
mov eax, dword [ebp]
test eax, eax
jbe 0x40169d
push esi
push eax
inc edi
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
lea ecx, [esp + 0x17]
push ecx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 8
neg eax
sbb eax, eax
pop edi
and al, 0x9c
pop esi
pop ebp
add eax, 0x64
pop ebx
add esp, 0x1004
ret 0xc
pop edi
pop esi
pop ebp
mov eax, 0xc8
pop ebx
add esp, 0x1004
ret 0xc
Function at 0x401780
Capabilities:
Resolve dns

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40a45b
push eax
mov eax, 0x4a34
mov dword fs:[0], esp
call fcn.0040a1c0
mov eax, dword [str.ksgupdate.kingsoft.com]
push ebx
push esi
push edi
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
jne 0x4017ce
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x4a34]
mov dword fs:[0], ecx
add esp, 0x4a40
ret
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebp
mov dword [esp + 0x10], 0
stosb byte es:[edi], al
mov ecx, dword [ebx + 0xc]
mov edx, dword [esp + 0x10]
cmp dword [ecx + edx], 0
je 0x4018c3
xor ebp, ebp
cmp word [ebx + 0xa], bp
jle 0x4018b9
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x215]
mov byte [esp + 0x214], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
test ebp, ebp
stosb byte es:[edi], al
jle 0x401856
mov edi, 0x40d40c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + ecx]
xor eax, eax
lea ecx, [esp + 0x214]
mov al, byte [edx + ebp]
push eax
push 0x40d408
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edi, [esp + 0x220]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
inc ebp
rep movsb byte es:[edi], byte [esi]
movsx eax, word [ebx + 0xa]
cmp ebp, eax
jl 0x401809
add dword [esp + 0x10], 4
jmp 0x4017ec
mov edx, dword [0x40d6cc]
lea ecx, [esp + 0x14]
push ecx
push edx
lea ecx, [esp + 0x41c]
call fcn.00401000
lea ecx, [esp + 0x414]
mov dword [esp + 0x4a4c], 0
call fcn.004011a0
test eax, eax
pop ebp
je 0x401928
lea ecx, [esp + 0x410]
mov dword [esp + 0x4a48], 0xffffffff
call fcn.00401150
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x4a34]
mov dword fs:[0], ecx
add esp, 0x4a40
ret
lea ecx, [esp + 0x410]
call fcn.004012c0
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x4a48], 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x416824
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x410]
call fcn.00401150
mov ecx, dword [esp + 0x4a40]
pop edi
pop esi
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x4a40
ret
Function at 0x401ef0
Capabilities:
Read file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
mov ebx, ecx
push edi
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebx + 4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x208]
test eax, eax
je 0x401f3a
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [ebx + 0x208], 0
push 0
push ebp
call dword [sym.imp.MSVCRT.dll__open]
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
jne 0x401f55
mov dword [ebx + 0x204], eax
jmp 0x401f6c
push esi
call dword [sym.imp.MSVCRT.dll__filelength]
push esi
mov dword [ebx + 0x204], eax
call dword [sym.imp.MSVCRT.dll__close]
add esp, 8
mov eax, dword [ebx + 0x204]
test eax, eax
jle 0x401fc8
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
push 0x40d5d8
push ebp
mov dword [ebx + 0x208], eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0xc
test esi, esi
je 0x401fec
mov ecx, dword [ebx + 0x204]
mov edx, dword [ebx + 0x208]
push esi
push 1
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_fread]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
mov ecx, ebx
call fcn.004020c0
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
ret 4
push 1
mov dword [ebx + 0x204], 1
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebx + 0x208], eax
mov ecx, ebx
mov byte [eax], 0
call fcn.004020c0
pop edi
pop esi
pop ebp
xor al, al
pop ebx
ret 4

Function at 0x402060
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
push esi
push edi
mov edi, ecx
test eax, eax
jne 0x40206f
lea eax, [edi + 4]
push 0x40d5dc
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x4020ac
mov eax, dword [edi + 0x204]
mov ecx, dword [edi + 0x208]
push esi
push 1
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
mov al, 1
pop edi
pop esi
ret 4
pop edi
xor al, al
pop esi
ret 4
Function at 0x402ad0
Capabilities:
Delete registry value
Persist via run registry key
Set registry value

Disassembly:
sub esp, 0x204
push edi
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 9]
mov byte [esp + 8], 0
push 0x200
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0xc]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 4]
push ecx
push str.SoftwareMicrosoftWindowsCurrentVersion_run
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x402b2c
lea edx, [esp + 4]
push edx
push str.SoftwareMicrosoftWindowsCurrentVersion_run
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov eax, dword [esp + 4]
push str.KsgUpdateRun
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
lea edi, [esp + 8]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 4]
repne scasb al, byte es:[edi]
not ecx
push ecx
lea ecx, [esp + 0xc]
push ecx
push 1
push eax
push str.KsgUpdateRun
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
add esp, 0x204
ret