joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406270
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x4425b8]
sub eax, dword [0x43e5ac]
mov ecx, dword [ebp + 8]
sub ecx, eax
mov dword [ebp - 4], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 0x1f4
mov dword [0x492da0], eax
cmp dword [ebp - 4], 0
jle 0x406457
mov edx, dword [0x4425b4]
push edx
call fcn.00401023
push 0
push 0
mov eax, dword [0x4425b8]
push eax
mov ecx, dword [0x414eec]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp - 4]
mov dword [0x43e5a8], edx
mov dword [0x42e51c], 0
mov eax, dword [0x4425b0]
sub eax, dword [0x4425b4]
cmp eax, 0x4000
jle 0x4062f4
mov dword [ebp - 0x18], 0x4000
jmp 0x406303
mov ecx, dword [0x4425b0]
sub ecx, dword [0x4425b4]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
push eax
push 0x43e5b0
call fcn.00401041
test eax, eax
jne 0x406323
or eax, 0xffffffff
jmp 0x406463
mov ecx, dword [0x4425b4]
add ecx, dword [ebp - 8]
mov dword [0x4425b4], ecx
mov dword [0x436538], 0x43e5b0
mov edx, dword [ebp - 8]
mov dword [0x43653c], edx
cmp dword [0x492d30], 0
je 0x40637f
cmp dword [0x492e40], 0
jne 0x40637f
mov eax, dword [0x4425b8]
sub eax, dword [0x43e5ac]
mov ecx, dword [ebp + 8]
sub ecx, eax
mov edx, dword [0x43e5a8]
sub edx, ecx
mov dword [0x42e51c], edx
push 0
call fcn.00401136
add esp, 4
mov dword [0x436540], 0x4365a8
mov dword [0x436544], 0x8000
mov ecx, 0x436520
call fcn.00401168
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jge 0x4063b0
mov eax, 0xfffffffd
jmp 0x406463
mov eax, dword [0x436540]
sub eax, 0x4365a8
mov dword [ebp - 0x10], eax
je 0x4063fe
push 0
lea ecx, [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x10]
push edx
push 0x4365a8
mov eax, dword [0x414eec]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4063e6
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x14]
je 0x4063ed
mov eax, 0xfffffffe
jmp 0x406463
mov edx, dword [0x4425b8]
add edx, dword [ebp - 0x10]
mov dword [0x4425b8], edx
jmp 0x406418
cmp dword [0x43653c], 0
jne 0x40640d
cmp dword [ebp - 8], 0
jne 0x406416
mov eax, 0xfffffffd
jmp 0x406463
jmp 0x406425
cmp dword [0x43653c], 0
jne 0x406345
mov eax, dword [0x4425b8]
sub eax, dword [0x43e5ac]
mov ecx, dword [ebp + 8]
sub ecx, eax
test ecx, ecx
jg 0x40643b
jmp 0x406440
jmp 0x4062d9
push 0
push 0
mov edx, dword [0x43e5ac]
push edx
mov eax, dword [0x414eec]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
call fcn.00401136
add esp, 4
xor eax, eax
mov esp, ebp
pop ebp
ret 4
Function at 0x4071d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, 0xffff
mov word [ebp - 0xc], ax
push 0x4f5000
call fcn.0040104b
mov word [ebp - 4], ax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov ecx, dword [0x492d84]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 8]
sub eax, 1
mov dword [ebp - 8], eax
test edx, edx
je 0x407262
mov ecx, dword [0x492d30]
mov edx, dword [ebp - 8]
imul edx, dword [ecx + 0x64]
add edx, dword [0x492d80]
mov dword [ebp - 0x10], edx
movzx eax, word [ebp - 4]
mov ecx, dword [ebp - 0x10]
movzx edx, word [ecx]
xor eax, edx
movzx ecx, word [ebp - 0xc]
and eax, ecx
jne 0x407260
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 2]
mov dword [0x489354], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 6]
mov dword [0x492e48], edx
mov eax, dword [ebp - 0x10]
add eax, 0xa
mov dword [ebp - 0x14], eax
jmp 0x407262
jmp 0x407204
cmp dword [ebp - 0x14], 0
jne 0x40728a
movzx ecx, word [ebp - 0xc]
cmp ecx, 0xffff
jne 0x40727f
mov edx, 0x3ff
mov word [ebp - 0xc], dx
jmp 0x407285
xor eax, eax
mov word [ebp - 0xc], ax
jmp 0x4071fb
mov ecx, dword [ebp - 0x14]
mov dword [0x489360], ecx
mov edx, dword [ebp - 0x10]
movzx eax, word [edx]
push eax
push 0x4f5000
call fcn.00401046
push 0xfffffffffffffffe
push 0x489380
call fcn.0040103c
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [0x44b2d8]
push edx
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov eax, dword [0x492d68]
mov dword [ebp - 0x20], eax
mov ecx, dword [0x492d6c]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
sub eax, 1
mov dword [ebp - 0x1c], eax
test edx, edx
je 0x40730d
mov ecx, dword [ebp - 0x20]
cmp dword [ecx], 0
je 0x4072ff
mov edx, dword [ebp - 0x20]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x20]
add ecx, 0x18
push ecx
call fcn.0040103c
mov edx, dword [ebp - 0x20]
add edx, 0x4018
mov dword [ebp - 0x20], edx
jmp 0x4072d5
mov esp, ebp
pop ebp
ret
Function at 0x405370
Capabilities:
Accept command line arguments

Disassembly:
mov eax, 0x1070
call fcn.0040dab0
mov ecx, dword [esp + 0x107c]
xor eax, eax
mov ax, word [0x41daf0]
push ebx
xor ebx, ebx
mov word [esp + 4], 4
mov word [0x42aec4], 0x400
mov word [0x42aec6], bx
mov word [0x42b2c8], 0x100
push eax
push ecx
push 0x42b2c8
mov word [0x42b2ca], bx
mov word [0x42b3cc], 0x20
mov word [0x42b3ce], bx
mov word [0x428ea0], 0x2000
mov word [0x428ea2], bx
call sym.ptapdl.exe__string_vstring_12
mov byte [0x42855c], 1
call sub.KERNEL32.dll_GetCommandLineA
cmp eax, ebx
je 0x405404
xor edx, edx
mov dx, word [0x41daf0]
push edx
push eax
push 0x428ea0
call sym.ptapdl.exe__string_vstring_12
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 8]
push ecx
push 0x42aea4
push 0x428ea0
mov word [0x42aea4], 1
call sym.ptapdl.exe__string_token_16
mov dx, word [0x42aea4]
mov byte [0x42b3f0], bl
mov word [0x42aea6], dx
mov dword [0x42aec0], 1
pop ebx
add esp, 0x1070
ret 0xc

Function at 0x4062b0
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x106c
call fcn.0040dab0
mov eax, dword [0x41db98]
push esi
push edi
push eax
call sub.KERNEL32.dll_GetStdHandle
mov edi, eax
cmp edi, 0xffffffff
jne 0x406301
lea ecx, [esp + 0xc]
push ecx
call sym.ptapdl.exe__sys_error_none_4
call sub.KERNEL32.dll_GetLastError
push 0
push 0x428554
push 0x428504
push 0x428504
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x2c], eax
call sym.ptapdl.exe__sys_error_abort_20
call sym.ptapdl.exe__sys_bomb_0
mov eax, dword [esp + 0x1078]
movsx esi, word [eax + 2]
test esi, esi
jbe 0x406365
push ebx
lea ebx, [eax + 4]
mov eax, dword [0x428558]
push eax
lea ecx, [esp + 0x10]
push ecx
push esi
push ebx
push edi
call sub.KERNEL32.dll_WriteFile
test al, al
jne 0x40635e
lea edx, [esp + 0x10]
push edx
call sym.ptapdl.exe__sys_error_none_4
call sub.KERNEL32.dll_GetLastError
push 0
push 0x428554
push 0x428504
mov dword [esp + 0x28], eax
push 0x428504
lea eax, [esp + 0x20]
push eax
call sym.ptapdl.exe__sys_error_abort_20
call sym.ptapdl.exe__sys_bomb_0
sub esi, dword [esp + 0xc]
jne 0x406314
pop ebx
push edi
call sub.KERNEL32.dll_FlushFileBuffers
pop edi
pop esi
add esp, 0x106c
ret 4

Function at 0x407a40
Capabilities:
Create thread

Disassembly:
push esi
mov esi, dword [esp + 0x14]
push esi
call sym.ptapdl.exe__sys_error_none_4
mov al, byte [0x4288e5]
test al, al
jne 0x407a59
call sym.ptapdl.exe__make_master_interlock_0
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
lea eax, [esp + 0x14]
push eax
mov eax, dword [0x428588]
push 0
push ecx
mov ecx, dword [0x428584]
push edx
push eax
push ecx
call sub.KERNEL32.dll_CreateThread
test eax, eax
mov edx, dword [esp + 0x10]
mov dword [edx], eax
jne 0x407a8e
call sub.KERNEL32.dll_GetLastError
mov dword [esi + 0xc], eax
pop esi
ret 0x10
Function at 0x4094c0
Capabilities:
Enumerate pe sections

Disassembly:
mov eax, dword [esp + 8]
mov cl, byte [eax + 0xc]
sub esp, 0x34
test cl, cl
je 0x4095e2
push eax
call sym.ptapdl.exe__sys_clock_to_fp2_4
fld st(0)
fmul qword [0x419248]
call fcn.0040dae0
mov word [esp], ax
mov eax, dword [esp]
and eax, 0xffff
lea ecx, [eax + eax*8]
lea eax, [eax + ecx*8]
lea eax, [eax + eax*2]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*8]
shl edx, 7
mov dword [esp + 0x3c], edx
fild dword [esp + 0x3c]
mov word [esp + 2], 0
mov word [esp + 4], 0
fsubp st(1)
fld st(0)
fmul qword [0x419240]
call fcn.0040dae0
mov word [esp + 6], ax
mov ecx, dword [esp + 6]
and ecx, 0xffff
mov eax, ecx
shl eax, 4
sub eax, ecx
lea eax, [eax + eax*4]
lea eax, [eax + eax*8]
shl eax, 7
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
fsubp st(1)
fld st(0)
fmul qword [0x419238]
call fcn.0040dae0
mov word [esp + 8], ax
mov ecx, dword [esp + 8]
and ecx, 0xffff
imul ecx, ecx, 0xe10
mov dword [esp + 0x3c], ecx
fild dword [esp + 0x3c]
fsubp st(1)
fld st(0)
fmul qword [0x419230]
call fcn.0040dae0
mov word [esp + 0xa], ax
mov eax, dword [esp + 0xa]
and eax, 0xffff
mov edx, eax
shl edx, 4
sub edx, eax
shl edx, 2
mov dword [esp + 0x3c], edx
fild dword [esp + 0x3c]
fsubp st(1)
fld st(0)
call fcn.0040dae0
mov word [esp + 0xc], ax
mov eax, dword [esp + 0xc]
and eax, 0xffff
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
fsubr st(1)
fmul qword [0x4191f0]
call fcn.0040dae0
fstp st(0)
jmp 0x409652
mov edx, dword [0x4286a8]
lea ecx, [esp + 0x10]
push ecx
push 0
push edx
push 0
push eax
call sym.ptapdl.exe__sys_clock_to_date_20
mov ecx, dword [esp + 0x14]
mov ax, word [esp + 0x10]
lea edx, [esp + 0x10]
inc ecx
push edx
mov word [esp + 4], ax
mov word [esp + 6], cx
call sym.ptapdl.exe__sys_date_dayofweek_4
fld dword [esp + 0x28]
mov cx, word [esp + 0x1c]
fmul qword [0x4191f0]
mov dx, word [esp + 0x20]
mov word [esp + 4], ax
mov eax, dword [esp + 0x18]
inc eax
mov word [esp + 6], ax
mov ax, word [esp + 0x24]
mov word [esp + 8], cx
mov word [esp + 0xa], dx
mov word [esp + 0xc], ax
call fcn.0040dae0
mov edx, dword [esp]
mov word [esp + 0xe], ax
mov eax, dword [esp + 0x38]
mov ecx, eax
mov dword [ecx], edx
mov edx, dword [esp + 4]
mov dword [ecx + 4], edx
mov edx, dword [esp + 8]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0xc]
mov dword [ecx + 0xc], edx
add esp, 0x34
ret 8

Function at 0x409b50
Capabilities:
Get hostname

Disassembly:
mov eax, 0x146c
call fcn.0040dab0
lea eax, [esp]
push eax
lea ecx, [esp + 8]
push ecx
mov dword [esp + 8], 0x400
call sub.KERNEL32.dll_GetComputerNameA
test al, al
jne 0x409bac
lea edx, [esp + 0x404]
push edx
call sym.ptapdl.exe__sys_error_none_4
call sub.KERNEL32.dll_GetLastError
push 0
push 0x4286bc
push str.node_name_get
mov dword [esp + 0x41c], eax
push 0x41ef78
lea eax, [esp + 0x414]
push eax
call sym.ptapdl.exe__sys_error_abort_20
mov ecx, dword [esp]
push esi
mov esi, dword [esp + 0x1474]
push ecx
lea edx, [esp + 0xc]
push edx
push esi
call sym.ptapdl.exe__string_vstring_12
push esi
call sym.ptapdl.exe__string_downcase_4
pop esi
add esp, 0x146c
ret 4
Function at 0x40a6d0
Capabilities:
Get disk information

Disassembly:
push ecx
mov al, byte [0x428870]
test al, al
push ebx
jne case.0x40a737.3
mov al, byte [0x428871]
mov ebx, 0x41
mov word [0x4286c8], 4
mov byte [0x4286cd], 0x3a
mov byte [0x4286ce], 0x5c
mov word [0x4286ca], 3
mov byte [0x4286cf], al
mov byte [0x428870], 1
mov byte [esp + 6], 0x20
mov byte [esp + 7], 0x20
mov byte [0x4286cc], bl
push 0x4286cc
call sub.KERNEL32.dll_GetDriveTypeA
add eax, 0xfffffffe
cmp eax, 3
ja case.default.0x40a737
jmp dword [eax*4 + 0x40a7b8]
cmp byte [esp + 6], 0x20
jne case.default.0x40a737
mov cl, byte [0x4286cc]
mov byte [esp + 6], cl
jmp case.default.0x40a737
cmp byte [esp + 7], 0x20
jne case.default.0x40a737
mov dl, byte [0x4286cc]
mov byte [esp + 7], dl
inc ebx
cmp ebx, 0x5a
mov byte [0x4286cc], bl
jle 0x40a725
mov al, byte [esp + 6]
cmp al, 0x20
je 0x40a78f
mov byte [0x4286cc], al
mov eax, dword [esp + 0xc]
push eax
push 0x4286c8
call sym.ptapdl.exe__string_copy_8
pop ebx
pop ecx
ret 4
mov al, byte [esp + 7]
cmp al, 0x20
mov byte [0x4286cc], al
jne case.0x40a737.3
mov byte [0x4286cc], 0x43
mov eax, dword [esp + 0xc]
push eax
push 0x4286c8
call sym.ptapdl.exe__string_copy_8
pop ebx
pop ecx
ret 4

Function at 0x40a7d0
Capabilities:
Initialize winsock library

Disassembly:
mov eax, 0x106c
call fcn.0040dab0
mov al, byte [0x4286d0]
test al, al
jne 0x40a8bc
push ebx
lea eax, [esp + 8]
push eax
call sym.ptapdl.exe__sys_error_none_4
mov byte [esp + 4], 0x7f
mov byte [esp + 5], 0x7f
mov ecx, dword [esp + 4]
push 0x4286d4
push ecx
mov byte [0x4286d6], 0
mov byte [0x4286d7], 0
call sub.WSOCK32.dll_WSAStartup
lea edx, [esp + 8]
push edx
mov dword [esp + 0x18], eax
call sym.ptapdl.exe__sys_error_4
test al, al
je 0x40a8b4
mov ebx, 1
mov byte [esp + 5], 0
mov byte [esp + 4], bl
mov eax, dword [esp + 4]
push 0x4286d4
push eax
call sub.WSOCK32.dll_WSAStartup
lea ecx, [esp + 8]
push ecx
mov dword [esp + 0x18], eax
call sym.ptapdl.exe__sys_error_4
test al, al
jne 0x40a88b
call sub.WSOCK32.dll_WSACleanup
test eax, eax
je 0x40a88b
call sub.WSOCK32.dll_WSAGetLastError
push 0
push 0x428874
push str.err_netclose
push 0x420154
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x28], eax
call sym.ptapdl.exe__sys_error_abort_20
mov al, byte [0x4286d6]
test al, al
jne 0x40a8c3
inc ebx
cmp ebx, 0x7f
mov byte [esp + 4], bl
jle 0x40a83d
push 0
push 0x428874
push str.err_netversion
push 0x420154
call sym.ptapdl.exe__sys_message_bomb_16
mov byte [0x4286d0], 1
pop ebx
add esp, 0x106c
ret
mov byte [esp + 4], al
mov al, byte [0x4286d7]
mov byte [esp + 5], al
mov ecx, dword [esp + 4]
push 0x4286d4
push ecx
call sub.WSOCK32.dll_WSAStartup
push 0
push 0x428874
push str.err_netstart
push 0x420154
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x28], eax
call sym.ptapdl.exe__sys_error_abort_20
mov byte [0x4286d0], 1
pop ebx
add esp, 0x106c
ret
Function at 0x40ae90
Capabilities:
Set environment variable

Disassembly:
sub esp, 0x88
mov eax, dword [0x420440]
mov edx, dword [esp + 0x8c]
push esi
push eax
lea ecx, [esp + 0xc]
push ecx
push edx
call sym.ptapdl.exe__string_t_c_12
mov al, byte [0x4288dc]
mov esi, dword [esp + 0x94]
push esi
mov byte [esp + 0xb], al
call sym.ptapdl.exe__sys_error_none_4
lea ecx, [esp + 7]
push ecx
lea edx, [esp + 0xc]
push edx
call sub.KERNEL32.dll_SetEnvironmentVariableA
test al, al
jne 0x40aee0
call sub.KERNEL32.dll_GetLastError
mov dword [esi + 0xc], eax
pop esi
add esp, 0x88
ret 8

Function at 0x40aef0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x420444]
sub esp, 0x884
push edi
mov edi, dword [esp + 0x88c]
push eax
lea ecx, [esp + 8]
push ecx
push edi
call sym.ptapdl.exe__string_t_c_12
mov edx, dword [0x420448]
push edx
lea eax, [esp + 0x8c]
push eax
lea ecx, [esp + 0xc]
push ecx
call sub.KERNEL32.dll_GetEnvironmentVariableA
test eax, eax
jne 0x40af50
push esi
mov esi, dword [esp + 0x898]
push esi
push 2
push 0xffffffffffffffff
call sym.ptapdl.exe__sys_stat_set_12
push esi
push edi
call sym.ptapdl.exe__sys_stat_parm_vstr_8
pop esi
pop edi
add esp, 0x884
ret 0xc
mov ecx, dword [esp + 0x890]
xor edx, edx
mov dx, word [0x42044c]
lea eax, [esp + 0x88]
push edx
push eax
push ecx
call sym.ptapdl.exe__string_vstring_12
mov edx, dword [esp + 0x894]
push edx
call sym.ptapdl.exe__sys_error_none_4
pop edi
add esp, 0x884
ret 0xc

Function at 0x40af90
Capabilities:
Set environment variable

Disassembly:
sub esp, 0x884
push esi
mov esi, dword [esp + 0x894]
push esi
call sym.ptapdl.exe__sys_error_none_4
mov ecx, dword [esp + 0x88c]
push 0x84
lea eax, [esp + 8]
push eax
push ecx
call sym.ptapdl.exe__string_t_c_12
mov eax, dword [esp + 0x890]
push 0x800
lea edx, [esp + 0x8c]
push edx
push eax
call sym.ptapdl.exe__string_t_c_12
lea ecx, [esp + 0x88]
push ecx
lea edx, [esp + 8]
push edx
call sub.KERNEL32.dll_SetEnvironmentVariableA
test al, al
jne 0x40aff3
call sub.KERNEL32.dll_GetLastError
mov dword [esi + 0xc], eax
pop esi
add esp, 0x884
ret 0xc

Function at 0x40b0e0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
push eax
call fcn.0040dc03
nop
nop
nop
nop
nop
nop

Function at 0x40c2b0
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push esi
call sym.ptapdl.exe__sys_error_none_4
mov eax, dword [0x42097c]
mov ecx, dword [esp + 8]
push eax
push ecx
call sub.KERNEL32.dll_TerminateProcess
test al, al
jne 0x40c2d7
call sub.KERNEL32.dll_GetLastError
mov dword [esi + 0xc], eax
pop esi
ret 8
Function at 0x4101fd
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4212f0
cmp edx, dword [eax]
je 0x41021f
add eax, 8
inc ecx
cmp eax, 0x421380
jl 0x410210
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4212f0]
jne 0x41034d
mov eax, dword [0x428a68]
cmp eax, 1
je 0x410327
test eax, eax
jne 0x410250
cmp dword [0x421210], 1
je 0x410327
cmp edx, 0xfc
je 0x41034d
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x410287
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00412090
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00410da0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4102ca
lea eax, [ebp - 0x1a4]
push eax
call fcn.00410da0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4195fc
push edi
call fcn.00412ad0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00412090
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004120a0
lea eax, [ebp - 0xa0]
push 0x4195dc
push eax
call fcn.004120a0
push dword [esi + 0x4212f4]
lea eax, [ebp - 0xa0]
push eax
call fcn.004120a0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00412a3e
add esp, 0x2c
pop edi
jmp 0x41034d
lea eax, [ebp + 8]
lea esi, [esi + 0x4212f4]
push 0
push eax
push dword [esi]
call fcn.00410da0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret

Function at 0x413c10
Capabilities:
Clear file content

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi + 0x91c]
test eax, eax
jne 0x413c7f
test byte [esi], 2
je 0x413c51
mov al, byte [esi + 1]
test al, al
jne 0x413c51
mov eax, dword [esi + 0x920]
push eax
call sub.KERNEL32.dll_SetEndOfFile
test al, al
jne 0x413c51
push 0
push 0x428c58
push str.truncate
push 0x421c14
call sym.ptapdl.exe__sys_sys_error_bomb_16
cmp byte [esi + 1], 6
je 0x413c82
mov ecx, dword [esi + 0x920]
push ecx
call sub.KERNEL32.dll_CloseHandle
test al, al
jne 0x413c82
push 0
push 0x428c58
push str.close
push 0x421c14
call sym.ptapdl.exe__sys_sys_error_bomb_16
jmp 0x413c82
push esi
call eax
mov ecx, dword [esi + 0x918]
test ecx, ecx
lea eax, [esi + 0x918]
pop esi
je 0x413c99
push eax
call sym.ptapdl.exe__sys_mem_dealloc_4
ret 4
Function at 0x413e40
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
push edi
mov edi, dword [esp + 0x14]
cmp byte [edi + 1], 8
jne 0x413e63
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
push eax
push edi
push ecx
call sym.ptapdl.exe__file_csrv_txw_write_12
pop edi
pop esi
pop ebx
ret 0xc
mov esi, dword [esp + 0x18]
push esi
call sym.ptapdl.exe__sys_error_none_4
mov edx, dword [0x428c5c]
mov eax, dword [esp + 0x10]
movsx ebx, word [eax + 2]
push edx
mov edx, dword [edi + 0x920]
lea ecx, [esp + 0x1c]
push ecx
push ebx
add eax, 4
push eax
push edx
call sub.KERNEL32.dll_WriteFile
test al, al
jne 0x413ea4
call sub.KERNEL32.dll_GetLastError
pop edi
mov dword [esi + 0xc], eax
pop esi
pop ebx
ret 0xc
cmp dword [esp + 0x18], ebx
jne 0x413ee4
mov eax, dword [0x428c5c]
mov edx, dword [edi + 0x920]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ebx, 2
push ebx
push 0x421d08
push edx
call sub.KERNEL32.dll_WriteFile
test al, al
jne 0x413ede
call sub.KERNEL32.dll_GetLastError
pop edi
mov dword [esi + 0xc], eax
pop esi
pop ebx
ret 0xc
cmp dword [esp + 0x18], ebx
je 0x413f13
push esi
push 9
push 0xfffffffffffffffd
call sym.ptapdl.exe__sys_stat_set_12
push esi
add edi, 0x50c
push edi
call sym.ptapdl.exe__sys_stat_parm_vstr_8
push esi
push ebx
call sym.ptapdl.exe__sys_stat_parm_int_8
mov eax, dword [esp + 0x18]
push esi
push eax
call sym.ptapdl.exe__sys_stat_parm_int_8
pop edi
pop esi
pop ebx
ret 0xc
mov eax, dword [edi + 0x914]
test eax, eax
jl 0x413f24
inc eax
mov dword [edi + 0x914], eax
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x4147e0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x14
push ebp
mov ebp, dword [esp + 0x24]
push esi
push edi
push ebp
call sym.ptapdl.exe__sys_error_none_4
mov eax, dword [0x428cbc]
mov esi, dword [esp + 0x28]
mov edi, dword [esi + 0x918]
push 0x428cc0
push 0
push 1
push eax
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
call sub.KERNEL32.dll_CreateEventA
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x414837
call sub.KERNEL32.dll_GetLastError
pop edi
pop esi
mov dword [ebp + 0xc], eax
pop ebp
add esp, 0x14
ret 0xc
mov ecx, dword [esp + 0x24]
mov ax, word [ecx + 2]
test ax, ax
jle 0x41488e
lea edx, [esp + 0xc]
push edx
movsx eax, ax
lea edx, [esp + 0x30]
push edx
push eax
mov eax, dword [esi + 0x920]
add ecx, 4
push ecx
push eax
call sub.KERNEL32.dll_WriteFile
test al, al
jne 0x41488e
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x3e5
jne 0x4148e0
mov eax, dword [esi + 0x920]
push 1
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x14]
push edx
push eax
call sub.KERNEL32.dll_GetOverlappedResult
test al, al
je 0x4148e0
mov al, byte [edi + 0x39]
test al, al
je 0x4148e8
movsx eax, word [edi + 0x26]
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x30]
push edx
push eax
mov eax, dword [esi + 0x920]
add edi, 0x28
push edi
push eax
call sub.KERNEL32.dll_WriteFile
test al, al
jne 0x4148e8
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x3e5
jne 0x4148e0
mov eax, dword [esi + 0x920]
push 1
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x14]
push edx
push eax
call sub.KERNEL32.dll_GetOverlappedResult
test al, al
jne 0x4148e8
call sub.KERNEL32.dll_GetLastError
mov dword [ebp + 0xc], eax
mov ecx, dword [esp + 0x1c]
push ecx
call sub.KERNEL32.dll_CloseHandle
pop edi
pop esi
pop ebp
add esp, 0x14
ret 0xc