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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
mov edi, ecx
mov ecx, 0x10104a7f
call fcn.1005cb05
cmp dword [edi + 0x38], 0
je 0x1004a418
push dword [ebp + 0x10]
mov ecx, edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [edi + 0x1c]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
test eax, eax
je 0x1004a43a
mov eax, dword [edi + 0x2c]
mov eax, dword [eax]
jmp 0x1004a43c
xor eax, eax
cdq
mov dword [esp + 0xc], eax
mov ecx, edx
mov dword [esp + 0x10], ecx
test ebx, ebx
jl 0x1004a4dc
jg 0x1004a459
test esi, esi
je 0x1004a4dc
test ecx, ecx
jl 0x1004a4a6
jg 0x1004a463
test eax, eax
je 0x1004a4a6
cmp ebx, ecx
jg 0x1004a477
jl 0x1004a46d
cmp esi, eax
jae 0x1004a477
mov eax, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
push eax
push dword [esp + 0x18]
push dword [ebp + 8]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [ebp + 8]
mov eax, dword [edi + 0x2c]
add edx, ecx
sub esi, ecx
mov dword [esp + 0xc], edx
sbb ebx, dword [esp + 0x10]
sub dword [eax], ecx
mov eax, dword [edi + 0x1c]
add dword [eax], ecx
jmp 0x1004a4ad
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
test ebx, ebx
jl 0x1004a4dc
jg 0x1004a4b7
test esi, esi
je 0x1004a4dc
cmp dword [edi + 0x4c], 0
je 0x1004a4dc
mov ecx, edi
call fcn.1004b720
push dword [edi + 0x4c]
push esi
push 1
push dword [esp + 0x18]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
sub esi, eax
sbb ebx, 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
pop edi
pop esi
sbb edx, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x1004a890
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x30
mov eax, dword [0x100f8008]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebx
push esi
mov esi, ecx
mov ecx, 0x10104a7f
call fcn.1005cb05
mov ebx, dword [esp + 0x3c]
cmp ebx, 0xffffffff
jne 0x1004a8ca
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.1005a96e
add esp, 0x30
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x1004a8fd
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x1004a8fd
mov ecx, esi
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
pop esi
mov byte [eax], bl
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.1005a96e
add esp, 0x30
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x1004aa03
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x1004a926
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x1004a95b
push dword [esi + 0x4c]
movsx eax, bl
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.1005a96e
add esp, 0x30
ret 4
lea eax, [esp + 0xc]
mov byte [esp + 0x17], bl
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x2b]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
test eax, eax
js 0x1004aa03
cmp eax, 1
jle 0x1004a9bf
cmp eax, 3
jne 0x1004aa03
mov edx, dword [esi + 0x4c]
mov cl, byte [esp + 0x17]
call fcn.10049560
or ecx, 0xffffffff
test al, al
pop edi
cmovne ecx, ebx
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.1005a96e
add esp, 0x30
ret 4
mov edi, dword [esp + 0xc]
lea eax, [esp + 0x18]
sub edi, eax
je 0x1004a9df
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x1004aa03
lea eax, [esp + 0x17]
mov byte [esi + 0x3d], 1
cmp dword [esp + 0x10], eax
je 0x1004aa03
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.1005a96e
add esp, 0x30
ret 4
mov ecx, dword [esp + 0x38]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1005a96e
add esp, 0x30
ret 4
Function at 0x1004b790
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x28
mov eax, dword [0x100f8008]
xor eax, esp
mov dword [esp + 0x24], eax
push esi
mov esi, ecx
mov ecx, 0x10104a7f
push edi
call fcn.1005cb05
cmp dword [esi + 0x38], 0
je 0x1004b848
cmp byte [esi + 0x3d], 0
je 0x1004b848
mov eax, dword [esi]
mov ecx, esi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x1004b7f9
mov ecx, dword [esi + 0x38]
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x1004b80c
sub eax, 1
je 0x1004b810
sub eax, 2
je 0x1004b848
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.1005a96e
add esp, 0x28
ret
mov byte [esi + 0x3d], 0
mov edi, dword [esp + 8]
lea eax, [esp + 0xc]
sub edi, eax
je 0x1004b830
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x1004b7f9
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.1005a96e
add esp, 0x28
ret
mov ecx, dword [esp + 0x2c]
mov al, 1
pop edi
pop esi
xor ecx, esp
call fcn.1005a96e
add esp, 0x28
ret

Function at 0x10050da0
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, ecx
mov ecx, 0x101052d5
push edi
call fcn.1005cb05
mov ecx, dword [esi]
test ecx, ecx
je 0x10050de6
mov eax, dword [esp + 0xc]
test eax, eax
je 0x10050de6
mov ecx, dword [ecx]
cmp ecx, 0xffffffff
je 0x10050de6
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
push 0
push esi
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10050de6
cmp edi, dword [esi]
jne 0x10050de6
pop edi
mov al, 1
pop esi
ret 0xc
pop edi
xor al, al
pop esi
ret 0xc

Function at 0x10050e60
Capabilities:
Get file size

Disassembly:
sub esp, 8
mov eax, dword [0x100f8008]
xor eax, esp
mov dword [esp + 4], eax
push esi
mov esi, ecx
mov ecx, 0x101052d5
push edi
mov edi, dword [esp + 0x14]
call fcn.1005cb05
mov eax, dword [esi]
test eax, eax
je 0x10050ecf
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x10050ecf
lea ecx, [esp + 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10050eaa
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10050ecf
mov eax, dword [esp + 8]
xor ecx, ecx
add ecx, esi
mov dword [edi], ecx
adc eax, 0
mov dword [edi + 4], eax
mov al, 1
pop edi
pop esi
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.1005a96e
add esp, 8
ret 4
mov ecx, dword [esp + 0xc]
xor al, al
pop edi
pop esi
xor ecx, esp
call fcn.1005a96e
add esp, 8
ret 4
Function at 0x10050fc0
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
mov esi, ecx
mov ecx, 0x101052d5
push edi
call fcn.1005cb05
cmp dword [esi], 0
je 0x1005107a
lea eax, [esp + 0x18]
xorps xmm0, xmm0
push eax
push 1
push 0
push 0
mov ecx, esi
movlpd qword [esp + 0x28], xmm0
call fcn.10050ef0
test al, al
je 0x1005107a
mov edi, dword [ebp + 0xc]
lea eax, [esp + 0x10]
push eax
push 0
push edi
push dword [ebp + 8]
xorps xmm0, xmm0
mov ecx, esi
movlpd qword [esp + 0x20], xmm0
call fcn.10050ef0
test al, al
je 0x1005107a
mov eax, dword [ebp + 8]
xor bl, bl
cmp dword [esp + 0x10], eax
jne 0x10051050
cmp dword [esp + 0x14], edi
jne 0x10051050
mov eax, dword [esi]
test eax, eax
jne 0x1005103d
xor bl, bl
jmp 0x10051050
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x10051039
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
setne bl
lea eax, [esp + 0x10]
xorps xmm0, xmm0
push eax
push 0
push dword [esp + 0x24]
mov ecx, esi
movlpd qword [esp + 0x1c], xmm0
push dword [esp + 0x24]
call fcn.10050ef0
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x10055510
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
mov eax, dword [0x100f8008]
xor eax, esp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x18]
push ebx
push ebp
push esi
mov ebp, ecx
mov dword [esp + 0xc], eax
push edi
mov edi, dword [esp + 0x20]
mov ecx, 0x101052d5
call fcn.1005cb05
mov esi, dword [esp + 0x24]
xor ebx, ebx
cmp dword [ebp + 0x10], 0xffffffff
je 0x10055592
mov ecx, 0x100000
nop dword [eax + eax]
cmp esi, 0x100000
mov dword [esp + 0x14], 0
push 0
mov eax, esi
cmova eax, ecx
lea ecx, [esp + 0x18]
push ecx
push eax
push edi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x14]
add ebx, ecx
test eax, eax
je 0x10055592
test ecx, ecx
je 0x1005558e
add edi, ecx
sub esi, ecx
mov ecx, 0x100000
jne 0x10055550
xor eax, eax
jmp 0x10055597
mov eax, 1
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x100555a1
mov dword [ecx], ebx
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1005a96e
add esp, 0xc
ret 0xc
Function at 0x10058930
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1008742f
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x100f8008]
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, edx
mov edi, ecx
mov ecx, 0x101052d5
call fcn.1005cb05
cmp esi, 0xffffffff
jne 0x10058972
xor al, al
jmp 0x100589e9
and esi, 0xffffb1af
mov eax, edi
cmp dword [edi + 0x14], 8
jb 0x10058982
mov eax, dword [edi]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
push eax
call ebx
test eax, eax
je 0x10058994
mov al, 1
jmp 0x100589e9
lea ecx, [ebp - 0x28]
call fcn.100194b0
mov dword [ebp - 4], 0
lea edx, [ebp - 0x28]
mov ecx, edi
call fcn.10059120
test al, al
je 0x100589c8
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push esi
cmovae eax, dword [ebp - 0x28]
push eax
call ebx
test eax, eax
je 0x100589c8
mov bl, 1
jmp 0x100589ca
xor bl, bl
mov dword [ebp - 4], 5
lea ecx, [ebp - 0x28]
call fcn.10017980
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 4], 0xffffffff
mov al, bl
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.1005a96e
mov esp, ebp
pop ebp
ret

Function at 0x10058a10
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10087496
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x100f8008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ecx, 0x101052d5
call fcn.1005cb05
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x10058a50
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10058ad4
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 3
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], 4
lea edx, [ebp - 0x28]
mov ecx, edi
call fcn.10059120
test al, al
je 0x10058ab7
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
mov dword [ebp - 4], 5
lea ecx, [ebp - 0x28]
call fcn.10017980
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 4], 0xffffffff
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1005a96e
mov esp, ebp
pop ebp
ret
Function at 0x10058b00
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1008752c
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x100f8008]
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 edi, edx
mov esi, ecx
mov ecx, 0x101052d5
call fcn.1005cb05
cmp dword [edi + 0x14], 8
mov ecx, edi
jb 0x10058b43
mov ecx, dword [edi]
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x10058b4d
mov eax, dword [esi]
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileW]
push 0
push ecx
push eax
call ebx
test eax, eax
je 0x10058b64
mov al, 1
jmp 0x10058c50
mov byte [ebp - 0x41], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 4], 3
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov dword [ebp - 4], 4
lea edx, [ebp - 0x40]
mov ecx, esi
call fcn.10059120
movzx ecx, byte [ebp - 0x41]
test al, al
mov edx, 1
cmovne ecx, edx
mov dword [ebp - 0x48], ecx
mov byte [ebp - 4], 5
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov byte [ebp - 4], 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 9
lea edx, [ebp - 0x28]
mov ecx, edi
call fcn.10059120
test al, al
jne 0x10058bfb
cmp byte [ebp - 0x48], al
je 0x10058c1f
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
push 0
cmovae ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x40]
cmp dword [ebp - 0x2c], 8
push ecx
cmovae eax, dword [ebp - 0x40]
push eax
call ebx
test eax, eax
je 0x10058c1f
mov bl, 1
jmp 0x10058c21
xor bl, bl
mov byte [ebp - 4], 0x12
lea ecx, [ebp - 0x28]
call fcn.10017980
mov byte [ebp - 4], 4
mov dword [ebp - 4], 0x16
lea ecx, [ebp - 0x40]
call fcn.10017980
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 4], 0xffffffff
mov al, bl
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.1005a96e
mov esp, ebp
pop ebp
ret
Function at 0x10058d90
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1008763c
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x100f8008]
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
mov ecx, 0x101052d5
call fcn.1005cb05
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x10058dd1
mov eax, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
call edi
test eax, eax
je 0x10058de5
mov al, 1
jmp 0x10058f1f
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x10058def
mov eax, dword [esi]
push eax
lea ecx, [ebp - 0x28]
call fcn.10017700
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.10058a10
mov ebx, eax
mov dword [ebp - 0x30], ebx
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.10017980
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
cmp ebx, 0xffffffff
jne 0x10058e38
xor al, al
jmp 0x10058f1f
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x10058e42
mov eax, dword [esi]
push eax
lea ecx, [ebp - 0x28]
call fcn.10017700
mov dword [ebp - 4], 5
xor edx, edx
lea ecx, [ebp - 0x28]
call fcn.10058930
mov bl, al
mov dword [ebp - 4], 6
lea ecx, [ebp - 0x28]
call fcn.10017980
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
test bl, bl
je 0x10058e31
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x10058e8c
mov eax, dword [esi]
push eax
call edi
test eax, eax
jne 0x10058dde
lea ecx, [ebp - 0x28]
call fcn.100194b0
mov dword [ebp - 4], 0xa
lea edx, [ebp - 0x28]
mov ecx, esi
call fcn.10059120
test al, al
je 0x10058eca
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call edi
test eax, eax
je 0x10058eca
mov bl, 1
jmp 0x10058f00
cmp dword [esi + 0x14], 8
jb 0x10058ed2
mov esi, dword [esi]
push esi
lea ecx, [ebp - 0x48]
call fcn.10017700
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x48]
mov edx, dword [ebp - 0x30]
call fcn.10058930
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x48]
call fcn.10017980
mov byte [ebp - 4], 0xa
mov byte [ebp - 4], 0xa
xor bl, bl
mov dword [ebp - 4], 0x14
lea ecx, [ebp - 0x28]
call fcn.10017980
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 4], 0xffffffff
mov al, bl
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.1005a96e
mov esp, ebp
pop ebp
ret
Function at 0x10059920
Capabilities:
Get file size

Disassembly:
sub esp, 8
mov eax, dword [0x100f8008]
xor eax, esp
mov dword [esp + 4], eax
push esi
mov esi, ecx
mov ecx, 0x101052d5
push edi
mov edi, dword [esp + 0x14]
call fcn.1005cb05
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x10059991
lea ecx, [esp + 8]
mov dword [esp + 8], 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1005996c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x10059991
mov eax, dword [esp + 8]
xor ecx, ecx
add ecx, esi
mov dword [edi], ecx
adc eax, 0
mov dword [edi + 4], eax
mov al, 1
pop edi
pop esi
mov ecx, dword [esp + 4]
xor ecx, esp
call fcn.1005a96e
add esp, 8
ret 4
mov ecx, dword [esp + 0xc]
xor al, al
pop edi
pop esi
xor ecx, esp
call fcn.1005a96e
add esp, 8
ret 4
Function at 0x1005a0f0
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100878c8
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x100f8008]
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 edi, ecx
mov ecx, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x24], ecx
mov ecx, 0x101052d5
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x2c], ebx
call fcn.1005cb05
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x1005a146
mov dword [eax], 0
mov dword [ebx], 0
cmp dword [edi], 0xffffffff
je 0x1005a29b
mov eax, dword [ebp + 0xc]
mov ecx, 0x100000
nop dword [eax]
push 0
mov ebx, eax
mov dword [ebp - 0x1c], 0
cmp eax, 0x100000
lea eax, [ebp - 0x1c]
push eax
cmova ebx, ecx
push ebx
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, 0x7fffbffb
add eax, 0x80004005
cmp dword [edi + 0x1c], 0
je 0x1005a266
test eax, eax
je 0x1005a266
mov edx, dword [ebp - 0x1c]
cmp edx, ebx
jae 0x1005a269
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [edi]
mov dword [ebp - 0x28], eax
cmp ecx, 0xffffffff
je 0x1005a1eb
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1005a1df
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1005a1eb
mov eax, dword [ebp - 0x14]
xor ecx, ecx
add ecx, esi
adc eax, 0
jmp 0x1005a1f9
xorps xmm0, xmm0
movlpd qword [ebp - 0x38], xmm0
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
push 0
push dword [ebp - 0x28]
push eax
push ecx
sub esp, 0x18
lea eax, [edi + 4]
mov ecx, esp
mov dword [ebp - 0x28], esp
push eax
call fcn.1001ded0
mov dword [ebp - 4], 0
mov ecx, dword [edi + 0x1c]
mov eax, dword [ecx]
mov dword [ebp - 4], 0xffffffff
call dword [eax + 0x18]
mov esi, dword [ebp - 0x20]
test eax, eax
jne 0x1005a266
push eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x1c]
push ebx
add eax, esi
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, eax
xor edx, edx
test ecx, ecx
mov eax, 0x80004005
cmovne eax, edx
mov edx, dword [ebp - 0x1c]
add edx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], edx
test ecx, ecx
je 0x1005a1a4
jmp 0x1005a269
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x2c]
add dword [ecx], edx
test eax, eax
jne 0x1005a292
test edx, edx
je 0x1005a28e
mov eax, dword [ebp + 0xc]
add esi, edx
sub eax, edx
mov dword [ebp - 0x20], esi
mov dword [ebp + 0xc], eax
mov ecx, 0x100000
jne 0x1005a160
mov al, 1
jmp 0x1005a29d
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x1005a29b
mov dword [ecx], eax
xor al, al
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.1005a96e
mov esp, ebp
pop ebp
ret 0x10
Function at 0x40348c
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00404f5c
test esi, esi
jne 0x4034c2
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.0040504c
jmp 0x4034e0
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00403330
mov edi, eax
test esi, esi
je 0x4034e0
cmp dword [ebx], 0
je 0x4034e0
dec esi
jmp 0x4034c9
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x403ddc
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x5f7024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403e74
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403e54
xor eax, eax
push ebp
push 0x403e4d
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 0x403e90
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 0x403e54
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x5f7024]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x5f7024], ax
mov esp, ebp
pop ebp
ret

Function at 0x404d08
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x60504c], 0
je 0x404d69
cmp word [0x605220], 0xd7b2
jne 0x404d31
cmp dword [0x605228], 0
jbe 0x404d31
mov eax, 0x60521c
call dword [0x605238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push str.Runtime_error_____at_00000000
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 0x404d90
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x5f7030], 0
jne 0x404d85
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x404ee0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], edx
mov edi, eax
mov esi, dword [ebp + 0x10]
cmp dword [0x5f7034], 0
je 0x404f06
mov edx, esi
mov eax, ebx
call dword [0x5f7034]
jmp 0x404f15
mov eax, 8
call fcn.00403010
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x60504d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404ea8
push eax
mov eax, dword [ebp - 4]
push eax
push edi
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 0xc