joyce8/EMBER2024-capa huggingface dataset:
Function at 0x416b60
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x9c4
mov eax, dword [0x425028]
xor eax, esp
mov dword [esp + 0x9c0], eax
mov eax, dword [str.none]
push ebx
push ebp
mov ebp, dword [sym.imp.MSVCR80.dll_wcscpy_s]
push esi
push edi
mov edi, dword [esp + 0x9d8]
mov dword [esp + 0x18], eax
mov ax, word [0x41b808]
push str.none
mov esi, edx
mov edx, dword [0x41b804]
mov word [esp + 0x24], ax
xor eax, eax
push 0x64
push ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x28], edx
mov dword [esp + 0x2e], eax
mov dword [esp + 0x32], eax
mov dword [esp + 0x36], eax
mov dword [esp + 0x3a], eax
mov dword [esp + 0x3e], eax
mov dword [esp + 0x42], eax
mov dword [esp + 0x46], eax
mov word [esp + 0x4a], ax
call ebp
push str.none
push 0xc8
push edi
call ebp
add esp, 0x18
cmp dword [esp + 0x9dc], 1
lea ebx, [esp + 0x1d0]
jne 0x416c02
call fcn.004016a0
jmp 0x416c0c
push 0x200
call fcn.00401580
test al, al
je 0x416d12
push 0
lea ecx, [esp + 0x5d4]
push ecx
push 0x200
push 0
lea edi, [esi + 0x12c]
push edi
lea edx, [esp + 0x1e4]
push edx
call dword [sym.imp.kernel32.dll_SearchPathW]
test eax, eax
je 0x416d0b
push edi
lea eax, [esp + 0x1d4]
push 0x200
push eax
call dword [sym.imp.MSVCR80.dll_wcscat_s]
mov ebx, dword [sym.imp.kernel32.dll_GetPrivateProfileStringW]
add esp, 0xc
lea ecx, [esp + 0x1d0]
push ecx
push 0x64
lea edx, [esp + 0x110]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esi + 0x190]
push ecx
lea edi, [esi + 0x64]
push edi
call ebx
lea edx, [esp + 0x1d0]
push edx
push 0x64
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x24]
push ecx
add esi, 0x1c2
push esi
push edi
call ebx
lea ecx, [esp + 0x18]
lea eax, [esp + 0x40]
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x416cd6
test dx, dx
je 0x416cd2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x416cd6
add eax, 4
add ecx, 4
test dx, dx
jne 0x416cb0
xor eax, eax
jmp 0x416cdb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x416d0b
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x108]
push edx
push 0x64
push eax
call ebp
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x4c]
push ecx
push 0xc8
push edx
call ebp
add esp, 0x18
mov eax, 1
jmp 0x416d17
mov eax, 3
jmp 0x416d17
mov eax, 5
mov ecx, dword [esp + 0x9d0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00417909
add esp, 0x9c4
ret 8
Function at 0x416d40
Capabilities:
Set file attributes

Disassembly:
sub esp, 0x408
mov eax, dword [0x425028]
xor eax, esp
mov dword [esp + 0x404], eax
mov eax, dword [esp + 0x410]
push ebx
push ebp
mov ebp, dword [esp + 0x414]
push esi
push edi
mov edi, ecx
cmp edi, 1
mov esi, edx
mov dword [esp + 0x10], eax
lea ebx, [esp + 0x14]
jne 0x416d7e
call fcn.004016a0
jmp 0x416d88
push 0x200
call fcn.00401580
test al, al
je 0x416def
lea ecx, [esi + 0x12c]
push ecx
lea edx, [esp + 0x18]
push 0x200
push edx
call dword [sym.imp.MSVCR80.dll_wcscat_s]
add esp, 0xc
cmp edi, 1
je 0x416dbb
push 0x80
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.kernel32.dll_SetFileAttributesW]
mov ebx, dword [sym.imp.kernel32.dll_WritePrivateProfileStringW]
lea ecx, [esp + 0x14]
push ecx
push ebp
lea edx, [esi + 0x190]
push edx
lea edi, [esi + 0x64]
push edi
call ebx
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push ecx
add esi, 0x1c2
push esi
push edi
call ebx
test eax, eax
setne al
jmp 0x416df1
xor al, al
mov ecx, dword [esp + 0x414]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00417909
add esp, 0x408
ret 8

Function at 0x417909
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x425028]
jne 0x417913
repz ret
jmp fcn.00417e04
Function at 0x445ae0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + 0x3c]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
add ecx, 0xf8
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + 0x78]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0xc]
add edx, dword [ecx + 0x20]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0x24]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + 0x1c]
mov dword [ebp - 8], eax
mov dword [ebp - 0x24], 0
jmp 0x445b4c
mov ecx, dword [ebp - 0x24]
add ecx, 1
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x24]
cmp eax, dword [edx + 0x18]
jae 0x445b93
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + ecx*4]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call fcn.0049425e
add esp, 8
test eax, eax
jne 0x445b91
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
movzx edx, word [ecx + eax*2]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + edx*4]
mov eax, ecx
jmp 0x445b95
jmp 0x445b43
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x46a9f0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c3277
mov eax, dword fs:[0]
push eax
push ecx
mov eax, dword [0x4e98d0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
mov ecx, dword [ebp - 0x10]
add ecx, 0x44
call fcn.00469930
mov dword [ebp - 4], 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, 0xa4
call fcn.00469930
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
push edx
mov ecx, dword [ebp - 0x10]
add ecx, 0x104
call fcn.00469930
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x10]
mov dword [eax], 0x44
mov ecx, dword [ebp - 0x10]
add ecx, 0x44
call fcn.0046a2f0
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 0x10]
add ecx, 0xa4
call fcn.0046a2f0
mov edx, dword [ebp - 0x10]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x10]
add ecx, 0x104
call fcn.0046a2f0
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
mov dword [edx + 0x10], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
mov dword [edx + 0x14], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov dword [edx + 0x18], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1c]
mov dword [edx + 0x1c], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x20]
mov dword [edx + 0x20], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x24]
mov dword [edx + 0x24], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x28]
mov dword [edx + 0x28], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x2c]
mov dword [edx + 0x2c], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov cx, word [eax + 0x30]
mov word [edx + 0x30], cx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov cx, word [eax + 0x32]
mov word [edx + 0x32], cx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x38]
mov dword [edx + 0x38], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
mov dword [edx + 0x3c], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x40]
mov dword [edx + 0x40], ecx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 4
Function at 0x46acc0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c3367
mov eax, dword fs:[0]
push eax
push ecx
mov eax, dword [0x4e98d0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
mov ecx, dword [ebp - 0x10]
add ecx, 0x44
call fcn.00469860
mov dword [ebp - 4], 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, 0xa4
call fcn.00469860
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
push edx
mov ecx, dword [ebp - 0x10]
add ecx, 0x104
call fcn.00469860
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x10]
mov dword [eax], 0x44
mov ecx, dword [ebp - 0x10]
add ecx, 0x44
call fcn.0046a310
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 0x10]
add ecx, 0xa4
call fcn.0046a310
mov edx, dword [ebp - 0x10]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x10]
add ecx, 0x104
call fcn.0046a310
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
mov dword [edx + 0x10], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
mov dword [edx + 0x14], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov dword [edx + 0x18], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1c]
mov dword [edx + 0x1c], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x20]
mov dword [edx + 0x20], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x24]
mov dword [edx + 0x24], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x28]
mov dword [edx + 0x28], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x2c]
mov dword [edx + 0x2c], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov cx, word [eax + 0x30]
mov word [edx + 0x30], cx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov cx, word [eax + 0x32]
mov word [edx + 0x32], cx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x38]
mov dword [edx + 0x38], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
mov dword [edx + 0x3c], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x40]
mov dword [edx + 0x40], ecx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 4
Function at 0x4ba78b
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [edi + 0x2c]
push esi
mov esi, dword [edi + 0x3c]
sub esi, dword [edi + 0x74]
mov eax, dword [edi + 0x6c]
mov ecx, dword [edi + 0x2c]
lea ecx, [ebx + ecx - 0x106]
sub esi, eax
cmp eax, ecx
jb 0x4ba810
mov eax, dword [edi + 0x38]
push ebx
lea ecx, [eax + ebx]
push ecx
push eax
call fcn.00495870
mov eax, dword [edi + 0x4c]
mov ecx, dword [edi + 0x44]
sub dword [edi + 0x70], ebx
sub dword [edi + 0x6c], ebx
add esp, 0xc
sub dword [edi + 0x5c], ebx
mov dword [ebp - 4], eax
lea eax, [ecx + eax*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edx, ecx
sub edx, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, edx
dec dword [ebp - 4]
mov word [eax], cx
jne 0x4ba7d3
mov eax, dword [edi + 0x40]
mov dword [ebp - 4], ebx
lea eax, [eax + ebx*2]
dec eax
dec eax
movzx ecx, word [eax]
mov edx, ecx
sub edx, ebx
cmp ecx, ebx
sbb ecx, ecx
not ecx
and ecx, edx
dec dword [ebp - 4]
mov word [eax], cx
jne 0x4ba7f5
add esi, ebx
mov eax, dword [edi]
cmp dword [eax + 4], 0
je 0x4ba86b
mov ecx, dword [edi + 0x74]
add ecx, dword [edi + 0x6c]
push esi
add ecx, dword [edi + 0x38]
mov esi, eax
push ecx
call fcn.004ba4db
add dword [edi + 0x74], eax
mov esi, dword [edi + 0x74]
cmp esi, 3
pop ecx
pop ecx
jb 0x4ba857
mov eax, dword [edi + 0x6c]
mov ecx, dword [edi + 0x38]
lea edx, [eax + ecx]
movzx eax, byte [edx]
mov ecx, dword [edi + 0x58]
mov dword [edi + 0x48], eax
shl eax, cl
movzx ecx, byte [edx + 1]
xor eax, ecx
and eax, dword [edi + 0x54]
mov dword [edi + 0x48], eax
cmp esi, 0x106
jae 0x4ba86b
mov eax, dword [edi]
cmp dword [eax + 4], 0
jne 0x4ba794
pop esi
pop ebx
leave
ret
Function at 0x404c1a
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x40d4a0
call fcn.00405fd0
mov edi, 0x94
mov eax, edi
call fcn.00403ac0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x411074], ecx
mov eax, dword [esi + 4]
mov dword [0x411080], eax
mov edx, dword [esi + 8]
mov dword [0x411084], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x411078], esi
cmp ecx, 2
je 0x404c7a
or esi, 0x8000
mov dword [0x411078], esi
shl eax, 8
add eax, edx
mov dword [0x41107c], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x404cb3
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x404cb3
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x404ccb
cmp eax, 0x20b
je 0x404cb8
mov dword [ebp - 0x1c], edi
jmp 0x404cdf
cmp dword [ecx + 0x84], 0xe
jbe 0x404cb3
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x404cd9
cmp dword [ecx + 0x74], 0xe
jbe 0x404cb3
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push edi
call fcn.00406198
pop ecx
test eax, eax
jne 0x404d0b
cmp dword [0x4110c0], 2
je 0x404cf8
call fcn.004095df
push 0x1c
call fcn.00409468
push 0xff
call fcn.004048e6
pop ecx
pop ecx
call fcn.00409304
mov dword [ebp - 4], edi
call fcn.00408493
test eax, eax
jge 0x404d24
push 0x1b
call fcn.00404bf5
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x4127c4], eax
call fcn.00409a5e
mov dword [0x4110b8], eax
call fcn.004099bc
test eax, eax
jge 0x404d4a
push 8
call fcn.00404bf5
pop ecx
call fcn.00409789
test eax, eax
jge 0x404d5b
push 9
call fcn.00404bf5
pop ecx
push 1
call fcn.00404916
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x404d71
push eax
call fcn.00404bf5
pop ecx
mov eax, dword [0x411094]
mov dword [0x411098], eax
push eax
push dword [0x41108c]
push dword [0x411088]
call fcn.00401c60
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x1c], edi
jne 0x404da0
push esi
call fcn.00404a41
call fcn.00404a63
jmp 0x404dd2
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.0040600b
ret
Function at 0x407ef6
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x412680]
push edi
jae 0x4080cb
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x4126a0]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x4080cb
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x407fa1
test dl, 2
jne 0x407fa1
test dl, 0x48
je 0x407f6b
cmp byte [eax + 5], 0xa
je 0x407f6b
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407fb4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x407f9c
mov dword [0x41106c], ecx
jmp 0x4080d2
cmp eax, 0x6d
jne 0x407fa8
xor eax, eax
jmp 0x4080df
push eax
call fcn.00408434
pop ecx
jmp 0x4080dc
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x4080c6
test eax, eax
je 0x407fdb
cmp byte [ebx], 0xa
jne 0x407fdb
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x407fe4
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x4080c0
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x4080b0
cmp al, 0xd
je 0x408016
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x4080a2
dec ecx
cmp dword [ebp - 8], ecx
jae 0x408030
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x40802b
add dword [ebp - 8], 2
jmp 0x408084
mov dword [ebp - 8], eax
jmp 0x40809e
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x408058
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40809e
cmp dword [ebp - 0x10], 0
je 0x40809e
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x408079
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x408084
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x4080a1
cmp ebx, dword [ebp + 0xc]
jne 0x408089
cmp byte [ebp - 1], 0xa
jne 0x408089
mov byte [ebx], 0xa
jmp 0x4080a1
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040863e
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x4080a2
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x407ffa
jmp 0x4080c0
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x4080c0
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x4080df
and dword [0x41106c], 0
mov dword [0x411068], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408cb8
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x412680]
mov eax, dword [0x410200]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x408e7e
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x4126a0]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x408e7e
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x408d22
xor eax, eax
jmp 0x408e92
test al, 0x20
je 0x408d33
push 2
push edi
push edi
push ecx
call fcn.0040a8b7
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x408e08
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x408e4f
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x408d95
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x408d86
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x408d68
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x408dd5
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x408de1
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x408d5c
jmp 0x408de3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x408e79
cmp dword [ebp + 0x3a4], edi
je 0x408e4f
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x408e41
mov dword [0x41106c], eax
jmp 0x408e85
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x408e33
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x408de3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x408de3
push dword [ebp + 0x3a4]
call fcn.00408434
pop ecx
jmp 0x408e8f
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x408e67
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x408d1b
mov dword [0x411068], 0x1c
mov dword [0x41106c], edi
jmp 0x408e8f
sub eax, dword [ebp - 0x7c]
jmp 0x408e92
and dword [0x41106c], 0
mov dword [0x411068], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00403b2e
add ebp, 0x39c
leave
ret
Function at 0x409468
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x410200]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4106b0]
je 0x40949d
inc eax
cmp eax, 0x13
jb 0x40948e
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4106b0]
jne 0x4095c3
mov eax, dword [0x4110c0]
cmp eax, 1
je 0x40959b
cmp eax, edx
jne 0x4094cd
cmp dword [0x410284], 1
je 0x40959b
cmp ecx, 0xfc
je 0x4095c3
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x409503
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00408bc0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00404e00
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x409537
mov eax, edi
push eax
call fcn.00404e00
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40dbe4
push edi
call fcn.00404640
add esp, 0x10
push edi
call fcn.00404e00
push dword [esi + 0x4106b4]
mov ebx, eax
call fcn.00404e00
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00403ac0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00408bc0
push edi
push ebx
call fcn.00408bd0
push 0x40dbe0
push ebx
call fcn.00408bd0
push dword [esi + 0x4106b4]
push ebx
call fcn.00408bd0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040a142
add esp, 0x2c
jmp 0x4095c3
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4106b4]
push dword [esi]
call fcn.00404e00
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]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00403b2e
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40b5b8
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00403ac0
mov eax, dword [0x410200]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x412680]
mov dword [ebp - 4], eax
jae 0x40b6fb
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x4126a0]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x40b6fb
push 1
push esi
push ebx
call fcn.0040863e
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x1008], eax
je 0x40b705
push 2
push esi
push ebx
call fcn.0040863e
add esp, 0xc
cmp eax, 0xffffffff
je 0x40b705
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x40b6a5
push 0x1000
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00405f70
push 0x8000
push ebx
call fcn.0040be81
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x40b664
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
call fcn.00408cb8
add esp, 0xc
cmp eax, 0xffffffff
je 0x40b682
sub edi, eax
test edi, edi
jg 0x40b659
jmp 0x40b698
cmp dword [0x41106c], 5
jne 0x40b695
mov dword [0x411068], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0040be81
pop ecx
pop ecx
jmp 0x40b6e5
jge 0x40b6e5
push 0
push dword [ebp + 0xc]
push ebx
call fcn.0040863e
push ebx
call fcn.0040a554
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, 0xffffffff
jne 0x40b6e5
mov dword [0x411068], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x41106c], eax
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.0040863e
add esp, 0xc
mov eax, esi
pop edi
jmp 0x40b708
mov dword [0x411068], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.00403b2e
leave
ret