joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405c50
Capabilities:
Delete file
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42ea56
mov eax, dword fs:[0]
push eax
sub esp, 0x88c
mov eax, dword [0x43b050]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
mov edi, edx
mov dword [ebp - 0x898], edi
cmp esi, ebx
je 0x405d4d
cmp edi, ebx
je 0x405d4d
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryA]
test eax, eax
je 0x405d4d
push 3
lea eax, [ebp - 0x534]
push esi
lea ecx, [ebp - 0x538]
mov dword [ebp - 0x538], eax
call fcn.004049f0
push 0x208
lea edx, [ebp - 0x21e]
xor ecx, ecx
push ebx
mov dword [ebp - 4], ebx
push edx
mov word [ebp - 0x220], cx
call fcn.00421960
mov eax, dword [ebp - 0x538]
add esp, 0xc
push 0xffffffffffffffff
push eax
lea ecx, [ebp - 0x220]
push 0x104
push ecx
call fcn.004204c3
add esp, 0x10
push 0x435c44
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x890]
push eax
lea ecx, [ebp - 0x220]
push ecx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x894], eax
cmp eax, 0xffffffff
jne 0x405d6b
mov eax, dword [ebp - 0x538]
lea edx, [ebp - 0x534]
cmp eax, edx
je 0x405d4d
push eax
call fcn.004202bd
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
push 3
lea eax, [ebp - 0x63c]
push edi
lea ecx, [ebp - 0x640]
mov dword [ebp - 0x640], eax
call fcn.004049f0
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x640]
push ecx
call fcn.0040c840
add esp, 4
mov edi, eax
lea ebx, [ebx]
test byte [ebp - 0x890], 0x10
jne 0x405e20
mov edx, dword [ebp - 0x870]
add edx, esi
cmp edx, 0x6400000
ja 0x405e20
xor eax, eax
push 0x208
push eax
lea ecx, [ebp - 0x42e]
push ecx
mov word [ebp - 0x430], ax
call fcn.00421960
mov edx, dword [ebp - 0x538]
add esp, 0xc
push 0xffffffffffffffff
push edx
lea eax, [ebp - 0x430]
push 0x104
push eax
call fcn.004204c3
add esp, 0x10
lea ecx, [ebp - 0x864]
push ecx
lea edx, [ebp - 0x430]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x430]
push eax
mov eax, edi
call fcn.0040c950
add esi, dword [ebp - 0x870]
add esp, 4
inc ebx
mov edx, dword [ebp - 0x894]
lea ecx, [ebp - 0x890]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405da0
mov eax, dword [ebp - 0x894]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
call fcn.0040c990
test ebx, ebx
jne 0x405e5f
mov ecx, dword [ebp - 0x898]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 0x640]
lea edx, [ebp - 0x63c]
cmp eax, edx
je 0x405e78
push eax
call fcn.004202bd
add esp, 4
mov eax, dword [ebp - 0x538]
lea ecx, [ebp - 0x534]
cmp eax, ecx
je 0x405e91
push eax
call fcn.004202bd
add esp, 4
mov eax, 1
jmp 0x405d4f
Function at 0x405ea0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42df6b
mov eax, dword fs:[0]
push eax
sub esp, 0x244
mov eax, dword [0x43b050]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
push 1
push 0x43f5d4
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp eax, ebx
jne 0x406069
mov esi, 0x43cd34
mov dword [ebp - 0x240], 6
lea edi, [ebx + 0xf]
jmp 0x405f00
push 0x104
lea eax, [ebp - 0x21f]
push ebx
push eax
mov byte [ebp - 0x220], bl
call fcn.00421960
add esp, 0xc
cmp dword [esi + 0x14], 0x10
jb 0x405f25
mov eax, dword [esi]
jmp 0x405f27
mov eax, esi
push 0x104
lea ecx, [ebp - 0x220]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea edx, [ebp - 0x220]
push edx
call fcn.0042cdeb
lea eax, [ebp - 0x220]
add esp, 4
mov dword [ebp - 0x224], edi
mov dword [ebp - 0x228], ebx
mov byte [ebp - 0x238], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405f64
sub eax, edx
push eax
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x23c]
call fcn.004015d0
lea ecx, [ebp - 0x23c]
push ecx
lea edx, [ebp - 0x24c]
push edx
mov dword [ebp - 4], ebx
call fcn.004077c0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x224], 0x10
jb 0x405fb5
mov eax, dword [ebp - 0x238]
push eax
call fcn.0041f860
add esp, 4
add esi, 0x1c
sub dword [ebp - 0x240], 1
mov dword [ebp - 0x224], edi
mov dword [ebp - 0x228], ebx
mov byte [ebp - 0x238], bl
jne 0x405f00
push 0x104
lea ecx, [ebp - 0x117]
push ebx
push ecx
mov byte [ebp - 0x118], bl
call fcn.00421960
add esp, 0xc
push 0x104
lea edx, [ebp - 0x118]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea eax, [ebp - 0x118]
lea edx, [eax + 1]
jmp 0x406020
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x406020
sub eax, edx
push eax
lea ecx, [ebp - 0x118]
push ecx
mov ecx, 0x43cd10
call fcn.004015d0
push 2
push 0x43f5d4
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x406048
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, 0x1f5
lea esp, [esp]
push 0xa
call edi
sub esi, 1
jne 0x406080
xor eax, eax
jmp 0x40604d
Function at 0x4064e0
Capabilities:
Query environment variable

Disassembly:
push esi
mov esi, ecx
push edi
mov edi, eax
mov ecx, str._PRO_INSTALL_DIR_
mov eax, esi
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x406510
test dl, dl
je 0x40650c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x406510
add eax, 2
add ecx, 2
test dl, dl
jne 0x4064f0
xor eax, eax
jmp 0x406515
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x406545
cmp dword [0x43cd28], 0x10
mov eax, dword [0x43cd14]
jae 0x40652c
mov eax, 0x43cd14
push 0xffffffffffffffff
push eax
push 0x104
push edi
call fcn.00420663
add esp, 0x10
pop edi
mov eax, 1
pop esi
ret
call fcn.00406090
test eax, eax
jne 0x40653d
push 0x104
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp eax, 0x104
ja 0x406599
test eax, eax
je 0x406599
mov ecx, edi
mov eax, esi
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x406590
test dl, dl
je 0x40658c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x406590
add eax, 2
add ecx, 2
test dl, dl
jne 0x406570
xor eax, eax
jmp 0x406595
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40653d
pop edi
xor eax, eax
pop esi
ret
Function at 0x408610
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ax, word [ebp - 0x28]
mov ecx, 9
cmp cx, ax
jne 0x408634
mov al, 1
mov esp, ebp
pop ebp
ret
xor edx, edx
cmp dx, ax
jne 0x408641
xor al, al
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 4]
push eax
mov dword [ebp - 4], edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x40863b
cmp dword [ebp - 4], 0
setne al
mov esp, ebp
pop ebp
ret
Function at 0x408670
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x43b050]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push 0x11c
lea eax, [ebp - 0x120]
push 0
mov dword [edi], 0xffffffff
push eax
mov dword [esi], 0xffffffff
call fcn.00421960
mov ebx, dword [sym.imp.KERNEL32.dll_GetVersionExW]
add esp, 0xc
lea ecx, [ebp - 0x120]
push ecx
mov dword [ebp - 0x120], 0x11c
call ebx
test eax, eax
jne 0x4086eb
lea edx, [ebp - 0x120]
push edx
mov dword [ebp - 0x120], 0x114
call ebx
test eax, eax
jne 0x4086eb
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
movzx eax, word [ebp - 0xc]
mov dword [esi], eax
mov eax, dword [ebp - 0x110]
sub eax, 0
je 0x4088a3
sub eax, 1
je 0x408841
sub eax, 1
jne 0x4088a9
mov eax, dword [ebp - 0x11c]
cmp eax, 4
ja 0x408734
mov dword [edi], 0x68
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
cmp eax, 5
jne 0x408796
mov eax, dword [ebp - 0x118]
test eax, eax
jne 0x40875a
mov dword [edi], 0x69
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x408776
mov dword [edi], 0xc8
mov al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x40882a
mov dword [edi], 0x12c
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
cmp eax, 6
jne 0x40882a
mov eax, dword [ebp - 0x118]
test eax, eax
jne 0x4087d1
mov cl, byte [ebp - 6]
dec cl
movzx edx, cl
neg edx
sbb edx, edx
and edx, 0x64
add edx, 0x190
mov dword [edi], edx
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x4087fe
mov al, byte [ebp - 6]
dec al
movzx ecx, al
neg ecx
sbb ecx, ecx
and ecx, 0x64
add ecx, 0x258
mov dword [edi], ecx
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x40882a
mov dl, byte [ebp - 6]
dec dl
movzx eax, dl
neg eax
sbb eax, eax
and eax, 0xffffff9c
add eax, 0x384
mov dword [edi], eax
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
mov dword [edi], 0x258
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x11c], 4
jne 0x4088a9
mov eax, dword [ebp - 0x118]
test eax, eax
jne 0x40886b
mov dword [edi], 0x65
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
cmp eax, 0xa
jne 0x408887
mov dword [edi], 0x66
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
cmp eax, 0x5a
jne 0x4088a9
mov dword [edi], 0x67
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
mov dword [edi], 0x64
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov al, 1
pop ebx
call fcn.0041f86b
mov esp, ebp
pop ebp
ret
Function at 0x40a4d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, eax
xor ebx, ebx
push edi
mov dword [ebp - 4], 0
mov dword [esi + 0x6af80], 2
cmp dword [esi + 0x6af90], ebx
je 0x40a6ef
lea ebx, [ebx]
cmp dword [esi + 0x6af90], 3
jb 0x40a557
mov ecx, dword [esi + 0x6af84]
movzx eax, byte [ecx + esi + 0x1af72]
mov edx, dword [esi + 0x6af7c]
shl edx, 5
xor eax, edx
and eax, 0x7fff
mov dword [esi + 0x6af7c], eax
mov eax, dword [esi + eax*4 + 0x4af70]
and ecx, 0x7fff
mov dword [esi + ecx*4 + 0x2af70], eax
mov ecx, dword [esi + 0x6af84]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x6af7c]
mov dword [esi + eax*4 + 0x4af70], ecx
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x40a597
mov edx, dword [esi + 0x6af84]
sub edx, ecx
cmp edx, 0x7efa
ja 0x40a597
mov eax, dword [esi + 0x6af90]
cmp dword [esi + 0x6afa0], eax
jbe 0x40a582
mov dword [esi + 0x6afa0], eax
mov eax, ecx
call fcn.0040a1e0
mov ebx, eax
mov eax, dword [esi + 0x6af90]
cmp ebx, eax
jbe 0x40a597
mov ebx, eax
mov eax, dword [esi + 0x6af84]
mov ecx, esi
cmp ebx, 3
jb 0x40a67c
sub eax, dword [esi + 0x6af88]
lea edx, [ebx - 3]
call fcn.004099e0
sub dword [esi + 0x6af90], ebx
mov ecx, dword [esi + 0x6af90]
mov dword [ebp - 8], eax
cmp ebx, dword [esi + 0x6af98]
ja 0x40a644
cmp ecx, 3
jb 0x40a644
mov edi, 1
sub ebx, edi
lea esp, [esp]
add dword [esi + 0x6af84], edi
mov edx, dword [esi + 0x6af84]
movzx ecx, byte [esi + edx + 0x1af72]
mov eax, dword [esi + 0x6af7c]
shl eax, 5
xor ecx, eax
and ecx, 0x7fff
mov dword [esi + 0x6af7c], ecx
mov ecx, dword [esi + ecx*4 + 0x4af70]
and edx, 0x7fff
sub ebx, edi
mov dword [esi + edx*4 + 0x2af70], ecx
mov edx, dword [esi + 0x6af84]
mov dword [ebp - 4], ecx
mov ecx, dword [esi + 0x6af7c]
mov dword [esi + ecx*4 + 0x4af70], edx
jne 0x40a5e0
add dword [esi + 0x6af84], edi
mov eax, dword [ebp - 8]
jmp 0x40a697
add dword [esi + 0x6af84], ebx
mov ecx, dword [esi + 0x6af84]
lea edx, [ecx + esi]
movzx ecx, byte [edx + 0x1af70]
mov dword [esi + 0x6af7c], ecx
movzx edx, byte [edx + 0x1af71]
shl ecx, 5
xor edx, ecx
xor ebx, ebx
and edx, 0x7fff
mov dword [esi + 0x6af7c], edx
jmp 0x40a697
movzx edx, byte [eax + esi + 0x1af70]
xor eax, eax
call fcn.004099e0
dec dword [esi + 0x6af90]
inc dword [esi + 0x6af84]
test eax, eax
je 0x40a6d1
mov ecx, dword [esi + 0x6af74]
test ecx, ecx
jl 0x40a6ae
lea edx, [ecx + esi + 0x1af70]
jmp 0x40a6b0
xor edx, edx
mov eax, dword [esi + 0x6af84]
sub eax, ecx
push edx
xor edi, edi
mov ecx, esi
call fcn.00409840
mov ecx, dword [esi + 0x6af84]
add esp, 4
mov dword [esi + 0x6af74], ecx
cmp dword [esi + 0x6af90], 0x106
jae 0x40a6e2
call fcn.0040a380
cmp dword [esi + 0x6af90], 0
jne 0x40a500
mov ecx, dword [esi + 0x6af74]
test ecx, ecx
jl 0x40a702
lea edx, [ecx + esi + 0x1af70]
jmp 0x40a704
xor edx, edx
mov eax, dword [esi + 0x6af84]
sub eax, ecx
push edx
mov edi, 1
mov ecx, esi
call fcn.00409840
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40b3b0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
test ecx, ecx
jne 0x40b3b7
xor eax, eax
ret
push esi
not eax
cmp edx, 8
jb 0x40b494
mov esi, edx
shr esi, 3
push edi
lea esp, [esp]
movzx edi, byte [ecx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x436290]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x436290]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x436290]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x436290]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x436290]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x436290]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x436290]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x436290]
inc ecx
sub edx, 8
sub esi, 1
jne 0x40b3d0
pop edi
test edx, edx
je 0x40b4bb
jmp 0x40b4a0
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x436290]
inc ecx
sub edx, 1
jne 0x40b4a0
not eax
pop esi
ret

Function at 0x40b4c0
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [edx]
movsx ecx, cl
xor ecx, eax
shr eax, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x436290]
xor ecx, eax
movzx eax, cl
add eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edx + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x436290]
mov dword [edx + 8], ecx
ret
Function at 0x40b650
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
mov esi, eax
push edi
lea eax, [ebp - 0x4c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x40b676
mov eax, 0x200
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x4c]
mov edx, eax
xor edi, edi
and edx, 1
je 0x40b68c
mov dword [ebp - 8], 1
mov edi, dword [ebp - 8]
test al, 2
je 0x40b693
or edi, 2
test al, 4
je 0x40b69a
or edi, 4
mov ecx, eax
and ecx, 0x10
je 0x40b6a4
or edi, 0x10
test al, 0x20
je 0x40b6ab
or edi, 0x20
test ecx, ecx
je 0x40b6b7
or edi, 0x40000000
jmp 0x40b6bd
or edi, 0x80000000
or edi, 0x1000000
mov dword [ebp - 8], edi
test edx, edx
jne 0x40b6d3
or edi, 0x800000
mov dword [ebp - 8], edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x10], eax
cmp eax, 0x28
jbe 0x40b77a
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [ebp - 0xc]
push ecx
push 2
lea edx, [ebp - 4]
push edx
push esi
call ebx
push 0
push 0
push 0x24
push esi
call edi
push 0
lea eax, [ebp - 0xc]
push eax
push 4
lea ecx, [ebp - 0x14]
push ecx
push esi
call ebx
mov edx, 0x54ad
cmp word [ebp - 4], dx
jne 0x40b777
mov eax, dword [ebp - 0x14]
lea ecx, [eax + 0x34]
cmp dword [ebp - 0x10], ecx
jbe 0x40b777
push 0
push 0
push eax
push esi
call edi
push 0
lea edx, [ebp - 0xc]
push edx
push 4
lea eax, [ebp - 0x18]
push eax
push esi
call ebx
mov eax, dword [ebp - 0x18]
cmp eax, 0x5a4d
je 0x40b770
cmp eax, 0x454e
je 0x40b770
cmp eax, 0x454c
je 0x40b770
cmp eax, 0x4550
jne 0x40b777
or dword [ebp - 8], 0x400000
mov edi, dword [ebp - 8]
mov eax, dword [ebp + 8]
test eax, eax
je 0x40b783
mov dword [eax], edi
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40b78f
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x38]
test esi, esi
je 0x40b809
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x3c]
push 0
sub edx, 0xd53e8000
push 0x989680
sbb eax, 0x19db1de
push eax
push edx
call fcn.00429600
mov dword [esi + 4], edx
push 0
mov ecx, ebx
sub ecx, 0xd53e8000
mov edx, edi
push 0x989680
sbb edx, 0x19db1de
push edx
push ecx
mov dword [esi], eax
call fcn.00429600
mov ecx, dword [ebp - 0x44]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x48]
push 0
sub eax, 0xd53e8000
push 0x989680
sbb ecx, 0x19db1de
push ecx
push eax
mov dword [esi + 0xc], edx
call fcn.00429600
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x40b831
push edi
push ebx
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 4]
push eax
call fcn.0040b5f0
movzx ecx, word [ebp - 4]
movzx edx, word [ebp - 8]
shl ecx, 0x10
add esp, 0x10
or ecx, edx
mov dword [esi], ecx
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40b8e0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp byte [esi + 0x2d], 0
push edi
mov edi, dword [ebp + 0xc]
mov eax, ebx
je 0x40b9cb
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x40b917
cmp dword [esi + 0x40], edi
jae 0x40b917
push eax
call fcn.0042034b
add esp, 4
mov dword [esi + 0x3c], 0
cmp dword [esi + 0x3c], 0
jne 0x40b92f
lea eax, [edi + edi]
push eax
call fcn.0041f855
add esp, 4
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
mov ecx, dword [esi + 0x3c]
push edi
push ebx
push ecx
call fcn.00422100
add esp, 0xc
xor ebx, ebx
test edi, edi
jbe 0x40b9c8
mov edx, dword [esi + 0x3c]
mov cl, byte [ebx + edx]
mov edi, dword [esi + 0x30]
mov byte [ebp + 8], cl
movsx ecx, cl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x436290]
mov dword [ebp - 4], ecx
mov eax, dword [esi + 0x38]
shr edi, 8
xor dword [ebp - 4], edi
mov ecx, dword [ebp - 4]
mov dword [esi + 0x30], ecx
movzx ecx, cl
add ecx, dword [esi + 0x34]
mov edx, eax
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 0x34], ecx
shr ecx, 0x18
xor ecx, eax
shr eax, 8
and ecx, 0xff
xor eax, dword [ecx*4 + 0x436290]
and edx, 0xfffd
mov dword [esi + 0x38], eax
mov ecx, dword [esi + 0x3c]
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, byte [ebp + 8]
inc ebx
mov byte [ebx + ecx - 1], al
cmp ebx, dword [ebp + 0xc]
jb 0x40b947
mov edi, dword [ebp + 0xc]
mov eax, dword [esi + 0x3c]
mov edx, dword [esi + 0x20]
test edx, edx
je 0x40ba0a
mov ecx, dword [esi + 0x24]
lea ebx, [ecx + edi]
cmp ebx, dword [esi + 0x28]
jb 0x40b9ef
pop edi
mov dword [esi + 0x14], 0x30000
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
push eax
add ecx, edx
push ecx
call fcn.00422100
add esp, 0xc
add dword [esi + 0x24], edi
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x40ba2c
push 0
lea edx, [ebp + 0xc]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
pop edi
mov dword [esi + 0x14], 0x1000000
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x40bcd0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [esi + 0x84]
push edi
test ecx, ecx
je 0x40bd23
mov eax, dword [esi + 0x8c]
mov edi, dword [esi + 0x88]
cmp eax, edi
jae 0x40bd60
sub edi, eax
cmp edi, edx
jbe 0x40bcf7
mov edi, edx
push edi
add eax, ecx
push eax
push ebx
call fcn.00422100
mov eax, dword [esi + 0x78]
add dword [esi + 0x8c], edi
add dword [esi + 0x74], edi
add esp, 0xc
mov edx, edi
mov ecx, ebx
call fcn.0040b3b0
mov dword [esi + 0x78], eax
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x7c]
test eax, eax
je 0x40bd59
push 0
lea ecx, [ebp - 4]
push ecx
push edx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40bd60
mov edi, dword [ebp - 4]
mov eax, dword [esi + 0x78]
add dword [esi + 0x74], edi
mov edx, edi
mov ecx, ebx
call fcn.0040b3b0
mov dword [esi + 0x78], eax
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x40d540
Capabilities:
Hash data with md5

Disassembly:
push 0xffffffffffffffff
push 0x42e264
mov eax, dword fs:[0]
push eax
sub esp, 0xb0
mov eax, dword [0x43b050]
xor eax, esp
mov dword [esp + 0xac], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43b050]
xor eax, esp
push eax
lea eax, [esp + 0xc4]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xd4]
lea edi, [esp + 0x1c]
call fcn.00416c10
xor ebx, ebx
mov dword [esp + 0xcc], ebx
cmp dword [esp + 0x30], ebx
je 0x40d6e5
push 7
push str.SYN.ACK
mov eax, edi
call fcn.0040ddb0
push 0x40
lea eax, [esp + 0x6c]
push ebx
push eax
mov dword [esp + 0x60], vtable.CMD5Checksum.0
call fcn.00421960
add esp, 0xc
mov dword [esp + 0xac], ebx
mov dword [esp + 0xa8], ebx
mov dword [esp + 0xb0], 0x67452301
mov dword [esp + 0xb4], 0xefcdab89
mov dword [esp + 0xb8], 0x98badcfe
mov dword [esp + 0xbc], 0x10325476
mov byte [esp + 0xcc], 1
cmp dword [esp + 0x34], 0x10
mov eax, dword [esp + 0x20]
jae 0x40d615
lea eax, [esp + 0x20]
mov ecx, dword [esp + 0x30]
push ecx
lea esi, [esp + 0x1c]
lea edi, [esp + 0x58]
call fcn.00417060
mov byte [esp + 0xcc], 2
mov eax, dword [eax]
lea edx, [esp + 0x14]
push edx
mov ecx, eax
call fcn.0040db60
mov byte [esp + 0xcc], 3
mov ecx, dword [eax]
mov eax, ecx
mov dword [esp + 0x50], 0xf
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
lea esi, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x40d660
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0x40]
call fcn.004015d0
mov byte [esp + 0xcc], 5
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d69c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xcc], 6
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d6c4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x38]
push ecx
lea ebx, [ebp + 4]
call fcn.0040da10
cmp dword [esp + 0x50], 0x10
jb 0x40d6e5
mov edx, dword [esp + 0x3c]
push edx
call fcn.0041f860
add esp, 4
cmp dword [esp + 0x34], 0x10
jb 0x40d6f9
mov eax, dword [esp + 0x20]
push eax
call fcn.0041f860
add esp, 4
mov ecx, dword [esp + 0xc4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xac]
xor ecx, esp
call fcn.0041f86b
add esp, 0xbc
ret 4