joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404c74
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
mov edi, dword [ebp + 8]
mov edi, dword [edi]
push edi
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
pop edi
mov esi, ecx
not esi
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov edx, dword [eax + 0xc]
lea eax, [eax + 0x10]
push dword [eax]
xor eax, eax
push edx
mov ecx, dword [edx + 0x30]
movzx ebx, byte [eax + edi]
movzx edx, byte [ecx + eax*2]
sub ebx, edx
cmp ebx, 0
je 0x404cbb
cmp ebx, 0x20
je 0x404cbb
cmp ebx, 0xffffffe0
je 0x404cbb
jne 0x404cc4
add eax, 1
cmp esi, eax
je 0x404cd1
jne 0x404ca0
pop edx
mov edx, dword [edx]
xor eax, eax
pop ebx
cmp ebx, edx
push ebx
je 0x404cd5
jne 0x404c9c
pop edx
mov eax, dword [edx + 0x18]
leave
ret 4

Function at 0x404ce9
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push ebx
sub esp, 0x10
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov ecx, dword [edx]
test eax, eax
je 0x404daa
test ecx, ecx
je 0x404daa
mov ebx, dword [eax + 0x3c]
mov edx, dword [ebx + eax + 0x78]
mov ebx, dword [ebx + eax + 0x7c]
test edx, edx
je 0x404daa
test ebx, ebx
je 0x404daa
mov ebx, eax
add ebx, edx
je 0x404daa
mov esi, dword [edx + eax + 0x18]
test esi, esi
je 0x404daa
cmp dword [edx + eax + 0x14], 0
je 0x404daa
mov edi, dword [edx + eax + 0x20]
mov ebx, dword [edx + eax + 0x24]
add edi, eax
mov edx, dword [edx + eax + 0x1c]
add ebx, eax
add edx, eax
test esi, esi
jbe 0x404daa
mov dword [esp], edx
xor ebp, ebp
mov dword [esp + 0xc], edi
mov dword [esp + 4], esi
mov dword [esp + 8], ecx
mov eax, dword [esp + 0xc]
mov edi, dword [esp + 8]
movzx ecx, word [ebx + ebp*2]
mov esi, dword [eax + ebp*4]
add esi, dword [esp + 0x24]
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x404d9a
test dl, dl
je 0x404d96
mov dl, byte [edi + 1]
cmp dl, byte [esi + 1]
jne 0x404d9a
add edi, 2
add esi, 2
test dl, dl
jne 0x404d7a
xor eax, eax
jmp 0x404d9f
sbb eax, eax
or eax, 1
test eax, eax
je 0x404db6
inc ebp
cmp ebp, dword [esp + 4]
jb 0x404d67
xor eax, eax
add esp, 0x10
pop ebx
pop edi
pop esi
pop ebp
ret 8
mov edx, dword [esp]
mov edx, dword [edx + ecx*4]
mov eax, dword [esp + 0x24]
add eax, edx
add esp, 0x10
pop ebx
pop edi
pop esi
pop ebp
ret 8
Function at 0x405cac
Capabilities:
Access peb ldr_data
Resolve function by hash

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
mov dword [ebp - 4], 0
cld
xor edx, edx
mov edx, dword fs:[edx + 0x30]
mov edx, dword [edx + 0xc]
mov edx, dword [edx + 0x14]
mov esi, dword [edx + 0x28]
push 0x18
pop ecx
xor edi, edi
xor eax, eax
lodsb al, byte [esi]
cmp al, 0x61
jl 0x405cda
sub al, 0x20
ror edi, 0xd
add edi, eax
loop 0x405cd1
cmp edi, 0x6a4abc5b
mov ebx, dword [edx + 0x10]
mov edx, dword [edx]
jne 0x405cc9
mov eax, ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
jmp 0x405cfb
mov esp, ebp
pop ebp
ret

Function at 0x405cff
Capabilities:
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
mov dword [ebp - 4], 0
add esp, 0xffffffec
push esi
push ebx
push edi
push edx
push ecx
mov eax, dword [ebp + 0x10]
xor edx, edx
xchg edx, eax
mov esi, 0x3c
add esi, dword [ebp + 0xc]
mov eax, dword [esi]
add eax, dword [ebp + 0xc]
mov esi, dword [eax + 0x78]
add esi, 0x18
add esi, dword [ebp + 0xc]
mov eax, dword [esi]
mov dword [ebp - 0x14], eax
add esi, 4
lea edi, [ebp - 8]
lodsd eax, dword [esi]
add eax, dword [ebp + 0xc]
stosd dword es:[edi], eax
mov dword [ebp - 8], eax
lodsd eax, dword [esi]
add eax, dword [ebp + 0xc]
push eax
stosd dword es:[edi], eax
mov dword [ebp - 0xc], eax
mov eax, dword [esi]
add eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
pop esi
mov dword [ebp - 4], 0
push esi
mov eax, dword [esi]
add eax, dword [ebp + 0xc]
xchg edi, eax
mov ebx, edi
push edi
xor al, al
scasb al, byte es:[edi]
jne 0x405d6b
pop esi
sub edi, ebx
push edx
cld
xor ecx, ecx
dec ecx
mov edx, ecx
xor eax, eax
xor ebx, ebx
lodsb al, byte [esi]
xor al, cl
mov cl, ch
mov ch, dl
mov dl, dh
mov dh, 8
shr bx, 1
rcr ax, 1
jae 0x405d98
xor ax, 0x8320
xor bx, 0xedb8
dec dh
jne 0x405d87
xor ecx, eax
xor edx, ebx
dec edi
jne 0x405d78
not edx
not ecx
mov eax, edx
rol eax, 0x10
mov ax, cx
pop edx
cmp edx, eax
je 0x405dbe
pop esi
add esi, 4
add dword [ebp - 4], 1
jmp 0x405d5f
pop esi
mov eax, dword [ebp - 4]
shl eax, 1
add eax, dword [ebp - 0x10]
xor esi, esi
xchg esi, eax
mov ax, word [esi]
shl ax, 2
add eax, dword [ebp - 8]
xchg esi, eax
mov eax, dword [esi]
add eax, dword [ebp + 0xc]
pop ecx
pop edx
pop edi
pop ebx
pop esi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
jmp 0x405dea
mov esp, ebp
pop ebp
ret 0xc

Function at 0x4081b0
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 4]
mov eax, dword [esp + 8]
cmp edx, 1
jle 0x4081ce
push esi
lea ecx, [esp + 0x18]
dec edx
mov esi, dword [ecx]
add ecx, 0xc
xor eax, esi
dec edx
jne 0x4081c3
pop esi
ret
Function at 0x415dbc
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x415dfe
call fcn.00419106
mov esi, dword [eax + 0xc]
push pe_nt_image_headers32
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x415dfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x415df5
xor eax, eax
jmp 0x415e06
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00415e0c
pop edi
pop esi
pop ebx
ret 4

Function at 0x416d97
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x41a9a4
call fcn.0040a320
sub esp, 0x18
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], esi
mov eax, dword [esi + 0x48]
mov edi, dword [esi + 0x44]
mov dword [ebp - 0x18], eax
call fcn.00419106
cmp dword [esi + 0x40], 0
mov ebx, dword [eax + 0xc]
je 0x416dd6
call fcn.00419106
mov ebx, dword [eax + 0xc]
push 5
push dword [esi + 0x40]
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x416de4
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x416df2
or eax, 0xffffffff
jmp 0x416eda
mov ecx, esi
call fcn.00416d0d
mov dword [ebp - 0x14], eax
call fcn.00414404
xor edi, edi
cmp dword [ebp - 0x14], edi
mov dword [ebp - 0x20], edi
je 0x416e29
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x416e29
push edi
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
mov dword [ebp - 0x20], 1
push esi
mov dword [ebp - 4], edi
call fcn.004143b8
push dword [ebp - 0x14]
call fcn.00413ee9
push ebx
push eax
push dword [ebp - 0x18]
mov ecx, esi
call fcn.00416aa5
cmp eax, edi
je 0x416e9c
test byte [esi + 0x24], 0x10
je 0x416e6a
push 4
mov ecx, esi
pop ebx
call fcn.004138e9
test ah, 1
je 0x416e62
push 5
pop ebx
push ebx
mov ecx, esi
call fcn.00415f0e
cmp dword [esi + 0x1c], edi
je 0x416e9c
push 0x97
push edi
push edi
push edi
push edi
push edi
mov ecx, esi
call fcn.0041391d
jmp 0x416e9c
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x20], edi
je 0x416eb0
push 1
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp dword [ebp - 0x14], edi
je 0x416ec9
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x1c]
jne 0x416ec9
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x58]
mov ecx, esi
call fcn.00416d47
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
Function at 0x418c7d
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x418cab
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x418cc9
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00418be3
jmp 0x418cc9
mov eax, dword [esi + 0x14]
test eax, eax
je 0x418cc9
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00418be3
test edi, edi
mov eax, edi
jne 0x418cb3
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x40232d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4051b0
cmp edx, dword [eax]
je 0x40234f
add eax, 8
inc ecx
cmp eax, 0x405240
jl 0x402340
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4051b0]
jne 0x40247d
mov eax, dword [0x405b58]
cmp eax, 1
je 0x402457
test eax, eax
jne 0x402380
cmp dword [0x405104], 1
je 0x402457
cmp edx, 0xfc
je 0x40247d
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4023b7
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.004024b0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00401650
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4023fa
lea eax, [ebp - 0x1a4]
push eax
call fcn.00401650
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4043a8
push edi
call fcn.00401550
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.004024b0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004024c0
lea eax, [ebp - 0xa0]
push 0x404388
push eax
call fcn.004024c0
push dword [esi + 0x4051b4]
lea eax, [ebp - 0xa0]
push eax
call fcn.004024c0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040357e
add esp, 0x2c
pop edi
jmp 0x40247d
lea eax, [ebp + 8]
lea esi, [esi + 0x4051b4]
push 0
push eax
push dword [esi]
call fcn.00401650
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x4011f0
Capabilities:
Modify service

Disassembly:
mov eax, dword [esp + 8]
push ebx
push edi
xor ebx, ebx
push 0xf003f
push ebx
push ebx
mov dword [esp + 0x1c], eax
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x40124f
mov ecx, dword [esp + 0xc]
push ebp
push esi
push 2
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
je 0x401245
lea edx, [esp + 0x18]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
test eax, eax
je 0x401242
mov ebx, 1
push esi
call ebp
push edi
call ebp
pop esi
pop ebp
mov eax, ebx
pop edi
pop ebx
ret
mov eax, ebx
pop edi
pop ebx
ret

Function at 0x401260
Capabilities:
Delete service

Disassembly:
push ebx
push esi
xor ebx, ebx
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
je 0x4012b3
mov eax, dword [esp + 0xc]
push ebp
push edi
push 0x10000
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
test edi, edi
je 0x4012a9
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x4012a6
mov ebx, 1
push edi
call ebp
push esi
call ebp
pop edi
pop ebp
mov eax, ebx
pop esi
pop ebx
ret
mov eax, ebx
pop esi
pop ebx
ret
Function at 0x4012c0
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
sub esp, 0x24
push esi
push edi
xor edi, edi
push 0xf003f
push edi
push edi
mov dword [esp + 0x14], edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
mov dword [esp + 0xc], esi
je 0x4013e7
mov eax, dword [esp + 0x30]
push ebx
push 0xf01ff
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, eax
test ebx, ebx
je 0x4013c0
push edi
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x4013d0
lea ecx, [esp + 0x14]
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4013b5
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
push ebp
call edi
mov ebp, dword [esp + 0x2c]
mov esi, eax
cmp dword [esp + 0x1c], 2
jne 0x40139f
mov eax, 0xcccccccd
mul dword [esp + 0x30]
shr edx, 3
cmp edx, 0x3e8
jae 0x401358
mov edx, 0x3e8
jmp 0x401365
cmp edx, 0x2710
jbe 0x401365
mov edx, 0x2710
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0x18]
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x40139f
cmp dword [esp + 0x2c], ebp
jbe 0x40138c
call edi
mov ebp, dword [esp + 0x2c]
mov esi, eax
jmp 0x401398
call edi
mov ecx, dword [esp + 0x30]
sub eax, esi
cmp eax, ecx
ja 0x40139f
cmp dword [esp + 0x1c], 2
je 0x40133d
mov eax, dword [esp + 0x1c]
pop ebp
cmp eax, 4
jne 0x4013b1
mov dword [esp + 0xc], 1
mov esi, dword [esp + 0x10]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [esp + 0xc]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
pop ebx
pop edi
pop esi
add esp, 0x24
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
jne 0x4013b5
mov dword [esp + 0xc], 1
jmp 0x4013b5
mov eax, edi
pop edi
pop esi
add esp, 0x24
ret

Function at 0x4013f0
Capabilities:
Stop service

Disassembly:
sub esp, 0x1c
push ebx
push edi
xor ebx, ebx
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x40145f
mov eax, dword [esp + 0x28]
push ebp
push esi
push 0x20
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
je 0x401452
lea ecx, [esp + 0x10]
push ecx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov eax, dword [esp + 0x14]
cmp eax, 1
je 0x40144a
cmp eax, 3
jne 0x40144f
push 0x78
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, 1
push esi
call ebp
push edi
call ebp
pop esi
pop ebp
mov eax, ebx
pop edi
pop ebx
add esp, 0x1c
ret
mov eax, ebx
pop edi
pop ebx
add esp, 0x1c
ret
Function at 0x401b60
Capabilities:
Move file

Disassembly:
sub esp, 0x208
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x109]
mov byte [esp + 0x108], 0
mov byte [esp + 4], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 5]
push str.UpdateService
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.004013f0
push str.UpdateService
call fcn.00401260
add esp, 8
lea eax, [esp + 0x108]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x108]
push 0x104
lea edx, [esp + 8]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [esp + 4]
push str..del
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 4]
push 1
lea edx, [esp + 0x10c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
lea eax, [esp + 4]
push 0
push eax
call fcn.00403050
add esp, 8
mov ecx, 0x4221c0
push 2
call fcn.00406130
mov eax, 1
pop edi
add esp, 0x208
ret

Function at 0x401cb0
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x104
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0xa
div ecx
mov esi, dword [esp + 0x114]
mov ecx, 0x40
lea edi, [esp + 0xd]
mov byte [esp + 0xc], 0
add edx, esi
lea edx, [edx + edx*2]
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea esi, [eax + eax*4]
mov eax, 0x10624dd3
lea esi, [esi + esi*4]
shl esi, 5
mul esi
xor eax, eax
mov ebx, edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, 0x45e7b273
mul esi
shr edx, 0xe
push edx
push str.SogouDownLoad
push str.__s_Update_Service_wait__d_minutes.
lea edx, [esp + 0x18]
push 0x104
push edx
shr ebx, 5
call dword [sym.imp.SHLWAPI.dll_wnsprintfA]
add esp, 0x14
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x421920]
test eax, eax
je 0x401d79
test ebx, ebx
je 0x401d79
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [0x421920]
push 0x1f4
push ecx
dec ebx
call esi
test eax, eax
je 0x401d6b
test ebx, ebx
jne 0x401d4a
pop edi
pop esi
pop ebx
add esp, 0x104
ret
push 0
push 0
push 1
call fcn.00401c30
add esp, 0xc
pop edi
pop esi
pop ebx
add esp, 0x104
ret
Function at 0x401d90
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x104
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 5]
mov byte [esp + 4], 0
push str.SogouDownLoad
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push str.__s_Update_Service_start_service.
lea eax, [esp + 0xc]
push 0x104
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfA]
add esp, 0x10
lea ecx, [esp + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
test eax, eax
mov dword [0x421920], eax
jne 0x401dff
push eax
push eax
push 1
call fcn.00401c30
add esp, 0xc
pop edi
add esp, 0x104
ret
push esi
push 0
push 0
push 4
call fcn.00401c30
push 0xa
call fcn.00401cb0
push 0
call fcn.00401130
add esp, 0x14
mov ecx, 0x4221c0
push 5
call fcn.00406130
push 5
call fcn.00401cb0
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add esp, 4
xor esi, esi
mov edx, dword [0x421920]
push 0x1f4
push edx
inc esi
call edi
test eax, eax
je 0x401ea1
mov eax, esi
xor edx, edx
mov ecx, 0xe100
div ecx
test edx, edx
jne 0x401e68
push 5
mov ecx, 0x4221c0
call fcn.00406130
mov eax, esi
xor edx, edx
mov ecx, 0x15180
div ecx
test edx, edx
jne 0x401e87
push edx
call fcn.00401130
push 5
call fcn.00401cb0
add esp, 8
mov eax, esi
xor edx, edx
mov ecx, 0xe10
div ecx
test edx, edx
jne 0x401e3a
push edx
call fcn.00401150
add esp, 4
jmp 0x401e3a
push 0
push 0
push 1
call fcn.00401c30
add esp, 0xc
pop esi
pop edi
add esp, 0x104
ret
Function at 0x402400
Capabilities:
Check if file exists
Delete file
Get common file path
Move file

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x410
test eax, eax
push esi
mov esi, dword [esp + 0x418]
push edi
je 0x402430
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x402430
pop edi
mov eax, 1
pop esi
add esp, 0x410
ret
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x402449
pop edi
mov eax, 1
pop esi
add esp, 0x410
ret
call fcn.004039b0
test eax, eax
je 0x402475
push esi
call fcn.00402630
add esp, 4
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
neg eax
sbb eax, eax
pop edi
neg eax
pop esi
add esp, 0x410
ret
mov al, byte [0x42193c]
test al, al
jne 0x40249e
push 0x104
push 0x42193c
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.wininit.ini
push 0x42193c
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x10d]
mov byte [esp + 0x10c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 9]
mov byte [esp + 8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10c]
push 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
je 0x402621
lea ecx, [esp + 0x10c]
push ecx
call fcn.00402630
lea edx, [esp + 0x110]
lea eax, [esp + 0xc]
push edx
push str.NUL_s_n
push 0x103
push eax
call sub.MSVCRT.dll__snprintf
push 0x42048c
push 0x42193c
call sub.MSVCRT.dll_fopen
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x402547
push 0x420488
push 0x42193c
call sub.MSVCRT.dll_fopen
mov esi, eax
add esp, 8
test esi, esi
je 0x402621
push esi
call sub.MSVCRT.dll_rewind
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x215]
mov byte [esp + 0x214], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push esi
lea ecx, [esp + 0x218]
push 0x208
push ecx
stosb byte es:[edi], al
call sub.MSVCRT.dll_fgets
add esp, 0x10
test eax, eax
je 0x4025c2
lea edx, [esp + 0x210]
push edx
call sub.MSVCRT.dll__strlwr
lea eax, [esp + 0x214]
push str._rename_
push eax
call sub.MSVCRT.dll_strstr
add esp, 0xc
test eax, eax
jne 0x4025f2
push esi
lea ecx, [esp + 0x214]
push 0x208
push ecx
call sub.MSVCRT.dll_fgets
add esp, 0xc
test eax, eax
jne 0x402582
push esi
push str._rename__n
call sub.MSVCRT.dll_fputs
lea edx, [esp + 0x10]
push esi
push edx
call sub.MSVCRT.dll_fputs
add esp, 0x10
push esi
call sub.MSVCRT.dll_fclose
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x410
ret
push 2
push 0
push esi
call sub.MSVCRT.dll_fseek
lea eax, [esp + 0x14]
push esi
push eax
call sub.MSVCRT.dll_fputs
add esp, 0x14
push esi
call sub.MSVCRT.dll_fclose
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x410
ret
pop edi
xor eax, eax
pop esi
add esp, 0x410
ret
Function at 0x402de0
Capabilities:
Check if file exists
Create directory

Disassembly:
sub esp, 0x104
push esi
mov esi, dword [esp + 0x10c]
test esi, esi
push edi
je 0x402e8a
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x402e8a
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x402e24
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryA]
pop edi
pop esi
add esp, 0x104
ret
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 9]
mov byte [esp + 8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x104
lea eax, [esp + 0xc]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashA]
lea edx, [esp + 8]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov edi, dword [esp + 0x114]
lea eax, [esp + 8]
push edi
push eax
call fcn.00402de0
add esp, 8
test eax, eax
je 0x402e8a
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
pop edi
pop esi
add esp, 0x104
ret
pop edi
xor eax, eax
pop esi
add esp, 0x104
ret

Function at 0x403050
Capabilities:
Move file

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
test edi, edi
je 0x403063
push edi
call fcn.00402630
add esp, 4
mov esi, dword [esp + 0x10]
test esi, esi
je 0x403074
push esi
call fcn.00402630
add esp, 4
call fcn.004039b0
test eax, eax
je 0x403093
xor eax, eax
test esi, esi
setne al
add eax, 4
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
pop edi
pop esi
ret
push esi
push edi
call fcn.004030a0
add esp, 8
pop edi
pop esi
ret