joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4040fc
Capabilities:
Create service
Persist via windows service

Disassembly:
mov eax, 0x409454
call fcn.00404828
sub esp, 0x14
push ebx
push esi
xor ebx, ebx
push edi
push ebx
lea ecx, [ebp - 0x20]
call section..text
push ebx
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], ebx
call section..text
push 0x40c820
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.0040106a
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x40419a
mov edi, 0xf01ff
mov esi, str.NetLogSrv
push edi
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
cmp eax, ebx
je 0x404168
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x40419a
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 0x18]
push ebx
push 2
push 0x110
push edi
push 0x40c20c
push esi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
cmp eax, ebx
je 0x40419a
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
push dword [ebp - 0x10]
call esi
cmp dword [ebp - 0x18], ebx
mov byte [ebp - 4], bl
je 0x4041ab
push dword [ebp - 0x18]
call fcn.00404449
pop ecx
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x20], ebx
mov dword [ebp - 0x18], ebx
je 0x4041c0
push dword [ebp - 0x20]
call fcn.00404449
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x4041cf
Capabilities:
Modify service

Disassembly:
mov eax, 0x409468
call fcn.00404828
push ecx
push ecx
push ebx
push esi
xor esi, esi
push edi
push esi
lea ecx, [ebp - 0x14]
call section..text
push 0x40c820
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], esi
call fcn.0040106a
push 2
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
cmp ebx, esi
je 0x40424f
push 2
push str.NetLogSrv
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
cmp edi, esi
jne 0x40422b
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call fcn.004040fc
jmp 0x40424f
push esi
push esi
push esi
push esi
push esi
push esi
push dword [ebp - 0x14]
push esi
push 2
push 0x110
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push ebx
call edi
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], esi
je 0x404261
push dword [ebp - 0x14]
call fcn.00404449
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x404270
Capabilities:
Delete service

Disassembly:
push esi
push edi
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x4042b7
push 0x10000
push str.NetLogSrv
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x4042a4
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x4042b7
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
pop edi
pop esi
ret
Function at 0x4068d5
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x40c620
cmp edx, dword [eax]
je 0x4068f7
add eax, 8
inc ecx
cmp eax, 0x40c6b0
jl 0x4068e8
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x40c620]
jne 0x406a25
mov eax, dword [0x40c8a0]
cmp eax, 1
je 0x4069ff
test eax, eax
jne 0x406928
cmp dword [0x40c264], 1
je 0x4069ff
cmp edx, 0xfc
je 0x406a25
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40695f
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.004042d0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004043c0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4069a2
lea eax, [ebp - 0x1a4]
push eax
call fcn.004043c0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x40a54c
push edi
call fcn.004085c0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.004042d0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004042e0
lea eax, [ebp - 0xa0]
push 0x40a52c
push eax
call fcn.004042e0
push dword [esi + 0x40c624]
lea eax, [ebp - 0xa0]
push eax
call fcn.004042e0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00408700
add esp, 0x2c
pop edi
jmp 0x406a25
lea eax, [ebp + 8]
lea esi, [esi + 0x40c624]
push 0
push eax
push dword [esi]
call fcn.004043c0
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 0x401906
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
and dword [eax + 0x14], 0
and dword [eax + 0x10], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
ret
Function at 0x4024c7
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
mov ecx, eax
dec eax
test ecx, ecx
je 0x4024e0
lea ecx, [eax + 1]
mov eax, dword [esp + 4]
xor byte [eax], 0xa5
inc eax
dec ecx
jne 0x4024d9
ret

Function at 0x403057
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
lea eax, [ebp - 0x38]
push ebx
push eax
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll__stat]
pop ecx
test eax, eax
pop ecx
je 0x4030ec
push 0x40c560
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
pop ecx
test ebx, ebx
pop ecx
je 0x4030ec
push esi
lea eax, [ebp + 0xc]
push edi
push eax
call dword [sym.imp.MSVCRT.dll_time]
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll_srand]
pop ecx
lea esi, [ebp - 0x14]
pop ecx
push 8
pop edi
call dword [sym.imp.MSVCRT.dll_rand]
mov word [esi], ax
inc esi
inc esi
dec edi
jne 0x4030a4
mov eax, dword [ebp + 0xc]
pop edi
mov dword [ebp - 4], eax
xor ecx, ecx
lea eax, [ebp - 0x11]
pop esi
mov dl, byte [ebp + ecx - 4]
inc ecx
mov byte [eax], dl
inc eax
inc eax
cmp ecx, 4
jb 0x4030bf
mov al, byte [ebp + 0x10]
push ebx
mov byte [ebp - 0x10], al
push 0x10
lea eax, [ebp - 0x14]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.004030fc
pop ecx
pop ecx
pop ebx
leave
ret

Function at 0x4031dd
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push 0x40c564
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, dword [ebp + 0x10]
pop ecx
test edi, edi
pop ecx
mov esi, eax
je 0x403202
and byte [edi], 0
test esi, esi
jne 0x40320d
push 5
jmp 0x403299
push esi
push 0x10
lea eax, [ebp - 0x14]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
push esi
mov ebx, eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
cmp ebx, 0x10
je 0x403231
push 4
jmp 0x403299
cmp byte [ebp - 0x10], 2
jne 0x40322d
xor ecx, ecx
lea eax, [ebp - 0x11]
mov dl, byte [eax]
mov byte [ebp + ecx + 8], dl
inc ecx
inc eax
inc eax
cmp ecx, 4
jb 0x40323c
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
imul esi, esi, 0x15180
test edi, edi
je 0x403281
lea eax, [ebp + 8]
push eax
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp + 0xc]
push eax
lea eax, [ebx + esi]
push eax
call fcn.0040273f
push edi
push dword [ebp + 8]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.00402cfd
add esp, 0x20
mov edi, dword [sym.imp.MSVCRT.dll_time]
lea eax, [ebp - 4]
push eax
call edi
add eax, 0x3f480
pop ecx
cmp ebx, eax
jle 0x40329c
push 2
pop eax
jmp 0x4032af
lea eax, [ebp - 4]
push eax
call edi
pop ecx
add ebx, esi
xor ecx, ecx
cmp ebx, eax
setl cl
inc ecx
mov eax, ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4032b4
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
push esi
push edi
mov edi, dword [sym.imp.MSVCRT.dll_malloc]
push 0x11c
call edi
push dword [ebp + 8]
mov esi, eax
call sub.MSVCRT.dll_strlen
add eax, 4
push eax
call edi
push dword [ebp + 8]
mov edi, eax
push edi
call sub.MSVCRT.dll_strcpy
push 0x40c568
push edi
call sub.MSVCRT.dll_strcat
add esp, 0x1c
lea eax, [ebp - 0x140]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push edi
mov edi, dword [sym.imp.MSVCRT.dll_free]
mov dword [esi], eax
call edi
cmp dword [esi], 0xffffffff
pop ecx
jne 0x40335e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jl 0x40332e
cmp eax, 3
jle 0x403350
cmp eax, 8
je 0x403342
cmp eax, 0x12
je 0x403350
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0x16
push esi
call edi
pop ecx
xor eax, eax
jmp 0x4033a6
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0xc
jmp 0x40333a
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 2
jmp 0x40333a
mov eax, dword [ebp - 0x140]
sub eax, 0x80
neg eax
sbb eax, eax
and eax, dword [ebp - 0x140]
mov word [esi + 0xa], 0xa
mov word [esi + 8], 0xa
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x120]
mov dword [esi + 0xc], eax
lea eax, [ebp - 0x114]
push eax
lea eax, [esi + 0x10]
push eax
call sub.MSVCRT.dll_strcpy
pop ecx
mov byte [esi + 0x118], 1
pop ecx
mov eax, esi
pop edi
pop esi
leave
ret
Function at 0x40389a
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10a4
call fcn.00408c60
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ecx, dword [eax + 0x3c]
xor edx, edx
cmp word [ecx + eax + 0x5c], 2
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x10a4]
push dword [ebp + 8]
sete dl
push eax
mov esi, edx
call dword [sym.imp.MSVCRT.dll_vsprintf]
add esp, 0xc
lea eax, [ebp - 0x10a4]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test esi, esi
pop esi
je 0x403915
lea eax, [ebp - 0x104]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x104]
push 0
push eax
lea eax, [ebp - 0x10a4]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push eax
lea eax, [ebp - 0x10a4]
push eax
call dword [sym.imp.MSVCRT.dll_fputs]
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push eax
push 0xa
call dword [sym.imp.MSVCRT.dll_fputc]
mov eax, dword [sym.imp.MSVCRT.dll__iob]
add eax, 0x40
push eax
call dword [sym.imp.MSVCRT.dll_fflush]
add esp, 0x14
leave
ret
Function at 0x40406a
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
cmp dword [0x411538], 2
push esi
push edi
jne 0x40415b
push str.advapi32.dll
xor edi, edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, edi
je 0x4040a3
push str.GetUserNameW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
cmp esi, edi
mov dword [ebp - 4], 0x208
je 0x40415b
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x21c]
push eax
call esi
test eax, eax
je 0x40415b
cmp word [ebp - 0x21c], di
lea eax, [ebp - 0x21c]
je 0x404150
push ebx
jmp 0x4040dc
mov eax, dword [ebp - 8]
movzx ebx, word [eax]
inc eax
inc eax
cmp ebx, 0x20
mov dword [ebp - 8], eax
jne 0x4040ef
push 0x5f
pop ebx
cmp ebx, 0x20
jl 0x404113
cmp ebx, 0x7e
jg 0x404113
push ebx
push str._:___
call dword [sym.imp.MSVCRT.dll_strchr]
pop ecx
test eax, eax
pop ecx
jne 0x404113
and byte [ebp - 0x13], al
push 1
mov byte [ebp - 0x14], bl
pop eax
jmp 0x404126
push ebx
lea eax, [ebp - 0x14]
push 0x40ca68
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea esi, [eax + edi]
lea ecx, [esi + 1]
cmp ecx, dword [ebp + 0xc]
jae 0x404146
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp + 8]
add edi, eax
push edi
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov edi, esi
mov eax, dword [ebp - 8]
cmp word [eax], 0
jne 0x4040d9
pop ebx
mov eax, dword [ebp + 8]
and byte [edi + eax], 0
mov eax, edi
jmp 0x40417c
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
jne 0x404175
and byte [esi], al
push esi
call sub.MSVCRT.dll_strlen
pop ecx
pop edi
pop esi
leave
ret

Function at 0x40505c
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
push ebx
mov ebx, dword [ebp + 8]
push edi
push ebx
call fcn.004032b4
mov edi, eax
pop ecx
test edi, edi
je 0x40511f
push esi
push ebx
call sub.MSVCRT.dll_strlen
mov esi, eax
lea eax, [ebp - 0x400]
push esi
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
mov al, byte [ebp + esi - 0x401]
add esp, 0x10
cmp al, 0x2f
je 0x4050ae
cmp al, 0x5c
je 0x4050ae
mov byte [ebp + esi - 0x400], 0x5c
inc esi
push edi
call fcn.004033aa
test eax, eax
pop ecx
je 0x405117
cmp byte [eax + 0x10], 0x2e
lea ecx, [eax + 0x10]
jne 0x4050d4
mov dl, byte [eax + 0x11]
test dl, dl
je 0x4050ae
cmp dl, 0x2e
jne 0x4050d4
cmp byte [eax + 0x12], 0
je 0x4050ae
lea eax, [ebp + esi - 0x400]
push ecx
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x400]
push 0x1ff
push eax
call dword [sym.imp.MSVCRT.dll__chmod]
lea eax, [ebp - 0x400]
push eax
call dword [sym.imp.MSVCRT.dll__unlink]
add esp, 0x14
test eax, eax
je 0x4050ae
lea eax, [ebp - 0x400]
push eax
call fcn.0040505c
pop ecx
jmp 0x4050ae
push edi
call fcn.00403469
pop ecx
pop esi
push ebx
call dword [sym.imp.MSVCRT.dll__rmdir]
pop ecx
pop edi
pop ebx
leave
ret
Function at 0x406b7b
Capabilities:
Encode data using xor

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
mov ebp, 0x2000000
push edi
mov eax, dword [esi]
mov ebx, 0xff0000
mov edi, SystemTimeToFileTime
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
cmp eax, ebp
mov eax, dword [esi + 0x18]
jne 0x406bc8
mov ecx, dword [eax + 8]
mov edx, ecx
mov ebp, ecx
and edx, ebx
shr ebp, 0x10
or edx, ebp
mov ebp, ecx
shl ebp, 0x10
and ecx, edi
or ebp, ecx
shr edx, 8
shl ebp, 8
or edx, ebp
mov ebp, 0x2000000
jmp 0x406bcb
mov edx, dword [eax + 8]
test dl, 1
je 0x406c8b
mov ecx, dword [esi]
cmp dword [ecx + 4], ebp
mov ecx, dword [eax]
jne 0x406c04
mov edx, ecx
mov ebp, ecx
and edx, ebx
shr ebp, 0x10
or edx, ebp
mov ebp, ecx
shl ebp, 0x10
and ecx, edi
or ebp, ecx
shr edx, 8
shl ebp, 8
or edx, ebp
mov ebp, 0x2000000
mov dword [esp + 0x14], edx
jmp 0x406c08
mov dword [esp + 0x14], ecx
mov ecx, dword [esi]
cmp dword [ecx + 4], ebp
jne 0x406c35
mov ecx, dword [eax + 4]
mov edx, ecx
mov ebp, ecx
and edx, ebx
shr ebp, 0x10
or edx, ebp
mov ebp, ecx
shl ebp, 0x10
and ecx, edi
or ebp, ecx
shr edx, 8
shl ebp, 8
or edx, ebp
mov ebp, 0x2000000
jmp 0x406c38
mov edx, dword [eax + 4]
add eax, 0xc
push edx
push eax
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x24]
call fcn.00408e20
add esp, 0x10
test eax, eax
jne 0x406c84
mov eax, dword [esi]
cmp dword [eax + 4], ebp
mov eax, dword [esi + 0x18]
jne 0x406c7c
mov eax, dword [eax]
mov ecx, eax
mov edx, eax
and ecx, ebx
shr edx, 0x10
or ecx, edx
mov edx, eax
shl edx, 0x10
and eax, edi
or edx, eax
shr ecx, 8
shl edx, 8
or ecx, edx
jmp 0x406c7e
mov ecx, dword [eax]
cmp dword [esp + 0x14], ecx
je 0x406cc9
xor eax, eax
jmp 0x406d41
cmp dword [esp + 0x14], ebp
jne 0x406cb6
mov ecx, dword [eax]
mov edx, ecx
mov ebp, ecx
and edx, ebx
shr ebp, 0x10
or edx, ebp
mov ebp, ecx
shl ebp, 0x10
and ecx, edi
or ebp, ecx
shr edx, 8
shl ebp, 8
or edx, ebp
mov ebp, 0x2000000
jmp 0x406cb8
mov edx, dword [eax]
add eax, 0xc
push edx
push eax
push dword [esp + 0x20]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, dword [esi]
mov esi, dword [esi + 0x18]
mov eax, dword [eax + 4]
cmp eax, ebp
mov dword [esp + 0x14], eax
jne 0x406cfa
mov eax, dword [esi + 8]
mov ecx, eax
mov edx, eax
and ecx, ebx
shr edx, 0x10
or ecx, edx
mov edx, eax
shl edx, 0x10
and eax, edi
or edx, eax
shr ecx, 8
shl edx, 8
or ecx, edx
jmp 0x406cfd
mov ecx, dword [esi + 8]
test cl, 2
je 0x406d3d
cmp dword [esp + 0x14], ebp
mov edx, dword [esp + 0x18]
jne 0x406d2c
mov ecx, dword [esi]
mov eax, ecx
mov esi, ecx
and eax, ebx
shr esi, 0x10
or eax, esi
mov esi, ecx
shl esi, 0x10
and ecx, edi
or esi, ecx
shr eax, 8
shl esi, 8
or eax, esi
jmp 0x406d2e
mov eax, dword [esi]
mov ecx, eax
dec eax
test ecx, ecx
je 0x406d3d
inc eax
xor byte [edx], 0xea
inc edx
dec eax
jne 0x406d36
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x406f37
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
lea eax, [ebp - 4]
push edi
push eax
call dword [sym.imp.MSVCRT.dll_time]
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_srand]
pop ecx
pop ecx
call dword [sym.imp.MSVCRT.dll_rand]
mov edi, eax
mov eax, dword [ebp + 8]
and edi, 0x7f
add edi, 0x20
and edi, 0xfffffffc
cmp dword [eax + 4], 0x2000000
jne 0x406f98
mov eax, dword [eax + 8]
mov ebx, eax
mov ecx, eax
and ebx, 0xff0000
shr ecx, 0x10
or ebx, ecx
mov ecx, eax
shl ecx, 0x10
and eax, 0xff00
or ecx, eax
shr ebx, 8
shl ecx, 8
or ebx, ecx
jmp 0x406f9b
mov ebx, dword [eax + 8]
mov ecx, dword [ebp + 0xc]
add ebx, edi
lea eax, [ebx + 0xc]
push eax
mov dword [ecx], eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
pop ecx
test esi, esi
je 0x407026
push 0x10
mov dword [esi + 4], 2
pop eax
mov word [esi + 0xc], di
cmp edi, eax
mov dword [esi + 8], ebx
mov dword [ebp + 0xc], eax
jbe 0x406fdf
call dword [sym.imp.MSVCRT.dll_rand]
mov ecx, dword [ebp + 0xc]
inc dword [ebp + 0xc]
cmp dword [ebp + 0xc], edi
mov byte [ecx + esi], al
jb 0x406fcb
mov ecx, dword [ebp + 8]
xor eax, eax
cmp dword [ecx + 8], eax
jbe 0x406ffb
add edi, esi
mov edx, dword [eax + ecx]
xor edx, ebx
mov dword [edi + eax], edx
add eax, 4
cmp eax, dword [ecx + 8]
jb 0x406feb
push 4
push 0x40d1bc
push esi
call sub.MSVCRT.dll_memcpy
push 0xc
lea eax, [esi + ebx]
push esi
push eax
call sub.MSVCRT.dll_memcpy
push 4
push 0x40d1b4
push esi
call sub.MSVCRT.dll_memcpy
add esp, 0x24
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40703e
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push edi
push 0x18
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
pop ecx
test esi, esi
je 0x407103
mov eax, dword [esp + 0xc]
and dword [esi + 0xc], 0
test eax, eax
mov dword [esi + 4], eax
mov dword [esi + 8], 1
je 0x407074
push eax
call dword [sym.imp.MSVCRT.dll__strdup]
pop ecx
mov dword [esi + 4], eax
mov eax, dword [esi + 4]
test eax, eax
jne 0x407084
push esi
call dword [sym.imp.MSVCRT.dll_free]
jmp 0x407102
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
jne 0x4070a3
push 2
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov edi, eax
test edi, edi
je 0x4070e8
push 0x40d1c8
push 0x40d1c4
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x4070cd
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4070cd
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [esi], eax
push esi
call fcn.00407108
test eax, eax
pop ecx
je 0x4070e8
push dword [esi]
call fcn.004068b0
test eax, eax
pop ecx
je 0x4070e8
mov eax, esi
jmp 0x407105
cmp dword [esi + 0xc], 0
mov edi, dword [sym.imp.MSVCRT.dll_free]
je 0x4070f9
push dword [esi]
call edi
pop ecx
push dword [esi + 4]
call edi
push esi
call edi
pop ecx
pop ecx
xor eax, eax
pop edi
pop esi
ret
Function at 0x407108
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov esi, dword [ebx]
test esi, esi
je 0x4071c1
push 4
push 0x40d1b4
push esi
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x4071c1
mov eax, dword [esi + 4]
mov edx, 0x2000000
cmp eax, edx
jne 0x407167
mov ecx, dword [esi + 8]
mov eax, ecx
mov edi, ecx
and eax, 0xff0000
shr edi, 0x10
or eax, edi
mov edi, ecx
shl edi, 0x10
and ecx, 0xff00
or edi, ecx
shr eax, 8
shl edi, 8
or eax, edi
jmp 0x40716a
mov eax, dword [esi + 8]
cmp dword [esi + 4], edx
jne 0x407184
mov cx, word [esi + 0xc]
xor edx, edx
movzx edi, cx
mov dh, cl
movzx ecx, dx
shr edi, 8
or edi, ecx
jmp 0x407188
movzx edi, word [esi + 0xc]
sub eax, edi
push eax
mov dword [ebp + 8], eax
call dword [sym.imp.MSVCRT.dll_malloc]
pop ecx
mov dword [ebx], eax
xor ecx, ecx
cmp eax, ecx
jne 0x4071a1
xor eax, eax
jmp 0x4071c4
cmp dword [ebp + 8], ecx
mov dword [ebx + 0xc], 1
jbe 0x4071c1
lea edx, [edi + esi]
mov edi, dword [edx + ecx]
xor edi, dword [esi + 8]
mov dword [ecx + eax], edi
add ecx, 4
cmp ecx, dword [ebp + 8]
jb 0x4071b0
push 1
pop eax
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x4075b3
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
add eax, dword [edx + 0x3c]
mov dword [ebp - 0x10], eax
push 1
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00407761
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4075ef
xor eax, eax
jmp 0x40775d
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
add eax, dword [edx]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.0040779d
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40761c
xor eax, eax
jmp 0x40775d
lea ecx, [ebp - 0x18]
push ecx
push 0x40
mov edx, dword [ebp - 8]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x407644
xor eax, eax
jmp 0x40775d
mov eax, dword [ebp - 0x1c]
cmp dword [eax], 0
je 0x40773e
push str.KERNEL32.dll
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x407730
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
add ecx, dword [eax]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
add eax, dword [edx + 0x10]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x20]
cmp dword [ecx], 0
je 0x40772e
mov edx, dword [ebp - 0x20]
mov eax, dword [edx]
and eax, 0x80000000
test eax, eax
jne 0x407717
mov dword [ebp - 0x30], str.DisableThreadLibraryCalls
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x14]
add edx, dword [ecx]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
mov cl, byte [eax + 2]
mov byte [ebp - 0x2c], cl
movsx edx, byte [ebp - 0x2c]
cmp edx, 0x44
je 0x4076e0
movsx eax, byte [ebp - 0x2c]
cmp eax, 0x46
je 0x4076e0
movsx ecx, byte [ebp - 0x2c]
cmp ecx, 0x47
je 0x4076e0
movsx edx, byte [ebp - 0x2c]
cmp edx, 0x4c
jne 0x407717
mov eax, dword [ebp - 0x30]
cmp dword [eax], 0
je 0x407717
mov ecx, dword [ebp - 0x28]
add ecx, 2
push ecx
mov edx, dword [ebp - 0x30]
mov eax, dword [edx]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
jne 0x40770c
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 8]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x30]
add ecx, 0xc
mov dword [ebp - 0x30], ecx
jmp 0x4076e0
mov edx, dword [ebp - 0x20]
add edx, 4
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x24]
add eax, 4
mov dword [ebp - 0x24], eax
jmp 0x407687
jmp 0x40773e
mov ecx, dword [ebp - 0x1c]
add ecx, 0x14
mov dword [ebp - 0x1c], ecx
jmp 0x407644
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
add ecx, dword [eax + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esp, ebp
pop ebp
ret