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

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
cmp byte [ecx + 0x14], 0
jne 0x4449c4
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0042e974
add esp, 0x10
leave
ret 0x10
mov ecx, dword [ecx + 0x10]
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0xc]
imul eax, dword [ebp + 0x10]
mov edx, dword [ecx]
push eax
push dword [ebp + 8]
push ecx
call dword [edx + 0xc]
mov eax, dword [ebp - 4]
jmp 0x406adb

Function at 0x4082fc
Capabilities:
Hash data using djb2

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push esi
push edi
xor esi, esi
mov edx, dword [eax + 4]
mov edi, dword [eax]
add edx, edx
mov eax, 0x1505
test edx, edx
jle 0x408324
movzx ecx, byte [esi + edi]
imul eax, eax, 0x21
add eax, ecx
inc esi
cmp esi, edx
jl 0x408316
pop edi
pop esi
pop ebp
ret 4
Function at 0x41f633
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov al, byte [0x4d1353]
push ebx
push esi
push edi
mov edi, ecx
mov byte [ebp - 1], al
push 0x8000
push edi
mov esi, edx
call fcn.0042da05
pop ecx
push eax
call fcn.0042d826
cmp dword [esi + 0xc], 0xb
mov ebx, eax
pop ecx
pop ecx
je 0x45f3c6
lea ecx, [ebp - 0x18]
call fcn.0040b4b3
mov ecx, esi
call fcn.00408ed0
mov ecx, dword [esi + 8]
lea edx, [ebp - 0x18]
call fcn.0041f828
push dword [ebp - 0x18]
push 0x49d174
push edi
call fcn.0041f6d3
add esp, 0xc
mov dword [ebp - 8], eax
cmp byte [ebp - 1], 0
jne 0x45f3e6
lea ecx, [ebp - 0x18]
call fcn.0040b276
mov esi, dword [ebp - 8]
push edi
call fcn.0042de49
push edi
call fcn.0042da05
pop ecx
pop ecx
cmp ebx, 0xffffffff
jne 0x41f6c3
mov ebx, 0x4000
push ebx
push eax
call fcn.0042d826
pop ecx
pop ecx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
push edi
mov ecx, esi
call fcn.00471d85
push eax
push 1
call fcn.00471d15
push eax
call fcn.0042dc63
add esp, 0x10
mov esi, eax
jmp 0x41f6ab
mov ecx, esi
call fcn.00408ed0
mov eax, dword [esi + 8]
push dword [eax]
call dword [0x49c240]
jmp 0x41f6a0

Function at 0x43932b
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004391aa
Function at 0x469629
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov ecx, dword [ebx]
push 2
pop edx
mov esi, dword [ecx + edi]
lea eax, [ecx + 4]
mov dword [ebx], eax
xor ecx, ecx
mov dword [ebp + 8], esi
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041febb
mov ecx, dword [ebx]
add esi, esi
add ecx, edi
mov edi, eax
push esi
push ecx
push edi
call fcn.00420ed0
add dword [ebx], esi
xor eax, eax
mov ecx, dword [ebp + 8]
add esp, 0x10
mov word [esi + edi], ax
test ecx, ecx
jle 0x469684
xor word [edi + eax*2], cx
inc eax
cmp eax, ecx
jl 0x46967b
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x46e055
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov eax, ecx
xor esi, esi
mov dword [ebp - 4], eax
mov byte [0x4d138d], 0
mov ebx, edx
test edi, edi
je 0x46e0a7
mov byte [0x4d138e], 1
call dword [0x49c180]
mov dword [ebp - 0xc], eax
xor ecx, ecx
lea eax, [ebp + 0x10]
mov dword [ebp - 8], edi
push eax
push ecx
lea eax, [ebp - 0xc]
push eax
push 0x46e52f
push ecx
push ecx
call fcn.0042d308
mov esi, eax
add esp, 0x18
mov eax, dword [ebp - 4]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
push eax
call dword [0x49c704]
mov edi, eax
test esi, esi
je 0x46e0d2
push 0xffffffffffffffff
push esi
mov byte [0x4d138e], 0
call dword [0x49c16c]
push esi
call dword [0x49c360]
cmp byte [0x4d138d], 1
jne 0x46e0e0
or eax, 0xffffffff
jmp 0x46e0e2
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x471ddb
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
sub dword [0x4d06d0], 1
jne 0x471de9
call fcn.00471ec5
mov eax, dword [0x4d3004]
mov ecx, dword [eax]
add eax, 4
mov dword [0x4d3004], eax
mov eax, ecx
shr eax, 0xb
xor ecx, eax
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
shr eax, 1
ret

Function at 0x471e21
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
sub dword [0x4d06d0], 1
jne 0x471e34
call fcn.00471ec5
mov eax, dword [0x4d3004]
mov ecx, dword [eax]
add eax, 4
mov dword [0x4d3004], eax
mov eax, ecx
shr eax, 0xb
xor ecx, eax
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
mov dword [ebp - 4], eax
fild dword [ebp - 4]
jns 0x471e77
fadd qword [0x4c81b0]
fstp qword [ebp - 8]
fld qword [ebp - 8]
fmul qword [0x4c8180]
leave
ret

Function at 0x471e85
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push esi
xor esi, esi
mov dword [0x4d2640], ecx
inc esi
mov edx, esi
mov eax, dword [edx*4 + 0x4d263c]
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul eax, ecx, 0x6c078965
add eax, edx
mov dword [edx*4 + 0x4d2640], eax
inc edx
cmp edx, 0x270
jl 0x471e91
mov dword [0x4d06d0], esi
mov dword [0x4d3000], esi
pop esi
ret
Function at 0x471ec5
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [0x4d3000], 0
push esi
push edi
mov esi, 0x4d2640
jne 0x471ee8
push 0
call fcn.0042e598
pop ecx
mov ecx, eax
call fcn.00471e85
mov dword [0x4d06d0], 0x270
mov edx, 0xe3
mov dword [0x4d3004], esi
mov eax, dword [esi + 4]
mov ecx, dword [esi]
xor ecx, eax
and al, 1
and ecx, 0x7ffffffe
movzx eax, al
xor ecx, dword [esi]
shr ecx, 1
neg eax
sbb eax, eax
and eax, 0x9908b0df
xor ecx, eax
xor ecx, dword [esi + 0x634]
mov dword [esi], ecx
add esi, 4
sub edx, 1
jne 0x471efd
mov eax, dword [esi]
mov dword [ebp - 4], 0x18c
mov edi, dword [esi + 4]
mov ecx, eax
xor ecx, edi
and ecx, 0x7ffffffe
xor ecx, eax
mov eax, edi
and al, 1
shr ecx, 1
movzx eax, al
neg eax
sbb eax, eax
and eax, 0x9908b0df
xor ecx, eax
mov eax, edi
xor ecx, dword [esi - 0x38c]
sub dword [ebp - 4], 1
mov dword [esi], ecx
lea esi, [esi + 4]
jne 0x471f37
mov eax, dword [0x4d2640]
mov ecx, edi
xor ecx, eax
and al, 1
and ecx, 0x7ffffffe
movzx eax, al
xor ecx, edi
shr ecx, 1
neg eax
pop edi
sbb eax, eax
and eax, 0x9908b0df
xor ecx, eax
xor ecx, dword [esi - 0x38c]
mov dword [esi], ecx
pop esi
leave
ret

Function at 0x4723d6
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, ecx
cmp dword [esi + 0x14], 1
jne 0x4723fb
mov eax, dword [esi + 0xc]
add eax, dword [esi + 4]
push 8
push eax
lea eax, [ebp - 8]
push eax
call fcn.00420ed0
add esp, 0xc
jmp 0x47240e
push dword [esi + 0x1c]
lea eax, [ebp - 8]
push 8
push 1
push eax
call fcn.0042e974
add esp, 0x10
movzx ecx, byte [ebp - 4]
movzx eax, byte [ebp - 3]
add dword [esi + 0xc], 8
shl ecx, 8
or ecx, eax
mov byte [ebp - 4], 0
movzx eax, byte [ebp - 2]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebp - 1]
shl ecx, 8
or ecx, eax
mov eax, dword [ebp + 8]
push str.EA06
mov dword [eax], ecx
lea eax, [ebp - 8]
push eax
call fcn.0042ea30
neg eax
pop ecx
pop ecx
sbb eax, eax
neg eax
pop esi
leave
ret 4

Function at 0x472512
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ecx
mov eax, 0x10000
mov ecx, dword [esi + 0x464]
test ecx, ecx
je 0x472528
cmp ecx, eax
jne 0x472544
push dword [esi + 0x1c]
push eax
push 1
push dword [esi + 0x45c]
call fcn.0042e974
add esp, 0x10
xor ecx, ecx
mov dword [esi + 0x464], ecx
mov eax, dword [esi + 0x45c]
mov al, byte [ecx + eax]
inc ecx
mov dword [esi + 0x464], ecx
pop esi
ret

Function at 0x472556
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov al, byte [ebp + 8]
push esi
push edi
mov edi, ecx
mov edx, dword [edi + 0x460]
mov esi, dword [edi + 0x458]
mov byte [esi + edx], al
mov eax, 0x10000
inc dword [edi + 0x460]
cmp dword [edi + 0x460], eax
jne 0x47259d
push dword [edi + 0x20]
push eax
push 1
push dword [edi + 0x458]
call fcn.0042dc63
add esp, 0x10
and dword [edi + 0x460], 0
pop edi
pop esi
pop ebp
ret 4
Function at 0x4725a3
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0x460]
test eax, eax
je 0x4725cb
push dword [esi + 0x20]
push eax
push 1
push dword [esi + 0x458]
call fcn.0042dc63
add esp, 0x10
and dword [esi + 0x460], 0
pop esi
ret

Function at 0x47277d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe0
push ebx
push esi
push edi
mov edi, ecx
mov ebx, edx
lea ecx, [ebp - 0xdc]
call fcn.004725cd
push dword [ebp + 8]
lea ecx, [ebp - 0xdc]
call fcn.00472611
xor esi, esi
test ebx, ebx
je 0x4727c1
push ecx
push ecx
lea ecx, [ebp - 0xdc]
call fcn.00472751
xor byte [esi + edi], al
inc esi
cmp esi, ebx
jb 0x4727ac
pop edi
pop esi
pop ebx
leave
ret
Function at 0x47ccc3
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
push ebx
push esi
mov esi, ecx
push edi
push 0x4c6a98
push dword [esi + 0x34]
call fcn.0042e69b
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x47ccef
mov dword [esi + 0x18], 0x1f
jmp 0x47cd69
xor ebx, ebx
inc ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 4]
push eax
push 0x400
lea eax, [ebp - 0x404]
push eax
push dword [ebp + 8]
call dword [0x49c7bc]
test eax, eax
je 0x47cd62
cmp dword [ebp - 4], 0
je 0x47cd3a
push edi
push ebx
push dword [ebp - 4]
lea eax, [ebp - 0x404]
push eax
call fcn.0042dc63
mov eax, dword [ebp - 4]
add esp, 0x10
add dword [esi + 8], eax
adc dword [esi + 0xc], 0
test eax, eax
jne 0x47ccf5
mov eax, dword [esi + 8]
or eax, dword [esi + 0xc]
jne 0x47cd4b
mov dword [esi + 0x18], 0x21
jmp 0x47cd69
and dword [esi + 0x18], 0
mov eax, dword [esi + 0xd4]
test eax, eax
je 0x47cd85
push eax
call dword [0x49c2cc]
jmp 0x47cd85
mov dword [esi + 0x18], 0x20
call dword [0x49c330]
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0xd4]
test eax, eax
je 0x47cd83
push eax
call dword [0x49c2cc]
xor bl, bl
test edi, edi
je 0x47cd90
push edi
call fcn.0042e728
pop ecx
pop edi
pop esi
mov al, bl
pop ebx
leave
ret 4

Function at 0x47d087
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
cmp byte [esi + 0xd0], 0
je 0x47d0c3
cmp byte [ebp + 8], 0
je 0x47d0c3
sub esp, 0x10
lea ecx, [esi + 0xd4]
call fcn.0047bf97
push esi
push 0
push 0x47d157
call fcn.0042d27c
add esp, 0xc
cmp dword [esi + 0x18], 0
sete al
jmp 0x47d0cb
push dword [ebp + 8]
call fcn.0047c1e3
pop esi
pop ebp
ret 4

Function at 0x482358
Capabilities:
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 0xc]
or edx, 0xffffffff
push ebx
push esi
mov esi, dword [ebp + 8]
add eax, esi
mov dword [ebp + 8], eax
mov eax, dword [ebp + 0x10]
mov ebx, eax
imul ebx, dword [ebp + 0x14]
push edi
mov edi, esi
lea eax, [esi + eax*4]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x14]
shl ebx, 2
shl eax, 2
mov dword [ebp + 0xc], eax
movzx eax, byte [esi + 2]
movzx ecx, dl
xor ecx, eax
shr edx, 8
movzx eax, byte [esi + 1]
xor edx, dword [ecx*4 + 0x4c3660]
movzx ecx, dl
xor ecx, eax
shr edx, 8
movzx eax, byte [esi]
add esi, ebx
xor edx, dword [ecx*4 + 0x4c3660]
movzx ecx, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x4c3660]
cmp esi, dword [ebp + 8]
jb 0x4823cf
add edi, dword [ebp + 0xc]
mov esi, edi
cmp edi, dword [ebp + 0x10]
jb 0x48238b
not edx
mov dword [ebp + 8], edx
fild dword [ebp + 8]
test edx, edx
jns 0x4823e6
fadd qword [0x4c81b0]
pop edi
fstp qword [ebp - 8]
fld qword [ebp - 8]
pop esi
pop ebx
leave
ret 0x10
Function at 0x403b90
Capabilities:
Get common file path

Disassembly:
sub esp, 0x410
lea eax, [esp]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ecx, [esp + 0x208]
push ecx
push 0
push str.ulcv
lea edx, [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [esp + 0x208]
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
add esp, 0x410
ret

Function at 0x404bb0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x198
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push esi
push edi
mov edi, 0x4151f8
jmp 0x404bd0
lea eax, [esp + 0x18]
push str._SoftwareSybaseAdaptive_Server_Anywhere_
push eax
call fcn.00406480
lea ecx, [esp + 0x20]
push 0x412010
push ecx
call fcn.00406456
mov edx, dword [esp + 0x1bc]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.00406456
mov eax, dword [edi]
add esp, 0x18
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x24]
push edx
push eax
call ebx
test eax, eax
jne 0x404c61
mov edx, dword [esp + 0x1b4]
lea ecx, [esp + 0x1b8]
push ecx
mov ecx, dword [esp + 0x1b4]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
push 0
push ecx
push edx
call ebp
mov esi, eax
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x404c61
mov ecx, dword [esp + 0x1bc]
cmp dword [esp + 0x14], ecx
je 0x404c7d
add edi, 4
cmp edi, str.none
jl 0x404bd0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x198
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x198
ret

Function at 0x4052b0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
push eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x4052ce
mov eax, esi
pop esi
ret
mov byte [esi], 0
xor eax, eax
pop esi
ret
Function at 0x4052e0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xd0
push ebx
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push esi
push edi
mov ebx, 0x4165d8
jmp 0x405300
mov ecx, 0xa
mov esi, str.SoftwareSybaseAdaptive_Server_Anywhere
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x18]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405316
mov ax, word [0x413340]
mov word [edi], ax
mov eax, dword [esp + 0xe4]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405330
lea edi, [esp + 0x18]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x405340
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebx]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push 0
lea edx, [esp + 0x24]
push edx
push eax
call ebp
test eax, eax
jne 0x4053ba
mov edx, dword [esp + 0xec]
lea ecx, [esp + 0xf0]
push ecx
mov ecx, dword [esp + 0xec]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x4053ba
mov ecx, dword [esp + 0xf4]
cmp dword [esp + 0x14], ecx
je 0x4053d6
add ebx, 4
cmp ebx, 0x4165e0
jl 0x405300
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd0
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xd0
ret

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x406353
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00407713
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x406376
test byte [esp + 8], 2
je 0x406376
call fcn.00407701
mov dword [eax], 0xd
call fcn.0040770a
mov dword [eax], 5
jmp 0x40634f
xor eax, eax
ret

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x406d54
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00407713
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x406d77
test byte [esp + 8], 2
je 0x406d77
call fcn.00407701
mov dword [eax], 0xd
call fcn.0040770a
mov dword [eax], 5
jmp 0x406d50
xor eax, eax
ret
Function at 0x407239
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x4073ff
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4181a0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x4073ff
test cl, 0x48
je 0x40729f
mov al, byte [eax + 5]
cmp al, 0xa
je 0x40729f
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4072f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x4072d9
call fcn.00407701
mov dword [eax], 9
call fcn.0040770a
mov dword [eax], esi
jmp 0x4072e9
cmp eax, 0x6d
je 0x4073ff
push eax
call fcn.00407713
pop ecx
or eax, 0xffffffff
jmp 0x407401
mov eax, dword [edi]
mov edx, dword [ebp - 0xc]
add dword [ebp - 8], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x4073fa
test edx, edx
je 0x407314
cmp byte [ebx], 0xa
jne 0x407314
or al, 4
jmp 0x407316
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x4073f4
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x4073e4
cmp al, 0xd
je 0x40734a
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x4073d6
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x407364
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40735f
add dword [ebp + 0x10], 2
jmp 0x4073b8
mov dword [ebp + 0x10], eax
jmp 0x4073d2
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
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 0x40738c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4073d2
cmp dword [ebp - 0xc], 0
je 0x4073d2
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x4073ad
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x4073b8
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x4073d5
cmp ebx, dword [ebp + 0xc]
jne 0x4073bd
cmp byte [ebp - 1], 0xa
jne 0x4073bd
mov byte [ebx], 0xa
jmp 0x4073d5
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040bacd
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x4073d6
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40732e
jmp 0x4073f4
mov eax, dword [edi]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x4073f4
or al, 2
mov byte [esi], al
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x407401
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4074b1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x416b10]
xor eax, dword [ebp + 4]
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
jne 0x4074da
xor eax, eax
jmp 0x407648
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x4181a0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40750d
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.00406e98
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x4075df
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
jbe 0x40761a
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x420]
mov dword [ebp - 0xc], edi
cmp ecx, dword [ebp + 0x10]
jae 0x407568
mov edx, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x407559
inc dword [ebp - 0x18]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0xc]
mov byte [eax], dl
inc eax
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x400
jl 0x40753c
mov edi, eax
lea eax, [ebp - 0x420]
sub edi, eax
push 0
lea eax, [ebp - 0x1c]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4075a8
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], eax
cmp eax, edi
jl 0x4075b1
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x40752d
jmp 0x4075b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
cmp eax, edi
jne 0x407643
cmp dword [ebp - 8], edi
je 0x40761a
push 5
pop esi
cmp dword [ebp - 8], esi
jne 0x40760c
call fcn.00407701
mov dword [eax], 9
call fcn.0040770a
mov dword [eax], esi
jmp 0x407615
push edi
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x407601
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x4075b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x4075b3
push dword [ebp - 8]
call fcn.00407713
pop ecx
or eax, 0xffffffff
jmp 0x407646
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40762f
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x40762f
xor eax, eax
jmp 0x407646
call fcn.00407701
mov dword [eax], 0x1c
call fcn.0040770a
mov dword [eax], edi
jmp 0x407615
sub eax, dword [ebp - 0x18]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
call fcn.00409959
leave
ret