joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403290
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55dd53
mov eax, dword fs:[0]
push eax
sub esp, 0x618
mov eax, dword [0x5d1858]
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 - 4], 0
call fcn.0042125e
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4032e1
push 0x80004005
call fcn.004021e0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x624], eax
mov eax, dword [ebp + 8]
lea esi, [ebp - 0x220]
mov byte [ebp - 4], 1
mov edx, eax
sub esi, eax
movzx ecx, word [edx]
mov word [esi + edx], cx
lea edx, [edx + 2]
test cx, cx
jne 0x403302
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x40332e
push str.test
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x220]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403337
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x624]
call fcn.00403740
mov esi, dword [ebp - 0x624]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4033db
push 0
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x18]
push eax
push esi
call fcn.005442f0
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x220]
push str._s_s_s.tmp
push eax
call fcn.00543cd5
lea ecx, [ebp - 0x220]
add esp, 0x28
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4033b3
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x624]
call fcn.00403740
mov esi, dword [ebp - 0x624]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x403400
mov ebx, 1
jmp 0x403410
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor ebx, ebx
lea edx, [esi - 0x10]
or esi, 0xffffffff
mov byte [ebp - 4], 0
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x403430
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp + 8]
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x403451
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
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.00543154
mov esp, ebp
pop ebp
ret
Function at 0x403810
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x403825
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x403864
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x403860
lea ebx, [ebx]
cmp esi, edx
jae 0x403864
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
dec ecx
jne 0x403850
cmp esi, edx
jb 0x403869
xor eax, eax
pop esi
pop ebp
ret
xor eax, eax
cmp word [esi], ax
cmove esi, eax
mov eax, esi
pop esi
pop ebp
ret

Function at 0x404a10
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
movzx eax, word [ebp + 8]
mov dword [ebp + 8], eax
pop ebp
jmp fcn.0042c438
Function at 0x405c00
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55e188
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x5d1858]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edi, eax
neg edi
sbb edi, edi
inc edi
jne 0x405da0
push edi
push edi
push 3
push edi
push 1
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
je 0x405da0
lea ecx, [ebp - 0x18]
push ecx
push eax
mov dword [ebp - 0x18], edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, 0x400
cmp eax, ebx
cmovb ebx, eax
call fcn.0042125e
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x405c92
push 0x80004005
call fcn.004021e0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
lea edx, [ebx + 1]
mov dword [ebp - 4], 0
test edx, edx
jns 0x405cb5
push 0x80070057
call fcn.004021e0
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x405cd2
push edx
lea ecx, [ebp - 0x10]
call fcn.004067d0
mov esi, dword [ebp - 0x10]
push 0
lea eax, [ebp - 0x1c]
push eax
push ebx
push esi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405d76
cmp dword [ebp - 0x1c], ebx
jne 0x405d76
mov byte [esi + ebx], 0
push dword [esi - 8]
push esi
call fcn.00544710
add esp, 8
test eax, eax
js 0x405cab
cmp eax, dword [esi - 8]
jg 0x405cab
mov dword [esi - 0xc], eax
mov byte [eax + esi], 0
cmp dword [esi - 0xc], 0
jl 0x405d76
push str._HTML_
push esi
call fcn.00544a73
add esp, 8
test eax, eax
je 0x405d33
sub eax, esi
cmp eax, 0xffffffff
jne 0x405d71
cmp dword [esi - 0xc], 0
jl 0x405d76
push str._html_
push esi
call fcn.00544a73
add esp, 8
test eax, eax
je 0x405d52
sub eax, esi
cmp eax, 0xffffffff
jne 0x405d71
cmp dword [esi - 0xc], 0
jl 0x405d76
push str._Html_
push esi
call fcn.00544a73
add esp, 8
test eax, eax
je 0x405d76
sub eax, esi
cmp eax, 0xffffffff
je 0x405d76
mov edi, 1
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405d97
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x406450
Capabilities:
Create thread
Resume thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55e240
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x5d1858]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 0x7d3
call fcn.0042b94b
push 0x7d4
mov ecx, edi
mov dword [edi + 0xf8], eax
call fcn.0042b94b
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
mov dword [edi + 0xe8], eax
test eax, eax
je 0x4064c8
push 0x3e8
push 0
push 0x406
push dword [eax + 0x20]
call esi
mov eax, dword [edi + 0xe8]
push 0
push 0
push 0x402
push dword [eax + 0x20]
call esi
push 0x7d5
mov ecx, edi
call fcn.0042b94b
push 0x7d2
mov ecx, edi
mov dword [edi + 0xf4], eax
call fcn.0042b94b
mov dword [edi + 0xec], eax
test eax, eax
je 0x4064f9
push 0
mov ecx, eax
call fcn.0042b821
push 0x7dd
mov ecx, edi
call fcn.0042b94b
mov dword [edi + 0xf0], eax
test eax, eax
je 0x406525
push 0
mov ecx, eax
call fcn.0042c1f6
mov ecx, dword [edi + 0xf0]
push 0
call fcn.0042b821
push 0x7d7
mov ecx, edi
call fcn.0042b94b
mov dword [edi + 0xfc], eax
test eax, eax
je 0x406544
push 0
mov ecx, eax
call fcn.0042c1f6
push 0x7d6
mov ecx, edi
call fcn.0042b94b
mov dword [edi + 0x100], eax
test eax, eax
je 0x406587
push 0x7f04
push 0
call dword [sym.imp.USER32.dll_LoadIconW]
mov ecx, dword [edi + 0x100]
push 0
push eax
push 0x170
push dword [ecx + 0x20]
call esi
mov ecx, dword [edi + 0x100]
push 0
call fcn.0042c1f6
mov eax, dword [edi + 0xe4]
cmp dword [eax + 0xa4], 0
je 0x406615
call fcn.0042125e
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4065b2
push 0x80004005
call fcn.004021e0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
push 0xb5
mov dword [ebp - 4], 0
call fcn.00420ed1
test eax, eax
je 0x4065e5
push 0xb5
push eax
lea ecx, [ebp - 0x10]
call fcn.004034a0
mov esi, dword [ebp - 0x10]
push esi
mov ecx, edi
mov dword [ebp - 4], 1
call fcn.0042c1b2
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406615
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [edi + 0xe4]
mov esi, dword [eax + 0xa8]
cmp dword [esi + 4], 0
jne 0x406649
push 0
push 4
push esi
push 0x4079e0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 4], eax
test eax, eax
je 0x406649
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x408430
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55e438
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x5d1858]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
sub eax, 0x10
push eax
call fcn.00402240
add eax, 0x10
mov dword [edi], eax
mov eax, dword [esi + 4]
sub eax, 0x10
push eax
mov dword [ebp - 4], 0
call fcn.00402240
add esp, 8
add eax, 0x10
mov dword [edi + 4], eax
mov eax, dword [esi + 8]
mov dword [edi + 8], eax
mov eax, dword [esi + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [esi + 0x10]
mov dword [edi + 0x10], eax
mov eax, dword [esi + 0x14]
mov dword [edi + 0x14], eax
mov eax, dword [esi + 0x18]
mov dword [edi + 0x18], eax
mov eax, dword [esi + 0x1c]
mov dword [edi + 0x1c], eax
mov eax, dword [esi + 0x20]
mov dword [edi + 0x20], eax
mov eax, dword [esi + 0x24]
mov dword [edi + 0x24], eax
mov eax, dword [esi + 0x28]
mov dword [edi + 0x28], eax
mov eax, dword [esi + 0x2c]
mov dword [edi + 0x2c], eax
mov eax, dword [esi + 0x30]
mov dword [edi + 0x30], eax
mov eax, dword [esi + 0x34]
mov dword [edi + 0x34], eax
mov eax, dword [esi + 0x38]
mov dword [edi + 0x38], eax
mov eax, dword [esi + 0x3c]
mov dword [edi + 0x3c], eax
mov eax, dword [esi + 0x40]
mov dword [edi + 0x40], eax
mov eax, dword [esi + 0x44]
mov dword [edi + 0x44], eax
mov eax, dword [esi + 0x48]
mov dword [edi + 0x48], eax
mov eax, dword [esi + 0x4c]
mov dword [edi + 0x4c], eax
mov eax, dword [esi + 0x50]
mov dword [edi + 0x50], eax
mov eax, dword [esi + 0x54]
mov dword [edi + 0x54], eax
mov eax, dword [esi + 0x58]
mov dword [edi + 0x58], eax
mov eax, dword [esi + 0x5c]
mov dword [edi + 0x5c], eax
mov eax, dword [esi + 0x60]
mov dword [edi + 0x60], eax
mov eax, dword [esi + 0x64]
mov dword [edi + 0x64], eax
mov eax, dword [esi + 0x68]
mov dword [edi + 0x68], eax
mov eax, dword [esi + 0x6c]
mov dword [edi + 0x6c], eax
mov eax, dword [esi + 0x70]
mov dword [edi + 0x70], eax
mov eax, dword [esi + 0x74]
mov dword [edi + 0x74], eax
mov eax, dword [esi + 0x78]
mov dword [edi + 0x78], eax
mov eax, dword [esi + 0x7c]
mov dword [edi + 0x7c], eax
mov eax, dword [esi + 0x80]
mov dword [edi + 0x80], eax
mov eax, dword [esi + 0x84]
mov dword [edi + 0x84], eax
mov eax, dword [esi + 0x88]
mov dword [edi + 0x88], eax
mov eax, dword [esi + 0x8c]
mov dword [edi + 0x8c], eax
mov eax, dword [esi + 0x90]
mov dword [edi + 0x90], eax
mov eax, dword [esi + 0x94]
mov dword [edi + 0x94], eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x40e450
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x5d1858]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
mov dword [ebp - 0x240], 0
call fcn.00543da0
add esp, 0xc
call fcn.00415680
mov ecx, eax
lea edx, [ebp - 0x20c]
sub edx, ecx
mov edi, edi
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x40e4a0
push ebx
push 0x573c74
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40e4ec
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x23c]
call fcn.0040d8f0
mov ebx, 1
jmp 0x40e514
xor eax, eax
mov word [ebp - 0x224], ax
mov dword [ebp - 0x210], 7
mov dword [ebp - 0x214], 0
lea eax, [ebp - 0x224]
mov ebx, 2
push eax
mov ecx, esi
call fcn.0040d880
or ebx, 4
test bl, 2
je 0x40e55b
and ebx, 0xfffffffd
cmp dword [ebp - 0x210], 8
jb 0x40e53e
push dword [ebp - 0x224]
call fcn.00420400
add esp, 4
xor eax, eax
mov dword [ebp - 0x210], 7
mov dword [ebp - 0x214], 0
mov word [ebp - 0x224], ax
test bl, 1
pop ebx
je 0x40e578
cmp dword [ebp - 0x228], 8
jb 0x40e578
push dword [ebp - 0x23c]
call fcn.00420400
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00543154
mov esp, ebp
pop ebp
ret

Function at 0x40eaa0
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, ecx
push str._EffectExtractor__CBaseFileExtractor::CopyExtractedFile_BEGIN
push 0x184
mov dword [ebp - 4], ebx
call fcn.00401d90
add esp, 8
lea edi, [ebx + 0xc]
push edi
lea ecx, [ebx + 4]
call fcn.00401fa0
lea esi, [ebx + 0x10]
push esi
lea ecx, [ebx + 8]
call fcn.00401fa0
push 0
push dword [esi]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
setne bl
xor eax, eax
mov ecx, 3
test bl, bl
cmove eax, ecx
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x20], eax
movzx ecx, bl
push ecx
push str._EffectExtractor__CBaseFileExtractor::CopyExtractedFile_bRet___d
push 0x189
call fcn.00401d90
push str._EffectExtractor__CBaseFileExtractor::CopyExtractedFile_END
push 0x18a
call fcn.00401d90
add esp, 0x14
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40f290
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55ede0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x5d1858]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push dword [ebp + 8]
mov dword [ebp - 4], 0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40f2d4
lea esi, [eax + 4]
jmp 0x40f3e8
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x20]
mov esi, 2
mov dword [ebp - 0x10], 0x80004005
call fcn.0041ef10
cmp dword [ebp - 0x10], 0
mov byte [ebp - 4], 1
jl 0x40f3dc
push dword [ebp + 8]
lea ecx, [ebp - 0x20]
call fcn.0041f660
push str.TEMPLATE_MGR
lea ecx, [ebp - 0x20]
call fcn.0041fb30
mov ebx, eax
test ebx, ebx
je 0x40f3dc
push str.TEMPLATE_LIST
push ebx
lea ecx, [ebp - 0x20]
call fcn.0041f890
mov edi, eax
test edi, edi
je 0x40f3d6
push str.TEMPLATE
push edi
lea ecx, [ebp - 0x20]
call fcn.0041f890
mov dword [ebp - 0x18], eax
test eax, eax
je 0x40f3d0
push eax
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x14], 1
call fcn.0041f2f0
lea eax, [ebp - 0x14]
push eax
push str.PIPTYPE
lea ecx, [ebp - 0x20]
call fcn.0041fbe0
lea ecx, [ebp - 0x20]
call fcn.0041f640
mov eax, dword [ebp - 0x14]
dec eax
cmp eax, 9
ja case.default.0x40f37f
jmp dword [eax*4 + 0x40f420]
xor esi, esi
jmp case.default.0x40f37f
mov esi, 1
jmp case.default.0x40f37f
mov esi, 2
jmp case.default.0x40f37f
mov esi, 3
jmp case.default.0x40f37f
mov esi, 0xd
jmp case.default.0x40f37f
mov esi, 0xe
jmp case.default.0x40f37f
mov esi, 0xf
jmp case.default.0x40f37f
mov esi, 0x10
jmp case.default.0x40f37f
mov esi, 0x11
jmp case.default.0x40f37f
mov esi, 0x12
mov ecx, dword [ebp - 0x18]
push ecx
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [edi]
push edi
call dword [eax + 8]
mov eax, dword [ebx]
push ebx
call dword [eax + 8]
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0
call fcn.0041f1d0
mov edi, dword [ebp + 8]
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40f40c
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4148e0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x5d1858]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x210], eax
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
mov dword [ebp - 0x214], 0
call fcn.00543da0
mov esi, 1
push esi
push ebx
push edi
lea eax, [ebp - 0x20c]
push 0x5743cc
push eax
call fcn.00414e90
add esp, 0x20
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x414980
inc esi
push esi
push ebx
push edi
lea eax, [ebp - 0x20c]
push 0x5743cc
push eax
call fcn.00414e90
add esp, 0x14
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x414957
mov ecx, dword [ebp - 0x210]
lea eax, [ebp - 0x20c]
push eax
call fcn.00401e90
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x210]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00543154
mov esp, ebp
pop ebp
ret

Function at 0x415670
Capabilities:
Delete directory
Delete file
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.00415460

Function at 0x415960
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x5d1858]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x415994
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x415994
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
movzx eax, word [ebx]
test ax, ax
je 0x415a7c
push edi
mov edi, ebx
mov ecx, ebx
cmp ax, 0x2f
je 0x4159b1
cmp ax, 0x5c
jne 0x4159b3
mov edi, ecx
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x4159a5
cmp edi, ebx
je 0x4159ff
sub edi, ebx
and edi, 0xfffffffe
push edi
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.005435b0
add esp, 0xc
cmp edi, 0x208
jae 0x415a8c
xor eax, eax
mov word [ebp + edi - 0x414], ax
lea eax, [ebp - 0x414]
push eax
push esi
call fcn.00415960
add esp, 8
xor eax, eax
mov word [ebp - 0x20c], ax
test esi, esi
je 0x415a23
lea ecx, [ebp - 0x20c]
sub ecx, esi
movzx eax, word [esi]
mov word [ecx + esi], ax
lea esi, [esi + 2]
test ax, ax
jne 0x415a14
mov esi, ebx
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x415a25
lea edi, [ebp - 0x20c]
sub ebx, esi
add edi, 0xfffffffe
jmp 0x415a40
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x415a40
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [ebp - 0x20c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
pop edi
cmp eax, 0xffffffff
jne 0x415a7c
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00543154
mov esp, ebp
pop ebp
ret
call fcn.00545679
int3
Function at 0x416140
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x41620d
cmp dword [esi + 4], 0xffffffff
jne 0x41620d
push edi
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x416171
sub ecx, edx
sar ecx, 1
movzx eax, word [esi + ecx*2 + 0x242]
cmp eax, 0x5c
je 0x4161a8
cmp eax, 0x2f
je 0x4161a8
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x416195
mov eax, dword [0x574218]
mov dword [edi], eax
mov edi, dword [ebp + 0x10]
cmp edi, 1
jne 0x4161ce
push edi
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4161ce
pop edi
mov eax, 0x2000000
pop esi
pop ebp
ret 0xc
lea eax, [ebp + 0x10]
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00418e60
add esp, 0x10
test eax, eax
jne 0x4161ee
mov eax, dword [ebp + 0x10]
pop edi
pop esi
pop ebp
ret 0xc
push eax
call fcn.00419400
add esp, 4
xor ecx, ecx
test eax, eax
mov edx, 0x200
mov dword [esi], eax
cmove ecx, edx
pop edi
mov eax, ecx
pop esi
pop ebp
ret 0xc
mov eax, 0x1000000
pop esi
pop ebp
ret 0xc
Function at 0x4168a0
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
movsx eax, byte [ebp + 0xc]
mov ecx, dword [edx]
xor eax, ecx
shr ecx, 8
and eax, 0xff
mov eax, dword [eax*4 + 0x576e40]
xor eax, ecx
movzx ecx, al
add ecx, dword [edx + 4]
mov dword [edx], eax
mov eax, dword [edx + 8]
imul ecx, ecx, 0x8088405
inc ecx
mov dword [edx + 4], ecx
shr ecx, 0x18
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x576e40]
mov dword [edx + 8], eax
pop ebp
ret
Function at 0x418f90
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 0x14]
mov esi, ebx
imul esi, dword [ebp + 0x10]
cmp byte [edi], 0
je 0x418fce
push 0
lea eax, [ebp + 0xc]
push eax
push esi
push dword [ebp + 8]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x418fc2
mov byte [edi + 8], 1
mov eax, dword [ebp + 0xc]
pop edi
xor edx, edx
pop esi
div ebx
pop ebx
pop ebp
ret
mov edx, dword [edi + 0x1c]
mov ecx, dword [edi + 0x18]
lea eax, [edx + esi]
cmp eax, ecx
jbe 0x418fdf
mov esi, ecx
sub esi, edx
mov ecx, dword [edi + 0x14]
push esi
add ecx, edx
push ecx
push dword [ebp + 8]
call fcn.005435b0
add dword [edi + 0x1c], esi
add esp, 0xc
mov eax, esi
pop edi
xor edx, edx
pop esi
div ebx
pop ebx
pop ebp
ret

Function at 0x419000
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x41900e
xor eax, eax
pop ebp
ret
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
not eax
cmp esi, 8
jb 0x4190ed
push edi
mov edi, esi
shr edi, 3
jmp 0x419030
movzx ecx, byte [edx]
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x576e40]
movzx ecx, byte [edx + 1]
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x576e40]
movzx ecx, byte [edx + 2]
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x576e40]
movzx ecx, byte [edx + 3]
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x576e40]
movzx ecx, byte [edx + 4]
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x576e40]
movzx ecx, byte [edx + 5]
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x576e40]
movzx ecx, byte [edx + 6]
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x576e40]
movzx ecx, byte [edx + 7]
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x576e40]
add edx, 8
sub esi, 8
dec edi
jne 0x419030
pop edi
test esi, esi
je 0x41910c
movzx ecx, byte [edx]
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x576e40]
lea edx, [edx + 1]
dec esi
jne 0x4190f1
not eax
pop esi
pop ebp
ret