joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4047a0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov eax, dword [0x40c040]
xor eax, esp
mov dword [esp + 0x10], eax
push ebx
push esi
push edi
call fcn.00404520
mov ecx, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edx, 0x4044e0
push 0x40c828
mov dword [esp + 0x1c], ecx
call fcn.004068f4
lea ecx, [esp + 0x18]
call fcn.00403a90
push 0x14
call fcn.004079c0
mov ecx, dword [ebp + 0x14]
add esp, 4
mov dword [eax], ecx
mov ecx, dword [ebp + 0x10]
mov dword [eax + 4], ecx
mov ecx, dword [ebp + 0xc]
mov dword [eax + 8], ecx
mov ecx, dword [ebp + 8]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x40c87c]
mov dword [eax + 0x10], ecx
lea ecx, [esp + 0x14]
push ecx
push 0
push eax
push 0x406280
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
mov dword [esp + 0x10], eax
test eax, eax
je 0x4049a2
cmp dword [esp + 0x14], 0
jne 0x40483d
push 1
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
call dword [sym.imp.MSVCP140.dll__Thrd_id]
mov ecx, dword [esp + 0x14]
cmp ecx, eax
jne 0x404853
push 5
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
push 0
push ecx
push dword [esp + 0x18]
call dword [sym.imp.MSVCP140.dll__Thrd_join]
add esp, 0xc
test eax, eax
je 0x40486f
push 2
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
xorps xmm0, xmm0
movlpd qword [esp + 0x10], xmm0
call fcn.00406a45
xor esi, esi
mov ecx, 1
mov ebx, 0x40c82c
xor eax, eax
lock cmpxchg dword [ebx], ecx
test eax, eax
je 0x4048bd
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
nop dword [eax]
cmp esi, 0x20
jae 0x4048a9
push 0
jmp 0x4048ab
push 1
call edi
inc esi
mov ecx, 1
xor eax, eax
lock cmpxchg dword [ebx], ecx
test eax, eax
jne 0x4048a0
cmp dword [0x40c830], 0
je 0x40494a
xor ecx, ecx
call fcn.00406819
test eax, eax
jne 0x40494a
mov eax, dword [0x40c88c]
mov dword [0x40c88c], 0
test eax, eax
je 0x404902
mov edi, dword [sym.imp.KERNEL32.dll_VirtualFree]
nop
mov esi, dword [eax]
push 0x8000
push 0
push eax
call edi
mov eax, esi
test esi, esi
jne 0x4048f0
push dword [0x40c890]
push 0
push dword [0x40c830]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [0x40c830]
call dword [sym.imp.KERNEL32.dll_HeapDestroy]
mov dword [0x40c830], 0
mov dword [0x40c890], 0
mov dword [0x40c894], 0
mov dword [0x40c898], 0
xor eax, eax
xchg dword [ebx], eax
mov ebx, dword [0x40c854]
mov esi, dword [0x40c850]
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp esi, ebx
je 0x40496f
push dword [esi]
call edi
add esi, 4
cmp esi, ebx
jne 0x404964
push dword [0x40c878]
call edi
push dword [0x40c84c]
call edi
cmp dword [esp + 0x14], 0
je 0x40498c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
mov ecx, dword [esp + 0x1c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004079b2
mov esp, ebp
pop ebp
ret 0x10
push 6
mov dword [esp + 0x18], 0
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3
Function at 0x406547
Capabilities:
Enumerate threads

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x40c040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
push edi
push 4
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov ebx, eax
mov dword [ebp - 0x24], ebx
cmp ebx, 0xffffffff
je 0x406652
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x1c
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Thread32First]
test eax, eax
je 0x40664b
inc edi
cmp dword [ebp - 0x20], 0x10
jb 0x40660f
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 0x14], eax
jne 0x40660f
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp - 0x18], eax
je 0x40660f
mov edx, dword [esi]
test edx, edx
jne 0x4065d8
push 0x200
push edx
push dword [0x40c830]
mov dword [esi + 4], 0x80
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esi], edx
test edx, edx
je 0x406634
lea ebx, [esi + 8]
jmp 0x406602
mov eax, dword [esi + 4]
lea ebx, [esi + 8]
cmp dword [ebx], eax
jb 0x406602
add eax, eax
mov dword [esi + 4], eax
shl eax, 2
push eax
push edx
push 0
push dword [0x40c830]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, eax
test edx, edx
je 0x406663
mov dword [esi], edx
mov ecx, dword [ebx]
mov eax, dword [ebp - 0x18]
mov dword [edx + ecx*4], eax
inc dword [ebx]
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x1c
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x406590
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x40664b
xor edi, edi
cmp dword [esi], edi
je 0x40664b
push dword [esi]
push edi
push dword [0x40c830]
call dword [sym.imp.KERNEL32.dll_HeapFree]
and dword [esi], edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004079b2
leave
ret
mov ebx, dword [ebp - 0x24]
jmp 0x406634

Function at 0x406668
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
mov edi, ecx
mov dword [ebp - 0xc], edx
xor esi, esi
mov dword [edi], esi
mov dword [edi + 4], esi
mov dword [edi + 8], esi
call fcn.00406547
test eax, eax
jne 0x40668d
push 9
pop esi
jmp 0x4066ed
cmp dword [edi], esi
je 0x4066ed
push ebx
mov ebx, esi
cmp dword [edi + 8], esi
jbe 0x4066ec
mov eax, dword [edi]
push dword [eax + ebx*4]
push esi
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov dword [ebp - 4], eax
mov dword [ebp - 8], esi
test eax, eax
je 0x4066e1
push eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
je 0x4066d3
push dword [ebp + 8]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov dword [ebp - 8], 1
call fcn.004063f2
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], esi
jne 0x4066e6
mov ecx, dword [edi]
mov dword [ecx + ebx*4], esi
inc ebx
cmp ebx, dword [edi + 8]
jb 0x406699
pop ebx
pop edi
mov eax, esi
pop esi
leave
ret
Function at 0x4066f3
Capabilities:
Resume thread

Disassembly:
push esi
mov esi, ecx
cmp dword [esi], 0
je 0x406745
push edi
xor edi, edi
cmp dword [esi + 8], edi
jbe 0x406734
push ebx
mov eax, dword [esi]
cmp dword [eax + edi*4], 0
je 0x40672d
push dword [eax + edi*4]
push 0
push 0x5a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov ebx, eax
test ebx, ebx
je 0x40672d
push ebx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, dword [esi + 8]
jb 0x406704
pop ebx
push dword [esi]
push 0
push dword [0x40c830]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
ret

Function at 0x406747
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
imul esi, ecx, 0x2c
push edi
mov edi, edx
mov dword [ebp - 0x10], edi
add esi, dword [0x40c890]
mov dword [ebp - 8], esi
mov al, byte [esi + 0x14]
mov ebx, dword [esi]
and al, 1
je 0x40676d
sub ebx, 5
movzx eax, al
lea ecx, [ebp - 4]
push ecx
push 0x40
lea eax, [eax*2 + 5]
push eax
push ebx
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x406794
push 0xa
pop eax
jmp 0x406814
test edi, edi
je 0x4067b5
mov byte [ebx], 0xe9
mov eax, dword [esi + 4]
sub eax, ebx
sub eax, 5
mov dword [ebx + 1], eax
test byte [esi + 0x14], 1
je 0x4067d4
mov eax, dword [esi]
mov word [eax], 0xf9eb
jmp 0x4067d4
test byte [esi + 0x14], 1
je 0x4067c9
lea esi, [esi + 0xc]
mov edi, ebx
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 8]
jmp 0x4067d4
mov eax, dword [esi + 0xc]
mov dword [ebx], eax
mov al, byte [esi + 0x10]
mov byte [ebx + 4], al
mov edi, dword [ebp - 0xc]
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov edx, dword [ebp - 0x10]
mov cl, dl
add cl, cl
shl dl, 2
xor cl, byte [esi + 0x14]
and cl, 2
xor cl, byte [esi + 0x14]
xor dl, cl
and dl, 4
xor dl, cl
xor eax, eax
mov byte [esi + 0x14], dl
pop edi
pop esi
pop ebx
leave
ret

Function at 0x406d9e
Capabilities:
Allocate or change rwx memory

Disassembly:
mov edx, dword [0x40c88c]
push esi
xor esi, esi
jmp 0x406db0
cmp dword [edx + 4], esi
jne 0x406dfc
mov edx, dword [edx]
test edx, edx
jne 0x406da9
push 0x40
push 0x3000
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, eax
test edx, edx
je 0x406e09
push edi
push 0x20
lea ecx, [edx + 0x20]
mov dword [edx + 8], esi
pop edi
mov dword [ecx], esi
mov eax, ecx
mov dword [edx + 4], ecx
add edi, 0x20
add ecx, 0x20
mov esi, eax
cmp edi, 0xfe0
jbe 0x406dd7
mov eax, dword [0x40c88c]
pop edi
mov dword [edx], eax
mov dword [0x40c88c], edx
mov eax, dword [edx + 4]
pop esi
mov ecx, dword [eax]
inc dword [edx + 8]
mov dword [edx + 4], ecx
ret
xor eax, eax
pop esi
ret
Function at 0x407415
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
push 2
lea eax, [ebp - 4]
push eax
push 0x20000001
push str._x_sys_default_locale
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
xor ecx, ecx
test eax, eax
jne 0x40743c
mov eax, ecx
mov dword [ebp - 4], eax
jmp 0x40743f
mov eax, dword [ebp - 4]
push esi
mov esi, dword [ebp + 0xc]
push ecx
push ecx
push esi
push eax
push dword [ebp + 8]
push ecx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push eax
push dword [esi]
call fcn.004073f1
pop esi
leave
ret 8

Function at 0x4078e0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
mov edx, esi
sub edx, eax
mov ecx, edx
and ecx, 0xffffffe0
push edi
mov di, word [ebp + 0x10]
mov dword [ebp - 4], ecx
je 0x40793f
mov ecx, dword [0x40c090]
shr ecx, 5
test cl, 1
je 0x40793f
add dword [ebp - 4], eax
movsx ecx, di
vmovd xmm0, ecx
vpunpcklwd xmm0, xmm0, xmm0
vpshufd xmm0, xmm0, 0
vinsertf128 ymm1, ymm0, xmm0, 1
vpcmpeqw ymm0, ymm1, ymmword [eax]
vpmovmskb ecx, ymm0
test ecx, ecx
jne 0x407994
add eax, 0x20
cmp eax, dword [ebp - 4]
jne 0x407925
and edx, 0x1f
vzeroupper
and edx, 0xfffffff0
je 0x407979
mov ecx, dword [0x40c090]
shr ecx, 1
test cl, 1
je 0x407979
movsx ecx, di
add edx, eax
movd xmm0, ecx
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
movups xmm0, xmmword [eax]
pcmpeqw xmm0, xmm1
pmovmskb ecx, xmm0
test ecx, ecx
jne 0x4079a5
add eax, 0x10
cmp eax, edx
jne 0x407963
cmp eax, esi
je 0x40798c
lea ecx, [ecx]
cmp word [eax], di
je 0x40798c
add eax, 2
cmp eax, esi
jne 0x407980
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
vzeroupper
tzcnt ecx, ecx
pop edi
add eax, ecx
pop esi
mov esp, ebp
pop ebp
ret 0xc
bsf ecx, ecx
pop edi
add eax, ecx
pop esi
mov esp, ebp
pop ebp
ret 0xc

Function at 0x4084a3
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4084e2
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4084e2
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4084e2
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4084e2
cmp dword [ecx + 0x74], 0xe
jbe 0x4084e2
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x403720
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x270
mov eax, dword [0x431040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
lea edx, [ecx + 2]
push edi
mov edi, ecx
mov dword [ebp - 0x234], 0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403747
sub ecx, edx
sar ecx, 1
cmp ecx, 0x40
ja 0x403984
mov ecx, 0x24
lea eax, [ebp - 0x230]
nop word [eax + eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x403770
cmp dword [0x4321f8], 2
movups xmm0, xmmword [str.w_QCWCQVT]
mov ax, word [0x42e304]
mov dword [ebp - 0x230], 0x24
movups xmmword [ebp - 0x270], xmm0
mov dword [ebp - 0x21c], 4
movups xmm0, xmmword [0x42e2dc]
mov word [ebp - 0x238], ax
movups xmmword [ebp - 0x260], xmm0
movups xmm0, xmmword [0x42e2ec]
movups xmmword [ebp - 0x250], xmm0
movq xmm0, qword [0x42e2fc]
movq qword [ebp - 0x240], xmm0
jl 0x4038f2
movaps xmm4, xmmword [0x42e390]
movaps xmm3, xmmword [0x42e3f0]
movaps xmm5, xmmword [0x42e3b0]
movaps xmm6, xmmword [0x42e3d0]
nop
movd xmm0, ecx
lea eax, [ecx + 4]
pshufd xmm2, xmm0, 0
paddd xmm2, xmm4
movaps xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm3
punpckldq xmm1, xmm2
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movaps xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm5
psubd xmm2, xmm0
pshufhw xmm0, xmm2, 0xd8
pshuflw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
movq xmm0, xmm6
paddw xmm1, xmm0
movq xmm0, qword [ebp + ecx*2 - 0x270]
xorps xmm1, xmm0
movd xmm0, eax
pshufd xmm2, xmm0, 0
movq qword [ebp + ecx*2 - 0x270], xmm1
paddd xmm2, xmm4
movaps xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
punpckldq xmm1, xmm2
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movaps xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm5
psubd xmm2, xmm0
pshufhw xmm0, xmm2, 0xd8
pshuflw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
movq xmm0, xmm6
paddw xmm1, xmm0
movq xmm0, qword [ebp + ecx*2 - 0x268]
xorps xmm1, xmm0
movq qword [ebp + ecx*2 - 0x268], xmm1
add ecx, 8
cmp ecx, 0x18
jl 0x403800
cmp ecx, 0x1d
jge 0x40391b
mov eax, 0x4d4873ed
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, ecx
imul eax, eax, 0x35
sub edx, eax
add edx, 0x32
xor word [ebp + ecx*2 - 0x270], dx
inc ecx
cmp ecx, 0x1d
jl 0x4038f2
lea eax, [ebp - 0x270]
push eax
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0040e6f5
push edi
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0040e759
add esp, 0x18
lea eax, [ebp - 0x234]
push eax
push 0x42e110
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.ole32.dll_CoGetObject]
mov ecx, eax
mov eax, dword [ebp - 0x234]
mov dword [esi], eax
mov eax, ecx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004094e5
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0x80004005
pop edi
mov dword [esi], 0
xor ecx, ebp
pop esi
call fcn.004094e5
mov esp, ebp
pop ebp
ret
Function at 0x4044a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push esi
push edi
push 2
push 0
mov dword [ebp - 8], edx
mov ebx, 0xc0000022
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov ecx, 0x13
mov dword [ebp - 0x10], eax
mov esi, 0x42e078
lea edi, [ebp - 0x60]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
cmp dword [0x4321f8], 2
movsw word es:[edi], word [esi]
jl 0x4045f0
movaps xmm4, xmmword [0x42e390]
movaps xmm3, xmmword [0x42e3f0]
movaps xmm5, xmmword [0x42e3b0]
movaps xmm6, xmmword [0x42e3d0]
movd xmm0, ecx
lea eax, [ecx + 4]
pshufd xmm2, xmm0, 0
paddd xmm2, xmm4
movaps xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm3
punpckldq xmm1, xmm2
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movaps xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm5
psubd xmm2, xmm0
pshufhw xmm0, xmm2, 0xd8
pshuflw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
movq xmm0, xmm6
paddw xmm1, xmm0
movq xmm0, qword [ebp + ecx*2 - 0x60]
xorps xmm1, xmm0
movd xmm0, eax
pshufd xmm2, xmm0, 0
movq qword [ebp + ecx*2 - 0x60], xmm1
paddd xmm2, xmm4
movaps xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
punpckldq xmm1, xmm2
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, 4
movaps xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmm5
psubd xmm2, xmm0
pshufhw xmm0, xmm2, 0xd8
pshuflw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
movq xmm0, xmm6
paddw xmm1, xmm0
movq xmm0, qword [ebp + ecx*2 - 0x58]
xorps xmm1, xmm0
movq qword [ebp + ecx*2 - 0x58], xmm1
add ecx, 8
cmp ecx, 0x20
jl 0x404504
cmp ecx, 0x27
jge 0x404616
nop word [eax + eax]
mov eax, 0x4d4873ed
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, ecx
imul eax, eax, 0x35
sub edx, eax
add edx, 0x32
xor word [ebp + ecx*2 - 0x60], dx
inc ecx
cmp ecx, 0x27
jl 0x4045f0
lea eax, [ebp - 4]
push eax
push ecx
lea ecx, [ebp - 0x60]
call fcn.00403720
mov esi, dword [ebp - 4]
add esp, 8
test eax, eax
jne 0x404650
test esi, esi
je 0x40465c
mov eax, dword [esi]
push 0
push 0
push 0
push dword [ebp - 8]
mov eax, dword [eax + 0x24]
push dword [ebp - 0xc]
push esi
call eax
mov ebx, eax
sar ebx, 0x1f
and ebx, 0xc0000022
test esi, esi
je 0x40465c
mov ecx, dword [esi]
push esi
mov ecx, dword [ecx + 8]
call ecx
cmp dword [ebp - 0x10], 0
jne 0x404668
call dword [sym.imp.ole32.dll_CoUninitialize]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408714
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
jg 0x408735
jl 0x40872c
test edi, edi
jne 0x408735
xor eax, eax
xor edx, edx
jmp 0x4087f6
cmp dword [ebx + 0x38], 0
je 0x40874a
push eax
push edi
push dword [ebp + 8]
call fcn.004087fc
jmp 0x4087f6
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x408791
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x408791
cmp eax, edi
jb 0x40876b
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.0040ac60
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 8]
sub esi, ecx
add eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], ecx
mov eax, dword [ebx + 0x1c]
add dword [eax], ecx
jmp 0x408797
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x4087eb
mov ecx, ebx
call fcn.00407f63
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x4087d6
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.00411578
mov ecx, dword [ebp - 4]
sub esi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, esi
cmp eax, 0xfff
jne 0x4087eb
jmp 0x4087a9
test edx, edx
je 0x4087eb
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.00411578
add esp, 0x10
sub esi, eax
mov edx, dword [ebp + 0x10]
sub edi, esi
mov eax, edi
sbb edx, 0
pop esi
pop edi
pop ebx
leave
ret 0xc

Function at 0x40a39c
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40a3db
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40a3db
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40a3db
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40a3db
cmp dword [ecx + 0x74], 0xe
jbe 0x40a3db
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x416302
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4299c8
push 0x4299c0
push str.FlsAlloc
push 0x1f
call fcn.004161ca
mov esi, eax
add esp, 0x10
test esi, esi
je 0x416336
push dword [ebp + 8]
mov ecx, esi
call dword [0x4261a8]
call esi
jmp 0x41633c
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x416380
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4299d8
push 0x4299d0
push str.FlsGetValue
push 0x21
call fcn.004161ca
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4163b7
push dword [ebp + 8]
mov ecx, esi
call dword [0x4261a8]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x4163bf
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4299e0
push 0x4299d8
push str.FlsSetValue
push 0x22
call fcn.004161ca
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4163f9
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x4261a8]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x419ac1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0040a5b0
mov eax, dword [0x431040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00417f32
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x419b03
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x419c5f
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00424280
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x432988]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.0041aabe
mov ecx, dword [esi*4 + 0x432988]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x419c58
cmp eax, dword [ecx + edi + 0x24]
jne 0x419c58
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x419c58
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0041aabe
add esp, 0x14
test edx, edx
jl 0x419c58
jg 0x419bce
test eax, eax
jb 0x419c58
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x419c58
jl 0x419be8
cmp dword [ebp - 0x1008], eax
ja 0x419c58
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x419c06
test ebx, ebx
je 0x419c3f
cmp ecx, edi
jae 0x419c3f
mov al, byte [ecx]
cmp al, 0xd
jne 0x419c20
lea eax, [edi - 1]
cmp ecx, eax
jae 0x419c2c
cmp byte [ecx + 1], 0xa
jne 0x419c2c
inc ecx
jmp 0x419c2c
movzx eax, al
movsx eax, byte [eax + 0x431310]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x419c06
cmp edx, ebx
jne 0x419c06
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x419c5d
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004094e5
leave
ret