joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4d5380
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50569b
mov eax, dword fs:[0]
push eax
mov eax, 0x2034
call fcn.004dae70
mov eax, dword [0x53f030]
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
push 0
push 0
push dword [esi + 0xc]
call dword [sym.imp.WS2_32.dll_accept]
cmp eax, 0xffffffff
jne 0x4d53de
mov eax, dword [esi + 4]
push 4
call eax
add esp, 4
mov dword [esi + 0x18], 1
xor eax, eax
jmp 0x4d55b5
push dword [esi + 0xc]
mov dword [esi + 8], eax
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x1fff
lea eax, [ebp - 0x200f]
mov dword [esi + 0xc], 0xffffffff
push 0
push eax
mov byte [ebp - 0x2010], 0
call fcn.004d9060
mov ebx, dword [sym.imp.WS2_32.dll_recv]
add esp, 0xc
jmp 0x4d5420
push 0
push 0x2000
lea eax, [ebp - 0x2010]
push eax
push dword [esi + 8]
call ebx
mov edi, eax
test edi, edi
jle 0x4d5571
mov dword [ebp - 0x2040], 0
mov dword [ebp - 0x203c], 0
mov dword [ebp - 0x2038], 0x11
mov dword [ebp - 0x2020], 0
mov dword [ebp - 0x201c], 0xa
mov dword [ebp - 0x2018], 0
mov dword [ebp - 0x2014], 0
mov dword [ebp - 0x2034], 0x3f400000
mov dword [ebp - 0x2030], 0x3e800000
mov dword [ebp - 0x202c], 0x40100000
mov dword [ebp - 0x2028], 0x26
mov dword [ebp - 0x2024], 0
cmp dword [esi + 0x1c], 0
mov dword [ebp - 4], 0
jne 0x4d552a
lea eax, [ebp - 0x2040]
push eax
push dword [esi + 8]
lea eax, [ebp - 0x2010]
push 0x2000
push eax
call fcn.004d58a0
add esp, 0x10
test eax, eax
je 0x4d5524
lea eax, [ebp - 0x2040]
mov dword [esi + 0x18], 2
push eax
push dword [esi + 8]
lea eax, [ebp - 0x2010]
push 0x2000
push eax
call fcn.004d5eb0
add esp, 0x10
test eax, eax
jne 0x4d5552
mov eax, dword [esi + 4]
push 1
mov dword [esi + 0x18], 3
call eax
mov dword [esi + 0x1c], 1
jmp 0x4d554f
cmp dword [esi + 0x1c], 0
je 0x4d5587
cmp edi, 0x80
jg 0x4d5587
push edi
lea eax, [ebp - 0x2010]
mov ecx, esi
push eax
call fcn.004d61a0
mov eax, dword [esi + 4]
push 3
mov dword [esi + 0x18], 4
call eax
add esp, 4
lea ecx, [ebp - 0x2040]
call fcn.0044a370
lea ecx, [ebp - 0x2040]
mov dword [ebp - 4], 0xffffffff
call fcn.00440880
jmp 0x4d557d
mov eax, dword [esi + 4]
push 2
je 0x4d55ae
call eax
add esp, 4
test edi, edi
jg 0x4d5420
jmp 0x4d55b3
mov eax, dword [esi + 4]
push 2
mov dword [esi + 0x18], 6
call eax
add esp, 4
mov ecx, esi
call fcn.004d6310
lea ecx, [ebp - 0x2040]
call fcn.00440880
xor eax, eax
jmp 0x4d55b5
call eax
add esp, 4
mov eax, edi
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.004d89fb
mov esp, ebp
pop ebp
ret
Function at 0x4d5db0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x505798
mov eax, dword fs:[0]
push eax
sub esp, 0xc
mov eax, dword [0x53f030]
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 dword [ebp - 0x18], ecx
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.004d6400
add esp, 0xc
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], 0
mov ebx, dword [eax - 0xc]
lea edi, [ebx + 2]
mov eax, edi
call fcn.004dabb0
mov esi, esp
push edi
push 0
push esi
call fcn.004d9060
add esp, 0xc
mov byte [esi], 0x81
xor ecx, ecx
mov byte [esi + 1], bl
test ebx, ebx
jle 0x4d5e3c
test ecx, ecx
js 0x4d5e5b
mov eax, dword [ebp - 0x14]
cmp ecx, dword [eax - 0xc]
jg 0x4d5e5b
mov al, byte [ecx + eax]
mov byte [ecx + esi + 2], al
inc ecx
cmp ecx, ebx
jl 0x4d5e24
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 8]
cmp eax, 0xffffffff
je 0x4d5e65
push 0
push edi
push esi
push eax
call dword [sym.imp.WS2_32.dll_send]
xor ebx, ebx
cmp eax, edi
sete bl
jmp 0x4d5e67
push 0x80070057
call fcn.0043a9b0
xor ebx, ebx
mov esi, dword [ebp - 0x14]
or ecx, 0xffffffff
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4d5e8b
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
lea esp, [ebp - 0x28]
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.004d89fb
mov esp, ebp
pop ebp
ret 4
Function at 0x4d5eb0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5057d6
mov eax, dword fs:[0]
push eax
sub esp, 0x20c
mov eax, dword [0x53f030]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebp + 8], 0
mov esi, dword [ebp + 0x14]
je 0x4d6094
cmp dword [ebp + 0xc], 0
jle 0x4d6094
cmp dword [esi + 4], 0
jbe 0x4d6094
call fcn.0043ae40
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4d5f19
push 0x80004005
call fcn.0043a9b0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x208], eax
mov dword [ebp - 4], 0
call fcn.0043ae40
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4d5f4c
push 0x80004005
call fcn.0043a9b0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x20c], eax
lea eax, [ebp - 0x210]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x218]
mov ecx, esi
push eax
lea eax, [ebp - 0x214]
push eax
push str.Sec_WebSocket_Version
call fcn.004d52b0
test eax, eax
je 0x4d604a
add eax, 4
lea ecx, [ebp - 0x208]
push eax
call fcn.0048fff0
lea eax, [ebp - 0x20c]
mov ecx, esi
push eax
push str.Sec_WebSocket_Key
call fcn.004d5a20
test al, al
je 0x4d604a
mov eax, dword [ebp - 0x20c]
cmp dword [eax - 0xc], 0
je 0x4d604a
lea eax, [ebp - 0x208]
push 0x5181d8
push eax
call fcn.00490060
add esp, 8
test al, al
je 0x4d604a
mov eax, dword [ebp - 0x208]
cmp dword [eax - 0xc], 0
je 0x4d604a
mov esi, dword [ebp + 0x10]
cmp esi, 0xffffffff
je 0x4d604a
push 0x1f3
lea eax, [ebp - 0x203]
mov byte [ebp - 0x204], 0
push 0
push eax
call fcn.004d9060
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.004d4ff0
add esp, 0x14
test eax, eax
je 0x4d604a
lea ecx, [ebp - 0x204]
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4d6030
push 0
sub ecx, edx
lea eax, [ebp - 0x204]
push ecx
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
mov edx, dword [ebp - 0x20c]
or esi, 0xffffffff
add edx, 0xfffffff0
mov byte [ebp - 4], 0
mov eax, esi
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4d6070
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x208]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x4d6094
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004d89fb
mov esp, ebp
pop ebp
ret
Function at 0x4d7090
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_SetWinEventHook]
push edi
push 2
push 0
push 0
push 0x4d78d0
push 0
push 0x8001
push 0x8001
mov edi, ecx
call esi
push 2
push 0
push 0
push 0x4d78d0
push 0
push 0x8003
mov ebx, eax
push 0x8003
mov dword [ebp - 4], ebx
call esi
mov dword [ebp - 8], eax
test ebx, ebx
je 0x4d71d7
test eax, eax
je 0x4d71d7
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x53ee28]
mov esi, eax
test ecx, ecx
je 0x4d7124
xor edx, edx
div dword [0x53ee30]
mov ecx, dword [ecx + edx*4]
test ecx, ecx
je 0x4d7124
lea esp, [esp]
cmp dword [ecx + 0xc], esi
jne 0x4d711d
cmp dword [ecx], esi
je 0x4d719d
mov ecx, dword [ecx + 8]
test ecx, ecx
jne 0x4d7110
push esi
mov ecx, 0x53ee28
call fcn.0046d6d0
mov dword [eax], edi
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
lea eax, [ebp - 0x24]
push 0
push 0
push 0
push eax
call esi
test eax, eax
je 0x4d71c9
mov ebx, dword [sym.imp.USER32.dll_TranslateMessage]
cmp eax, 0xffffffff
jne 0x4d71a6
cmp dword [edi + 0x7c], 0
je 0x4d71b6
push 0
push 0
push 0x12
push dword [edi + 0x80]
call dword [sym.imp.USER32.dll_PostThreadMessageW]
push 0x2710
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4d718b
push 0
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [edi + 0x7c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x7c], 0
jmp 0x4d71b6
test ecx, ecx
je 0x4d7124
mov dword [ecx + 4], edi
jmp 0x4d7131
lea eax, [ebp - 0x24]
push eax
call ebx
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 0
push 0
push 0
lea eax, [ebp - 0x24]
push eax
call esi
test eax, eax
jne 0x4d7151
mov ebx, dword [ebp - 4]
push dword [ebp - 8]
mov esi, dword [sym.imp.USER32.dll_UnhookWinEvent]
call esi
push ebx
call esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4d7820
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x4d7836
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edi, eax
jmp 0x4d783b
mov edi, 1
mov eax, dword [esi + 0x84]
test eax, eax
je 0x4d7879
push 0x2710
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4d7863
push 0
push dword [esi + 0x84]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0x84]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x84], 0
cmp dword [esi + 0x7c], 0
je 0x4d78be
push 0
push 0
push 0x12
push dword [esi + 0x80]
call dword [sym.imp.USER32.dll_PostThreadMessageW]
push 0x2710
push dword [esi + 0x7c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4d78ae
push 0
push dword [esi + 0x7c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0x7c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x7c], 0
mov eax, edi
pop edi
pop esi
ret
Function at 0x4f2e11
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x53f030]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.004e1a93
mov dword [ebp - 0x14], eax
cmp dword [0x545664], esi
jne 0x4f2f04
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x4f2e91
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x4f2fe4
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x4f2fe4
push 0x51da0c
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4f2fe4
push eax
call ebx
push 0x51da18
push edi
mov dword [0x545664], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x545668], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x54566c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x545674], eax
test eax, eax
je 0x4f2f01
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x545670], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x4f2f29
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4f2f1c
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x4f2f3e
push 4
pop eax
jmp 0x4f2fe6
cmp dword [ebp - 0x14], esi
je 0x4f2f3e
push dword [0x545664]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x4f2f23
mov eax, dword [0x545670]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x4f2f9c
cmp dword [0x545674], edi
je 0x4f2f9c
push eax
call ebx
push dword [0x545674]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x4f2f9c
test eax, eax
je 0x4f2f9c
call ecx
test eax, eax
je 0x4f2f91
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x4f2f91
test byte [ebp - 8], 1
jne 0x4f2f9c
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x4f2fcc
mov eax, dword [0x545668]
cmp eax, edi
je 0x4f2fc9
push eax
call ebx
test eax, eax
je 0x4f2fc9
call eax
mov esi, eax
test esi, esi
je 0x4f2fc9
mov eax, dword [0x54566c]
cmp eax, edi
je 0x4f2fc9
push eax
call ebx
test eax, eax
je 0x4f2fc9
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x545664]
call ebx
test eax, eax
je 0x4f2fe4
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x4f2fe6
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d89fb
mov esp, ebp
pop ebp
ret
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x5ea008], 0x8088405
inc edx
mov dword [ebx + 0x5ea008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x41cd64
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ebp
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
cld
mov dl, 0x80
mov al, byte [esi]
add esi, 1
mov byte [edi], al
add edi, 1
mov ebx, 2
add dl, dl
jne 0x41cd95
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cd7d
add dl, dl
jne 0x41cda0
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cdf1
xor eax, eax
add dl, dl
jne 0x41cdad
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41ce8e
add dl, dl
jne 0x41cdbc
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cdc7
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cdd2
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cddd
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41cde7
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41cd8c
mov eax, 1
add dl, dl
jne 0x41cdff
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41ce0a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cdf6
sub eax, ebx
mov ebx, 1
jne 0x41ce3d
mov ecx, 1
add dl, dl
jne 0x41ce23
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41ce2e
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41ce1a
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cd8c
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41ce54
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41ce5f
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41ce4b
cmp eax, 0x7d00
sbb ecx, 0xffffffff
cmp eax, 0x500
sbb ecx, 0xffffffff
cmp eax, 0x80
adc ecx, 0
cmp eax, 0x80
adc ecx, 0
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cd8c
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41ceaf
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x41cd8c
pop ebp
sub edi, dword [ebp - 8]
mov dword [ebp - 0xc], edi
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x41e5a4
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x5d1a63
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
mov ecx, ebx
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [ecx + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x78]
test edx, edx
je 0x41e655
add edx, ebx
mov eax, edx
mov esi, dword [eax + 0x18]
mov edx, dword [eax + 0x1c]
add edx, ebx
mov dword [ebp - 0x10], edx
mov edi, dword [eax + 0x20]
add edi, ebx
mov edx, dword [eax + 0x24]
add edx, ebx
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 4]
cmp edx, 0xffff
jbe 0x41e63e
test esi, esi
jbe 0x41e655
mov eax, dword [edi]
add eax, ebx
mov edx, dword [ebp - 4]
call fcn.004088e4
test eax, eax
jne 0x41e630
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
jmp 0x41e655
add dword [ebp - 0xc], 2
add edi, 4
dec esi
test esi, esi
ja 0x41e60d
jmp 0x41e655
mov ecx, edx
sub ecx, dword [eax + 0x10]
cmp ecx, dword [eax + 0x14]
jae 0x41e655
mov eax, ecx
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5d1a6a
ret
Function at 0x41eec4
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ecx
mov word [ebp - 2], dx
xor eax, eax
push ebp
push 0x5d2473
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.00404cd0
xor ebx, ebx
mov eax, ebx
and eax, 0x80000001
jns 0x41eeff
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x41ef18
lea eax, [ebp - 0x10]
mov edx, dword [0x5ec2a4]
mov edx, dword [edx]
mov edx, dword [edx + 0xc]
call fcn.00404d30
jmp 0x41ef2b
lea eax, [ebp - 0x10]
mov edx, dword [0x5ec2a4]
mov edx, dword [edx]
mov edx, dword [edx + 0x10]
call fcn.00404d30
lea eax, [ebp - 0x10]
mov edx, ebx
sar edx, 1
jns 0x41ef37
adc edx, 0
mov edx, dword [edx*4 + 0x5eb10c]
call fcn.00404f20
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 0x10]
call fcn.00404f04
push eax
call fcn.00406b1c
mov esi, eax
cmp esi, 0xffffffff
je 0x41f045
mov eax, 0x40
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x40
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x41f038
mov eax, edi
cmp word [eax], 0x5a4d
jne 0x41f038
push 0
push 0
mov eax, dword [eax + 0x3c]
push eax
push esi
call fcn.00406ddc
mov eax, edi
call fcn.00403288
mov eax, 0x18
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x18
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x41f038
mov eax, edi
cmp dword [eax], 0x4550
jne 0x41f038
add eax, 4
mov dx, word [eax]
cmp dx, 0x14c
jb 0x41f038
cmp dx, 0x150
ja 0x41f038
mov eax, edi
call fcn.00403288
mov eax, 0xe0
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0xe0
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x41f038
mov eax, edi
mov dx, word [eax + 0x44]
cmp dx, word [ebp - 2]
jne 0x41f038
mov eax, dword [eax + 0x10]
mov edx, dword [ebp - 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
call fcn.00404d0c
mov eax, edi
call fcn.00403288
push esi
call fcn.00406ad4
mov eax, dword [ebp + 8]
mov eax, dword [eax]
xor edx, edx
call fcn.0040502c
jne 0x41f05d
inc ebx
cmp ebx, 0x19
jne 0x41eef1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5d247a
lea eax, [ebp - 0x10]
call fcn.00404cd0
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 0x4057c8
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00407ba4
test esi, esi
jne 0x4057fe
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00407d2c
jmp 0x40581c
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.0040570c
mov edi, eax
test esi, esi
je 0x40581c
cmp dword [ebx], 0
je 0x40581c
dec esi
jmp 0x405805
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

Function at 0x405850
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x5a6008], 0x8088405
inc edx
mov dword [ebx + 0x5a6008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x40683c
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff0
mov edi, edx
mov esi, eax
mov ebp, dword [esi + 0x10]
mov eax, esi
call fcn.00406cc8
mov byte [esp], al
cmp byte [esp], 0
jne 0x4069c5
test edi, edi
je 0x4069c5
mov byte [esp + 1], 0
test ebp, ebp
jle 0x406905
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
xor eax, eax
mov dword [esp + 0xc], eax
test ebp, ebp
jle 0x4068e0
cmp edi, 0xffffffff
je 0x4068a1
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x4068a1
mov byte [esp], 0
jmp 0x4069c5
cmp dword [esi], 1
jg 0x4068e0
cmp dword [esi], 0
jne 0x4068d2
xor eax, eax
mov edx, 1
lock cmpxchg dword [esi], edx
test eax, eax
jne 0x4068d2
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x4069c5
lea eax, [esp + 0xc]
call fcn.00406514
dec ebp
test ebp, ebp
jg 0x406886
cmp edi, 0xffffffff
je 0x406905
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x406903
mov byte [esp], 0
jmp 0x4069c5
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x40684a
lea edx, [ebx + 2]
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x406905
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call fcn.00406a34
mov edx, eax
mov ebx, dword [0x5ae8fc]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x406969
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x406967
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x406969
xor edi, edi
cmp byte [esp], 0
je 0x40698f
mov ebx, dword [esi]
test bl, 1
jne 0x4069a5
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x40696f
mov byte [esp + 1], 1
jmp 0x4069a5
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, ebx
lock cmpxchg dword [esi], edx
cmp ebx, eax
jne 0x40698f
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x40691c
cmp byte [esp], 0
je 0x4069c5
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
movzx eax, byte [esp]
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
ret