joyce8/EMBER2024-capa huggingface dataset:
Function at 0x47ec40
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x1a000]
push edi
or ebp, 0xffffffff
jmp 0x47ec62
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x47ec69
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x47ec58
mov eax, 1
add ebx, ebx
jne 0x47ec7b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x47ec70
jne 0x47ec8c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x47ec70
xor ecx, ecx
sub eax, 3
jb 0x47eca0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x47ed12
mov ebp, eax
add ebx, ebx
jne 0x47ecab
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x47ecb8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x47ecdc
inc ecx
add ebx, ebx
jne 0x47ecc8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x47ecbd
jne 0x47ecd9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x47ecbd
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x47ecfc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x47eced
jmp 0x47ec5e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x47ecfc
add edi, ecx
jmp 0x47ec5e
pop esi
lea edi, [esi + 0x7c000]
mov eax, dword [edi]
or eax, eax
je 0x47ed5b
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x7e000]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x7e06c]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x47ed19
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x7e074]
or eax, eax
je 0x47ed55
mov dword [ebx], eax
add ebx, 4
jmp 0x47ed36
call dword [esi + 0x7e070]
mov ebp, dword [esi + 0x7e078]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x1d7]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x47ed8f
sub esp, 0xffffff80
jmp section.UPX0
Function at 0x40676f
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x83c
push 4
lea eax, [ebp - 0x83c]
pop ecx
and dword [eax], 0
add eax, 0x20c
dec ecx
jne 0x406781
and dword [ebp - 4], 0
and word [ebp - 8], 0
push ebx
push esi
push edi
mov esi, 0x4014f8
push dword [ebp + 0x10]
mov dword [ebp - 0xc], esi
call fcn.004091f0
push dword [ebp + 0xc]
jmp loc.0042a000

Function at 0x406e93
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28c
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
mov dword [ebp - 4], ebx
jne 0x406eb3
mov eax, 0x80004005
jmp 0x406fcf
lea eax, [ebp - 0x28c]
push eax
push ebx
push ebx
push dword [ebp + 0x14]
push ebx
call sub.SHFOLDER.dll_SHGetFolderPathW
mov esi, eax
cmp esi, ebx
jl 0x406fc0
cmp dword [ebp + 0x14], 0x1a
jne 0x406f0e
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x28c]
push 0x401524
push eax
call esi
lea eax, [ebp - 0x84]
push 0x40
push eax
push 0x65
push ebx
call fcn.00409483
test eax, eax
je 0x406f0e
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x28c]
push eax
call esi
cmp dword [ebp + 0xc], ebx
jne 0x406f17
xor edi, edi
jmp 0x406f44
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.00407580
mov edi, esp
push esi
push edi
push 0xffffffffffffffff
push dword [ebp + 0xc]
mov word [edi], bx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x28c]
push edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x28c]
push 0x401518
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddExtensionW]
lea eax, [ebp - 0x28c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x406f7c
mov esi, 0x80004005
jmp 0x406fc0
mov eax, dword [ebp + 8]
lea edx, [ebp - 4]
push edx
push 0x4015f0
mov ecx, dword [eax]
push eax
call dword [ecx]
mov esi, eax
cmp esi, ebx
jl 0x406fc0
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x28c]
push 1
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov esi, eax
cmp esi, ebx
jl 0x406fc0
lea eax, [ebp - 0x28c]
push 0x104
push eax
push dword [ebp + 0x10]
call dword [sym.imp.SHLWAPI.dll_StrCpyNW]
mov eax, dword [ebp - 4]
cmp eax, ebx
je 0x406fcd
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, esi
lea esp, [ebp - 0x298]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x403550
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x409014]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x4035e8
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4035c8
xor eax, eax
push ebp
push 0x4035c1
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x403604
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4035c8
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x409014]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x409014], ax
mov esp, ebp
pop ebp
ret

Function at 0x403eb4
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x40a044], 0
je 0x403f15
cmp word [0x40a218], 0xd7b2
jne 0x403edd
cmp dword [0x40a220], 0
jbe 0x403edd
mov eax, 0x40a214
call dword [0x40a230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x409060
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x403f3c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x409020], 0
jne 0x403f31
push 0
push 0x409058
push 0x409060
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x404cc4
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x404d2a
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.00404280
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00402f0c
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x404d14
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404d31
lea eax, [ebp - 0x10]
call fcn.00404038
ret

Function at 0x406b0c
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x406b45
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00404128
jmp 0x406b4e
mov eax, ebx
mov edx, esi
call fcn.0040408c
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x406b58
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x406b79
mov al, byte [esp]
jmp 0x406b7b
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x407210
Capabilities:
Write file on windows

Disassembly:
add esp, 0xfffffbbc
push 0x400
lea ecx, [esp + 0x48]
call 0x407078
mov eax, dword [0x4093d8]
cmp byte [eax], 0
je 0x40728c
mov eax, dword [0x40932c]
call fcn.00402d48
call fcn.004029a8
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x48]
push eax
call sub.user32.dll_CharToOemA
push 0
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x4c]
call fcn.00405fe0
push eax
lea eax, [esp + 0x50]
push eax
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x4072d4
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x4072c2
push 0x40
lea eax, [esp + 8]
push eax
mov eax, dword [0x40930c]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x40a660]
call fcn.00404694
push eax
call sub.user32.dll_LoadStringA_1
push 0x2010
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x4c]
push eax
push 0
call sub.user32.dll_MessageBoxA_1
add esp, 0x444
ret
Function at 0x407cb0
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
xor edx, edx
mov dword [ebp - 0xc], edx
xor edx, edx
push ebp
push 0x407d14
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 7]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
lea eax, [ebp - 0xc]
lea edx, [ebp - 7]
mov ecx, 7
call fcn.00404280
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetACP
mov edx, eax
pop eax
call fcn.00405ea8
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407d1b
lea eax, [ebp - 0xc]
call fcn.00404038
ret

Function at 0x510024
Capabilities:
Packed with generic packer

Disassembly:
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [edx], al
add al, byte [eax]
add byte [eax], al
cld
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax], al
add al, byte [eax]
add byte [eax], al
cld
invalid
stc
jb 0x51002e
pop ds
xor esi, dword [ecx - 0x49]
jno 0x50ffe2
cwde
leave
jmp 0x51008f
pushal
jmp 0x510034
call 0x51003f
dec ecx
stc
mov dl, 0xed
pop ecx
pop ebx
jb 0x510049
jne 0x50ffd9
jge 0x510029
sbb dword [edx - 0x383c7edc], 0xffffffff
invalid
add ebx, 0xffffffc7
jmp 0x510058
cmp dword [ebx], 0
stc
jmp 0x510067
je 0x5100ed
jmp 0x510076
mov ecx, ebx
jmp 0x510081
add ebx, 4
jmp 0x510089
mov edx, dword [ebx]
jmp 0x510097
and eax, 0x8ced9cec
in eax, dx
cmp ebp, dword [ebx + 3]
sar ecx, cl
add edx, ebx
stc
jb 0x5100a3
mov ah, 0xb1
mov ebx, 0xc91a740d
mov eax, dword [ebx + 4]
jmp 0x5100ac
sub dword [edx], 0x3c62176a
jmp 0x5100b6
add edx, 4
jmp 0x5100bf
sub eax, 1
jmp 0x5100c6
jne 0x5100a6
jmp 0x5100d0
add ebx, 8
jmp 0x5100d7
sub dword [ecx], 1
stc
jb 0x5100de
and ecx, dword [edi]
test dword [eax + 0x72ffffff], esp
add dh, byte [ecx + 0xee83b]
add byte [eax], al
jne 0x510084
jb 0x5100e8
mov cl, 0x3b
call 0x5100fb
jmp 0x5100f1
popal
jmp 0x5100f6
jmp 0x50ed00
Function at 0x10001000
Capabilities:
Allocate or change rwx memory
Create thread
Enumerate process modules
Inject thread
Spawn thread to rwx shellcode
Terminate process

Disassembly:
push ebp
push esi
push edi
sub esp, 0x11a0
lea eax, [esp]
lea esi, [esp + 0xfa0]
push esi
push 0xfa0
push eax
call dword [sym.imp.kernel32.dll_K32EnumProcesses]
test al, al
je 0x1000110b
mov edi, dword [esi]
push dword [esp + edi - 4]
push 0
push 0x43a
call dword [sym.imp.kernel32.dll_OpenProcess]
test eax, eax
je 0x1000106b
mov ebp, eax
push 0x100
push esi
push 0
push ebp
call dword [sym.imp.kernel32.dll_K32GetModuleBaseNameW]
test eax, eax
je 0x10001064
push esi
push 0x10003858
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
je 0x1000108c
push ebp
call dword [sym.imp.kernel32.dll_CloseHandle]
sub edi, 4
jne 0x1000102a
push 0x10040
push 0x10003870
push 0x10003874
push 0
call dword [sym.imp.user32.dll_MessageBoxW]
jmp 0x10001122
push 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
mov esi, eax
push pe_nt_image_headers32
push 0x1000
push dword [esi + 0x90]
push 0
push ebp
call dword [sym.imp.kernel32.dll_VirtualAllocEx]
test eax, eax
je 0x10001104
mov edi, eax
push 0
push dword [esi + 0x90]
push esi
push edi
push ebp
call dword [sym.imp.kernel32.dll_WriteProcessMemory]
test al, al
je 0x100010f5
lea eax, [edi + 0x1136]
push 0
push 0
push edi
push eax
push 0x1000
push 0
push ebp
call dword [sym.imp.kernel32.dll_CreateRemoteThread]
test eax, eax
je 0x100010f5
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
push ebp
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x10001122
push 0x4000
push 0
push edi
push ebp
call dword [sym.imp.kernel32.dll_VirtualFreeEx]
push ebp
call dword [sym.imp.kernel32.dll_CloseHandle]
push 0x10010
push 0x10003870
push 0x100038a4
push 0
call dword [sym.imp.user32.dll_MessageBoxW]
push 0
call dword [sym.imp.kernel32.dll_ExitProcess]

Function at 0x10002ec1
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebx
sub esp, 4
lea eax, [esp]
push eax
push pe_nt_image_headers32
push dword [esp + 0x1c]
push dword [esp + 0x18]
call dword [sym.imp.kernel32.dll_VirtualProtect]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
sub edx, 1
mov bh, byte [eax + edx]
mov bl, byte [ecx + edx]
mov byte [eax + edx], bl
mov byte [ecx + edx], bh
jne 0x10002ee5
lea eax, [esp]
push eax
push dword [esp + 4]
push dword [esp + 0x1c]
push dword [esp + 0x18]
call dword [sym.imp.kernel32.dll_VirtualProtect]
add esp, 4
pop ebx
ret 0xc
Function at 0x40b54b
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
pushal
call 0x40b55a
pop dword [ebp - 0x20]
mov eax, 0x7f1cee2f
sub eax, 0x7edc38d5
sub dword [ebp - 0x20], eax
push 0x40
push 0x1000
push 0x4fa75
push 0
mov eax, sym.imp.kernel32.dll_VirtualAlloc
add eax, dword [ebp - 0x20]
call dword [eax]
mov ecx, 0xb7c87c58
add ecx, 0x4837c830
mov esi, eax
mov edx, 0x475e00
add edx, dword [ebp - 0x20]
mov ebx, 0x62b27a60
sub ebx, 0xea2c1512
add dword [ebp - 0x14], edx
mov edi, dword [edx]
mov dword [ebp - 0x10], 0x3581637a
xor edi, ebx
mov dword [ebp - 4], 0x7f98e94a
mov dword [esi], edi
add dword [ebp - 0x10], eax
add esi, 0x559ed5fd
sub esi, 0x559ed5f9
add edx, 0x3198ce14
add edx, 0xce6731f0
loop 0x40b5ae
add eax, 0x4bdf9dc8
sub eax, 0x4bde98d5
xor ebx, ebx
add ebx, eax
add eax, 5
mov ecx, 0xed7d589a
add ecx, 0x12c2a766
add ecx, dword [ebp - 0x20]
call ebx
leave
ret

Function at 0x4400c9
Capabilities:
Encrypt data using dpapi

Disassembly:
push esi
push edi
push 0x46c6d0
push str.AdvApi32.dll
call main
mov edi, dword [sym.imp.kernel32.dll_GetProcAddress]
mov esi, eax
test esi, esi
js 0x44010c
push str.SystemFunction040
push dword [0x46c6d0]
call edi
push str.SystemFunction041
push dword [0x46c6d0]
mov dword [0x46c6c0], eax
call edi
mov dword [0x46c6c4], eax
jmp 0x440111
mov eax, dword [0x46c6c4]
cmp dword [0x46c6c0], 0
je 0x440122
test eax, eax
jne 0x4401c9
push 0x46c6d4
push str.Crypt32.dll
call main
mov esi, eax
test esi, esi
js 0x4401d3
push str.CryptProtectMemory
push dword [0x46c6d4]
call edi
cmp dword [0x46c6c0], 0
mov dword [0x46c6c8], eax
jne 0x440187
test eax, eax
jne 0x440187
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x440171
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x440178
mov esi, 0x80004005
push esi
push 0x28
push str.c:_agent_work138_s_srclibsdutilcryputil.cpp
call fcn.004038f5
jmp 0x4401d3
push str.CryptUnprotectMemory
push dword [0x46c6d4]
call edi
cmp dword [0x46c6c4], 0
mov dword [0x46c6cc], eax
jne 0x4401c9
test eax, eax
jne 0x4401c9
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4401bd
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x4401c4
mov esi, 0x80004005
push esi
push 0x2d
jmp 0x44017b
mov dword [0x46c6d8], 1
pop edi
mov eax, esi
pop esi
ret
Function at 0x401385
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4013b8
push 0xfffffffffffffffe
pop eax
jmp 0x40152a
lea eax, [ebp - 0xc]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + 0xa]
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [ebp - 4], eax
jne 0x4013e1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4013fd
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
lea eax, [ebp - 0x10]
push 0
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401405
or eax, 0xffffffff
jmp 0x40152a
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [esi], 0x42
jne 0x401513
cmp byte [esi + 1], 0x4d
jne 0x401513
push 0
sub edi, 0xe
pop eax
je 0x401433
mov cl, byte [eax + esi + 0xe]
mov byte [eax + esi], cl
inc eax
cmp eax, edi
jb 0x401427
cmp dword [esi + 0x10], 0
je 0x401440
push 0xfffffffffffffff0
jmp 0x401515
mov edi, dword [ebp + 0xc]
mov eax, dword [esi + 4]
mov dword [edi + 8], eax
mov eax, dword [esi + 8]
and dword [edi + 4], 0
mov dword [edi + 0xc], eax
movzx eax, word [esi + 0xe]
dec eax
je 0x40147c
sub eax, 3
je 0x401478
sub eax, 4
je 0x401471
sub eax, 0x10
jne 0x401513
xor eax, eax
jmp 0x40147f
mov eax, 0x400
jmp 0x40147f
push 0x40
jmp 0x40147e
push 8
pop eax
mov ebx, dword [esi]
push 0
add ebx, eax
add ebx, esi
call dword [sym.imp.USER32.dll_GetDC]
and dword [ebp + 0xc], 0
push 0xc
push eax
mov dword [ebp + 8], eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
cmp eax, 8
jne 0x4014a9
mov dword [ebp + 0xc], 1
cmp word [esi + 0xe], 8
jne 0x4014d8
cmp dword [ebp + 0xc], 0
je 0x4014d8
push esi
call fcn.00401531
pop ecx
mov dword [edi + 4], eax
push 0
push eax
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SelectPalette]
push dword [ebp + 8]
mov dword [ebp - 8], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
push 0
push esi
push ebx
push 4
push esi
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov dword [edi], eax
cmp word [esi + 0xe], 8
jne 0x401505
cmp dword [ebp + 0xc], 0
je 0x401505
push 0
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SelectPalette]
push dword [ebp + 8]
xor esi, esi
push esi
call dword [sym.imp.USER32.dll_ReleaseDC]
jmp 0x401516
push 0xfffffffffffffff8
pop esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x401720
Capabilities:
Get file size

Disassembly:
mov eax, 0x4640dc
call fcn.0043540c
sub esp, 0x134
push ebx
push esi
xor esi, esi
push esi
push 0x80
push 3
push esi
push 1
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4017ed
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
push esi
push esi
push 4
push esi
push ebx
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, esi
mov dword [ebp - 0x10], eax
je 0x4017e6
push edi
push esi
push esi
push esi
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, esi
je 0x4017dc
lea eax, [ebp + 0xb]
push 1
push eax
lea ecx, [ebp - 0x3c]
push dword [ebp + 0xc]
call fcn.00401a72
mov ecx, eax
mov dword [ebp - 4], esi
call fcn.00401c63
push eax
lea eax, [ebp - 0x140]
push eax
call fcn.00435430
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
lea ecx, [ebp - 0x3c]
call fcn.00401306
lea eax, [ebp - 0x140]
push eax
push dword [ebp - 0x14]
push edi
call fcn.004016c2
add esp, 0xc
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x4018af
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
xor esi, esi
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
push esi
push esi
push 4
push esi
mov dword [ebp - 4], eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebx, eax
cmp ebx, esi
je 0x40190c
push edi
push esi
push esi
push esi
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, esi
je 0x401904
push dword [ebp + 0xc]
push dword [ebp - 4]
push edi
call fcn.00401812
add esp, 0xc
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x401912
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
mov byte [ebp - 4], 0x13
mov byte [ebp - 3], 0x35
mov byte [ebp - 2], 0x86
mov byte [ebp - 1], 7
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
push ebx
call fcn.00435520
mov esi, eax
pop ecx
test esi, esi
je 0x401960
xor edx, edx
test ebx, ebx
jbe 0x401960
sub edi, esi
mov eax, edx
lea ecx, [edx + esi]
and eax, 3
mov al, byte [ebp + eax - 4]
xor al, byte [edi + ecx]
inc edx
cmp edx, ebx
mov byte [ecx], al
jb 0x40194a
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret