joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10029784
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
mov eax, dword [0x1005392c]
push ebx
push esi
push edi
push dword [ebp + 8]
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], eax
call fcn.10001cde
push 0x10
pop ecx
push 0x44
pop esi
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x74], ebx
lea edi, [ebp - 0x70]
push esi
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x74]
push ebx
push eax
call fcn.10033d50
push 0x10
lea eax, [ebp - 0x30]
push ebx
push eax
mov dword [ebp - 0x74], esi
call fcn.10033d50
mov eax, dword [ebp - 0x1c]
add esp, 0x18
cmp dword [ebp - 8], 0x10
jae 0x100297db
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x74]
push ecx
push ebx
push ebx
push ebx
push 1
push ebx
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x100297ff
cmp byte [ebp + 0xc], bl
jne 0x100297ff
xor esi, esi
jmp 0x10029802
mov esi, dword [ebp - 0x30]
push ebx
push 1
lea ecx, [ebp - 0x20]
call fcn.1000151f
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
pop ebx
call fcn.100341e0
leave
ret 8

Function at 0x1002bdf0
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 8]
or esi, 8
xor eax, eax
cmp esi, 1
je 0x1002be26
push edi
mov edx, esi
and edx, 1
shr esi, 1
mov edi, dword [ecx + esi*4]
sub edi, edx
neg edx
xor edi, edx
shr edi, 2
and edi, 0x1ff
add eax, dword [edi*4 + 0x10096248]
cmp esi, 1
jne 0x1002be00
pop edi
pop esi
ret 4

Function at 0x1002c040
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
mov dword [esp + 0x10], ecx
xor eax, eax
mov esi, 1
mov ebx, 4
lea esp, [esp]
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx + esi*4]
mov edx, edi
and edx, 1
sub ecx, edx
mov ebp, edx
neg ebp
xor ecx, ebp
shr ecx, 2
and ecx, 0x1ff
mov ebp, dword [ecx*4 + 0x10096248]
add esi, esi
shr edi, 1
add eax, ebp
or esi, edx
dec ebx
jne 0x1002c060
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4

Function at 0x1002c150
Capabilities:
Encode data using xor

Disassembly:
push edi
mov edi, dword [esp + 0xc]
xor eax, eax
test edi, edi
mov edx, 1
je 0x1002c199
push ebx
push ebp
push esi
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x14]
mov ebx, dword [ebx + edx*4]
mov ecx, esi
and ecx, 1
sub ebx, ecx
mov ebp, ecx
neg ebp
xor ebx, ebp
shr ebx, 2
and ebx, 0x1ff
mov ebp, dword [ebx*4 + 0x10096248]
add edx, edx
shr esi, 1
add eax, ebp
or edx, ecx
dec edi
jne 0x1002c167
pop esi
pop ebp
pop ebx
pop edi
ret
Function at 0x1002d9e0
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ebx
push ebp
mov eax, ecx
mov cl, byte [esp + 0x10]
push esi
xor ebp, ebp
test cl, cl
push edi
mov dword [esp + 0x10], eax
mov edi, 1
mov ebx, 8
je 0x1002da68
movzx ecx, byte [esp + 0x20]
mov dword [esp + 0x18], ecx
jmp 0x1002da10
movzx esi, byte [esp + 0x1c]
mov edx, dword [esp + 0x18]
dec ebx
movzx ecx, bl
shr esi, cl
shr edx, cl
and esi, 1
mov ecx, esi
shl ecx, 8
add ecx, edi
mov eax, dword [eax + ecx*4 + 0x400]
and edx, 1
sub eax, edx
mov ecx, edx
neg ecx
xor eax, ecx
shr eax, 2
and eax, 0x1ff
mov ecx, dword [eax*4 + 0x10096248]
add edi, edi
add ebp, ecx
or edi, edx
cmp esi, edx
jne 0x1002da60
test ebx, ebx
je 0x1002daa0
mov eax, dword [esp + 0x10]
jmp 0x1002da10
test ebx, ebx
je 0x1002daa0
mov eax, dword [esp + 0x10]
movzx edx, byte [esp + 0x20]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x18]
dec ebx
mov cl, bl
shr edx, cl
mov ecx, dword [eax + edi*4]
add edi, edi
and edx, 1
sub ecx, edx
mov esi, edx
neg esi
xor ecx, esi
shr ecx, 2
and ecx, 0x1ff
add ebp, dword [ecx*4 + 0x10096248]
or edi, edx
test ebx, ebx
jne 0x1002da71
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
pop ecx
ret 0xc
Function at 0x1002dc90
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov eax, dword [edi]
mov ebx, dword [esp + 0x20]
mov ecx, eax
shr ecx, 2
mov edx, dword [ecx*4 + 0x10096248]
mov ecx, 0x800
sub ecx, eax
shr ecx, 2
mov eax, dword [ecx*4 + 0x10096248]
mov ecx, dword [edi + 4]
mov dword [esp + 0x10], edx
mov edx, ecx
shr edx, 2
mov ebp, dword [edx*4 + 0x10096248]
mov edx, 0x800
sub edx, ecx
shr edx, 2
mov ecx, dword [edx*4 + 0x10096248]
add ebp, eax
add ecx, eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ecx
xor esi, esi
mov edi, edi
cmp esi, dword [esp + 0x24]
jae 0x1002dde4
mov eax, ebx
shl eax, 5
push esi
lea ecx, [eax + edi + 8]
call fcn.1002bdf0
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
add eax, edx
mov dword [ecx + esi*4], eax
inc esi
cmp esi, 8
jb 0x1002dcf0
cmp esi, 0x10
jae 0x1002dd8c
lea ecx, [esi - 8]
mov dword [esp + 0x20], ecx
jmp 0x1002dd30
cmp esi, dword [esp + 0x24]
jae 0x1002dde4
or ecx, 8
xor edx, edx
cmp ecx, 1
je 0x1002dd74
mov eax, ecx
shr ecx, 1
and eax, 1
lea ebp, [ecx + ebx*8]
mov ebp, dword [edi + ebp*4 + 0x208]
sub ebp, eax
neg eax
xor ebp, eax
shr ebp, 2
and ebp, 0x1ff
add edx, dword [ebp*4 + 0x10096248]
cmp ecx, 1
jne 0x1002dd44
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
add edx, ebp
mov dword [eax + esi*4], edx
inc esi
inc ecx
cmp esi, 0x10
mov dword [esp + 0x20], ecx
jb 0x1002dd30
cmp esi, dword [esp + 0x24]
jae 0x1002dde4
lea ebx, [esi - 0x10]
mov ecx, ebx
or ecx, 0x100
xor edx, edx
cmp ecx, 1
je 0x1002ddcd
mov eax, ecx
and eax, 1
shr ecx, 1
mov ebp, dword [edi + ecx*4 + 0x408]
sub ebp, eax
neg eax
xor ebp, eax
shr ebp, 2
and ebp, 0x1ff
add edx, dword [ebp*4 + 0x10096248]
cmp ecx, 1
jne 0x1002dda4
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
add edx, ecx
mov dword [eax + esi*4], edx
mov eax, dword [esp + 0x24]
inc esi
inc ebx
cmp esi, eax
jb 0x1002dd95
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0xc
Function at 0x1002e6e0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x20c
push ebx
push ebp
push esi
push edi
mov ebx, ecx
mov esi, 4
cmp esi, 0x800
jae 0x1002e702
movzx edx, byte [esi + 0x10095a40]
jmp 0x1002e72a
cmp esi, 0x200000
jae 0x1002e71b
mov eax, esi
shr eax, 0xa
movzx edx, byte [eax + 0x10095a40]
add edx, 0x14
jmp 0x1002e72a
mov ecx, esi
shr ecx, 0x14
movzx edx, byte [ecx + 0x10095a40]
add edx, 0x28
mov ecx, edx
mov eax, edx
and eax, 1
shr ecx, 1
dec ecx
or eax, 2
shl eax, cl
mov edi, esi
sub edi, eax
push edi
sub eax, edx
push ecx
lea edx, [ebx + eax*4 + 0x28b2c]
push edx
call fcn.1002c150
add esp, 0xc
mov dword [esp + esi*4 + 0x1c], eax
inc esi
cmp esi, 0x80
jb 0x1002e6f1
lea ebp, [esp + 0x1c]
sub ebp, ebx
lea edx, [ebx + 0x3329c]
sub ebp, 0x33294
lea esi, [ebx + 0x32e94]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], 4
jmp 0x1002e790
mov edx, dword [esp + 0x10]
lea esp, [esp]
mov eax, dword [ebx + 0x33ad8]
xor edi, edi
test eax, eax
jbe 0x1002e7ef
lea esp, [esp]
mov ecx, edi
or ecx, 0x40
xor edx, edx
cmp ecx, 1
je 0x1002e7dd
lea esp, [esp]
mov eax, ecx
and eax, 1
shr ecx, 1
mov ebp, dword [esi + ecx*4 - 0xa764]
sub ebp, eax
neg eax
xor ebp, eax
shr ebp, 2
and ebp, 0x1ff
add edx, dword [ebp*4 + 0x10096248]
cmp ecx, 1
jne 0x1002e7b0
mov ebp, dword [esp + 0x14]
mov dword [esi + edi*4], edx
mov eax, dword [ebx + 0x33ad8]
inc edi
cmp edi, eax
jb 0x1002e7a0
mov edx, dword [esp + 0x10]
mov ecx, dword [ebx + 0x33ad8]
mov eax, 0xe
cmp ecx, eax
jbe 0x1002e81d
mov edi, edi
mov edi, dword [esi + eax*4]
mov ecx, eax
shr ecx, 1
sub ecx, 5
shl ecx, 6
add edi, ecx
mov dword [esi + eax*4], edi
mov ecx, dword [ebx + 0x33ad8]
inc eax
cmp eax, ecx
jb 0x1002e800
mov eax, dword [esi]
mov dword [edx - 8], eax
mov ecx, dword [esi + 4]
mov dword [edx - 4], ecx
mov eax, dword [esi + 8]
mov dword [edx], eax
mov ecx, dword [esi + 0xc]
mov dword [edx + 4], ecx
mov eax, 4
add edx, 8
jmp 0x1002e840
cmp eax, 0x800
jae 0x1002e850
movzx ecx, byte [eax + 0x10095a40]
jmp 0x1002e875
cmp eax, 0x200000
mov ecx, eax
jae 0x1002e868
shr ecx, 0xa
movzx ecx, byte [ecx + 0x10095a40]
add ecx, 0x14
jmp 0x1002e875
shr ecx, 0x14
movzx ecx, byte [ecx + 0x10095a40]
add ecx, 0x28
mov ecx, dword [esi + ecx*4]
add ecx, dword [edx + ebp]
mov dword [edx], ecx
inc eax
add edx, 4
cmp eax, 0x80
jb 0x1002e840
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
sub ebp, 0x200
add ecx, 0x200
add esi, 0x100
dec eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], eax
jne 0x1002e788
pop edi
pop esi
pop ebp
mov dword [ebx + 0x33af8], 0
pop ebx
add esp, 0x20c
ret
Function at 0x10032b8a
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x1005392c]
push esi
mov dword [ebp + 0x74], eax
mov esi, ecx
call fcn.10032b5a
mov eax, 0x10000000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.10033d50
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x10032bec
cmp dword [ebp - 0x1c], 5
jb 0x10032c04
jmp 0x10032c00
cmp dword [ebp - 0x10], 1
jne 0x10032c04
cmp dword [ebp - 0x1c], 4
ja 0x10032c00
jne 0x10032c04
cmp dword [ebp - 0x18], 0
jbe 0x10032c04
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x710
mov dword [esi + 0x14], 0x100489c0
call fcn.1000109b
test eax, eax
jge 0x10032c25
mov byte [0x10054824], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
pop esi
call fcn.100341e0
add ebp, 0x78
leave
ret
Function at 0x10035388
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x100353a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1003816a
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x100353cb
test byte [esp + 8], 2
je 0x100353cb
call fcn.10038158
mov dword [eax], 0xd
call fcn.10038161
mov dword [eax], 5
jmp 0x100353a4
xor eax, eax
ret

Function at 0x1003575d
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.10035840
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x100357f8
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x10097300]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x100357f8
cmp eax, 1
je 0x10035819
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x100357f8
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x100357c5
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x100357f4
xor eax, eax
inc eax
jmp 0x10035838
cmp edi, eax
jae 0x100357fc
xor eax, eax
jmp 0x10035838
cmp eax, esi
jae 0x10035803
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x10097300]
jmp 0x1003581c
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10035a6f
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
cmp eax, 1
push esi
jne 0x10035b5f
mov eax, 0x94
call fcn.10035840
mov esi, esp
push esi
mov dword [esi], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x10035bd4
mov ecx, dword [esi + 0x10]
mov dword [0x10097300], ecx
mov eax, dword [esi + 4]
mov dword [0x1009730c], eax
mov edx, dword [esi + 8]
mov dword [0x10097310], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
cmp ecx, 2
mov dword [0x10097304], esi
je 0x10035ada
or esi, 0x8000
mov dword [0x10097304], esi
shl eax, 8
add eax, edx
push 1
mov dword [0x10097308], eax
call fcn.10038daf
test eax, eax
pop ecx
je 0x10035bd4
call fcn.10038966
test eax, eax
jne 0x10035b07
call fcn.10038e00
jmp 0x10035bd4
call fcn.1003d153
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x10098984], eax
call fcn.1003d031
mov dword [0x10097110], eax
call fcn.1003cb12
test eax, eax
jl 0x10035b58
call fcn.1003cf8f
test eax, eax
jl 0x10035b53
call fcn.1003cd5c
test eax, eax
jl 0x10035b53
push 0
call fcn.1003a9aa
test eax, eax
pop ecx
jne 0x10035b53
inc dword [0x1009710c]
jmp 0x10035be5
call fcn.1003cd10
call fcn.1003874f
jmp 0x10035afd
test eax, eax
jne 0x10035b8f
cmp dword [0x1009710c], eax
jle 0x10035bd4
dec dword [0x1009710c]
cmp dword [0x1009733c], eax
jne 0x10035b7e
call fcn.1003aae8
call fcn.1003cd10
call fcn.1003874f
call fcn.10038e00
jmp 0x10035be5
cmp eax, 2
jne 0x10035bd8
push 0x8c
push 1
call fcn.1003ca57
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x10035bd4
push esi
push dword [0x10054180]
call dword [0x100972a0]
test eax, eax
push esi
je 0x10035bce
call fcn.1003876c
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
or dword [esi + 4], 0xffffffff
mov dword [esi], eax
jmp 0x10035be5
call fcn.10033f05
pop ecx
xor eax, eax
jmp 0x10035be8
cmp eax, 3
jne 0x10035be5
push 0
call fcn.10038937
pop ecx
xor eax, eax
inc eax
lea esp, [ebp - 4]
pop esi
pop ebp
ret 0xc
Function at 0x1003aa14
Capabilities:
Terminate process

Disassembly:
push 8
push 0x100495b0
call fcn.10033db0
push 8
call fcn.10036d67
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x10097340], esi
jne 0x1003aa48
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x1009733c], esi
mov al, byte [ebp + 0x10]
mov byte [0x10097338], al
cmp dword [ebp + 0xc], edi
jne 0x1003aa92
cmp dword [0x10097708], edi
je 0x1003aa82
mov eax, dword [0x10097704]
sub eax, 4
mov dword [0x10097704], eax
cmp eax, dword [0x10097708]
jb 0x1003aa82
mov eax, dword [eax]
cmp eax, edi
je 0x1003aa63
call eax
jmp 0x1003aa63
push 0x100520ac
mov eax, 0x100520a4
call fcn.1003a992
pop ecx
push 0x100520b8
mov eax, 0x100520b0
call fcn.1003a992
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x1003aac3
cmp dword [ebp + 0x10], edi
jne 0x1003aad1
mov dword [0x10097340], esi
push dword [ebp + 8]
call fcn.1003a950
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x1003aad0
push 8
call fcn.10036cb2
pop ecx
ret
call fcn.10033deb
ret

Function at 0x1003ad90
Capabilities:
Get common file path

Disassembly:
push 0x120
push 0x100495d0
call fcn.10033db0
mov eax, dword [0x1005392c]
mov dword [ebp - 0x1c], eax
lea edi, [ebp - 0x124]
and dword [ebp - 0x128], 0
mov eax, edi
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, eax
mov dword [ebp - 0x12c], esi
cmp esi, 0x104
jle 0x1003ae34
and dword [ebp - 4], 0
lea eax, [esi + 1]
add eax, 3
and eax, 0xfffffffc
call fcn.10035840
mov dword [ebp - 0x18], esp
mov edi, esp
mov dword [ebp - 0x130], edi
jmp 0x1003ae21
or dword [ebp - 4], 0xffffffff
test esi, esi
je 0x1003ae34
push edi
inc esi
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov esi, eax
xor ebx, ebx
test esi, esi
je 0x1003ae4f
cmp byte [edi + 1], 0x3a
jne 0x1003ae4f
movzx eax, byte [edi]
push eax
call fcn.10035f7f
pop ecx
mov ebx, eax
sub ebx, 0x40
cmp dword [ebp - 0x128], 0
je 0x1003ae5f
push edi
call fcn.10033f05
pop ecx
mov eax, ebx
lea esp, [ebp - 0x13c]
mov ecx, dword [ebp - 0x1c]
call fcn.100341e0
call fcn.10033deb
ret
Function at 0x1003b1c7
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 0x1003b39b
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x10097600]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x1003b39b
test cl, 0x48
je 0x1003b232
cmp byte [eax + 5], 0xa
je 0x1003b232
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
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 0x1003b284
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x1003b26c
call fcn.10038158
mov dword [eax], 9
call fcn.10038161
mov dword [eax], esi
jmp 0x1003b27c
cmp eax, 0x6d
je 0x1003b39b
push eax
call fcn.1003816a
pop ecx
or eax, 0xffffffff
jmp 0x1003b39d
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x1003b396
test eax, eax
je 0x1003b2ab
cmp byte [ebx], 0xa
jne 0x1003b2ab
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x1003b2b4
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
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 0x1003b390
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x1003b380
cmp al, 0xd
je 0x1003b2e6
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x1003b372
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x1003b300
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x1003b2fb
add dword [ebp + 0x10], 2
jmp 0x1003b354
mov dword [ebp + 0x10], eax
jmp 0x1003b36e
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 0x1003b328
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1003b36e
cmp dword [ebp - 0xc], 0
je 0x1003b36e
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x1003b349
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x1003b354
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x1003b371
cmp ebx, dword [ebp + 0xc]
jne 0x1003b359
cmp byte [ebp - 1], 0xa
jne 0x1003b359
mov byte [ebx], 0xa
jmp 0x1003b371
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1003bd45
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x1003b372
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x1003b2ca
jmp 0x1003b390
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x1003b390
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x1003b39d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1003b6d7
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x1005392c]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x1003b708
xor eax, eax
jmp 0x1003b891
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x10097600]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x1003b744
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.10040641
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x1003b81f
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x1003b85d
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x1003b7a8
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x1003b799
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x1003b779
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1003b7e8
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x1003b7f1
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x1003b76a
jmp 0x1003b7f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x1003b88c
cmp dword [ebp - 0x6c], edi
je 0x1003b85d
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x1003b852
call fcn.10038158
mov dword [eax], 9
call fcn.10038161
mov dword [eax], esi
jmp 0x1003b887
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1003b847
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x1003b7f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x1003b7f3
push dword [ebp - 0x6c]
call fcn.1003816a
pop ecx
jmp 0x1003b887
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x1003b875
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x1003b875
xor eax, eax
jmp 0x1003b88f
call fcn.10038158
mov dword [eax], 0x1c
call fcn.10038161
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x1003b88f
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.100341e0
add ebp, 0x3a0
leave
ret
Function at 0x1003d35a
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x1005392c]
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 + 0x10054250]
je 0x1003d38f
inc eax
cmp eax, 0x13
jb 0x1003d380
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x10054250]
jne 0x1003d4b5
mov eax, dword [0x10097118]
cmp eax, 1
je 0x1003d48d
cmp eax, edx
jne 0x1003d3bf
cmp dword [0x1009711c], 1
je 0x1003d48d
cmp ecx, 0xfc
je 0x1003d4b5
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 0x1003d3f5
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.10035050
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.100330a0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x1003d429
mov eax, edi
push eax
call fcn.100330a0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x100493d4
push edi
call fcn.10035460
add esp, 0x10
push edi
call fcn.100330a0
push dword [esi + 0x10054254]
mov ebx, eax
call fcn.100330a0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.10035840
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.10035050
push edi
push ebx
call fcn.10035060
push 0x100493d0
push ebx
call fcn.10035060
push dword [esi + 0x10054254]
push ebx
call fcn.10035060
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.1003f6b9
add esp, 0x2c
jmp 0x1003d4b5
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x10054254]
push dword [esi]
call fcn.100330a0
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.100341e0
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret