joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10053c0
Capabilities:
Accept command line arguments
Parse pe header

Disassembly:
push 0x18
push 0x10027d0
call fcn.01005c28
mov edi, 0x94
mov eax, edi
call fcn.01005b50
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 [0x1012228], ecx
mov eax, dword [esi + 4]
mov dword [0x1012234], eax
mov edx, dword [esi + 8]
mov dword [0x1012238], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x101222c], esi
cmp ecx, 2
je 0x1005420
or esi, 0x8000
mov dword [0x101222c], esi
shl eax, 8
add eax, edx
mov dword [0x1012230], eax
cmp word [0x1000000], 0x5a4d
jne 0x100545d
mov eax, dword [0x100003c]
cmp dword [eax + 0x1000000], 0x4550
jne 0x100545d
movzx ecx, word [eax + 0x1000018]
cmp ecx, 0x10b
je 0x1005476
cmp ecx, 0x20b
je 0x1005463
and dword [ebp - 0x1c], 0
jmp 0x100548d
cmp dword [eax + 0x1000084], 0xe
jbe 0x100545d
xor ecx, ecx
cmp dword [eax + 0x10000f8], ecx
jmp 0x1005487
cmp dword [eax + 0x1000074], 0xe
jbe 0x100545d
xor ecx, ecx
cmp dword [eax + 0x10000e8], ecx
setne cl
mov dword [ebp - 0x1c], ecx
push 1
call fcn.0100709f
pop ecx
test eax, eax
jne 0x10054a1
push 0x1c
call fcn.01005392
pop ecx
call fcn.01007011
test eax, eax
jne 0x10054b2
push 0x10
call fcn.01005392
pop ecx
and dword [ebp - 4], 0
call fcn.01006d5b
test eax, eax
jge 0x10054c7
push 0x1b
call fcn.01005363
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x1013ac4], eax
call fcn.01006c2e
mov dword [0x1012214], eax
call fcn.01006b85
test eax, eax
jge 0x10054ed
push 8
call fcn.01005363
pop ecx
call fcn.0100692b
test eax, eax
jge 0x10054fe
push 9
call fcn.01005363
pop ecx
call fcn.0100643d
mov dword [ebp - 0x24], eax
test eax, eax
je 0x1005511
push eax
call fcn.01005363
pop ecx
mov eax, dword [0x1012248]
mov dword [0x101224c], eax
push eax
push dword [0x1012240]
push dword [0x101223c]
call fcn.01005012
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x1c], 0
jne 0x1005541
push esi
call fcn.0100652e
call fcn.01006566
jmp 0x1005573
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.01005c63
ret
Function at 0x1006595
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x1011660]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x10118f0]
je 0x10065bf
inc eax
cmp eax, 0x12
jb 0x10065b0
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x10118f0]
mov dword [ebp - 0x110], esi
jne 0x100676a
mov eax, dword [0x101221c]
cmp eax, 1
je 0x1006738
test eax, eax
jne 0x10065f5
cmp dword [0x1011668], 1
je 0x1006738
cmp ecx, 0xfc
je 0x100676a
push 0x104
lea eax, [ebp - 0x10c]
push eax
push 0
mov byte [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1006630
push 5
pop ecx
mov esi, 0x1002bb4
lea edi, [ebp - 0x10c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebx, [ebp - 0x10c]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100663b
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x1006673
lea eax, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1006653
sub eax, edx
push 3
lea ebx, [ebp + eax - 0x147]
push 0x1002bb0
push ebx
call fcn.01009f60
add esp, 0xc
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1006678
sub eax, edx
mov ecx, eax
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 0x10118f4]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1006692
sub eax, esi
lea eax, [eax + ecx + 0x1c]
add eax, 3
and eax, 0xfffffffc
call fcn.01005b50
mov edx, esp
push 6
pop ecx
mov esi, 0x1002b94
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
movsw word es:[edi], word [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10066be
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10066ca
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10066e3
mov eax, dword [ebp - 0x110]
mov esi, 0x1002b90
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [eax + 0x10118f4]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1006701
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x100670d
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push 0x1002b68
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.01009e53
add esp, 0xc
jmp 0x100676a
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x100676a
mov esi, dword [esi + 0x10118f4]
mov ecx, esi
lea edx, [ecx + 1]
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x100674f
push 0
sub ecx, edx
lea edx, [ebp - 0x114]
push edx
push ecx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x120]
mov ecx, dword [ebp - 4]
call fcn.0100524b
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1006c2e
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x1012378]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push edi
xor ebx, ebx
xor edi, edi
cmp eax, ebx
jne 0x1006c7a
call esi
mov edi, eax
cmp edi, ebx
je 0x1006c60
mov dword [0x1012378], 1
jmp 0x1006c7f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x1006c75
push 2
pop eax
mov dword [0x1012378], eax
jmp 0x1006c7a
mov eax, dword [0x1012378]
cmp eax, 1
jne 0x1006cf7
cmp edi, ebx
jne 0x1006c8b
call esi
mov edi, eax
cmp edi, ebx
je 0x1006d00
cmp word [edi], bx
mov eax, edi
je 0x1006ca0
inc eax
inc eax
cmp word [eax], bx
jne 0x1006c92
inc eax
inc eax
cmp word [eax], bx
jne 0x1006c92
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push ebx
push ebx
sub eax, edi
push ebx
sar eax, 1
inc eax
push eax
push edi
push ebx
push ebx
mov dword [ebp - 0xc], eax
call esi
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x1006cee
push eax
call fcn.0100598c
cmp eax, ebx
pop ecx
mov dword [ebp - 4], eax
je 0x1006cee
push ebx
push ebx
push dword [ebp - 8]
push eax
push dword [ebp - 0xc]
push edi
push ebx
push ebx
call esi
test eax, eax
jne 0x1006ceb
push dword [ebp - 4]
call fcn.0100582a
pop ecx
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1006d4f
cmp eax, 2
je 0x1006d04
cmp eax, ebx
je 0x1006d04
xor eax, eax
jmp 0x1006d51
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x1006d00
cmp byte [esi], bl
je 0x1006d21
inc eax
cmp byte [eax], bl
jne 0x1006d17
inc eax
cmp byte [eax], bl
jne 0x1006d17
sub eax, esi
inc eax
mov edi, eax
push edi
call fcn.0100598c
cmp eax, ebx
pop ecx
je 0x1006d48
mov ecx, edi
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 4]
mov ebx, eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1006f9e
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov edi, edi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x1011a2c]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x1007000
push 0x88
push 1
call fcn.01005d82
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x1006ff8
push esi
push dword [0x1011a2c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x1006ff8
push esi
call fcn.01006f81
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
or dword [esi + 4], 0xffffffff
mov dword [esi], eax
jmp 0x1007000
push 0x10
call fcn.01005363
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
mov eax, esi
pop esi
ret
Function at 0x1007011
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
call fcn.01007322
test eax, eax
je 0x100702a
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x1011a2c], eax
jne 0x1007032
call fcn.01006f5e
xor eax, eax
ret
push esi
push 0x88
push 1
call fcn.01005d82
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x1007072
push esi
push dword [0x1011a2c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x1007072
push esi
call fcn.01006f81
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
or dword [esi + 4], 0xffffffff
mov dword [esi], eax
xor eax, eax
inc eax
pop esi
ret
call fcn.01006f5e
xor eax, eax
pop esi
ret
Function at 0x10090b6
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x10090e7
mov eax, dword fs:[4]
mov dword [ebp + 8], eax
mov eax, dword fs:[8]
mov dword [ebp - 4], eax
cmp ebx, dword [ebp - 4]
jb 0x10090ee
cmp ebx, dword [ebp + 8]
jae 0x10090ee
xor eax, eax
jmp 0x10092de
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x10090ff
xor eax, eax
inc eax
jmp 0x10092dd
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x1009115
cmp ecx, edx
jae 0x100925a
cmp dword [eax + 4], 0
je 0x100911e
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x1009106
cmp dword [ebp + 8], 0
je 0x1009140
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x100925a
cmp eax, esi
jae 0x100925a
mov eax, dword [0x10124f0]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x1009165
cmp dword [esi*4 + 0x10124f8], edi
je 0x100925e
inc esi
cmp esi, eax
jl 0x1009153
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x10092da
cmp dword [ebp - 8], 0x1000000
jne 0x10092da
test byte [ebp - 0xc], 0xcc
je 0x10091e3
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x10092da
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x10092da
cmp word [eax + 0x18], 0x10b
jne 0x10092da
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x10092da
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x10091e3
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x10091e3
test byte [ecx + 0x27], 0x80
jne 0x100925a
push 1
push 0x1012538
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x10090f7
mov ecx, dword [0x10124f0]
test ecx, ecx
mov edx, ecx
jle 0x1009217
lea eax, [ecx*4 + 0x10124f4]
cmp dword [eax], edi
je 0x1009217
dec edx
sub eax, 4
test edx, edx
jg 0x100920b
test edx, edx
jne 0x1009248
push 0xf
pop ebx
cmp ecx, ebx
jg 0x1009224
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x100923c
lea eax, [edx*4 + 0x10124f8]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x100922a
cmp ecx, 0x10
jge 0x1009248
inc ecx
mov dword [0x10124f0], ecx
push 0
push 0x1012538
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x10090f7
xor eax, eax
jmp 0x10092dd
test esi, esi
jle 0x10090f7
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x1012538
call ebx
test eax, eax
jne 0x10090f7
cmp dword [esi*4 + 0x10124f8], edi
je 0x10092b4
mov eax, dword [0x10124f0]
lea esi, [eax - 1]
test esi, esi
jl 0x10092a2
cmp dword [esi*4 + 0x10124f8], edi
je 0x100929e
dec esi
jns 0x1009292
test esi, esi
jge 0x10092b2
cmp eax, 0x10
jge 0x10092ad
inc eax
mov dword [0x10124f0], eax
lea esi, [eax - 1]
jmp 0x10092b4
je 0x10092cc
xor ecx, ecx
test esi, esi
jl 0x10092cc
lea eax, [ecx*4 + 0x10124f8]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x10092ba
push 0
push 0x1012538
call ebx
jmp 0x10090f7
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1009e53
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x1012574], ebx
push esi
push edi
jne 0x1009ed5
push 0x1002e40
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x1009f10
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x1002e34
push edi
call esi
test eax, eax
mov dword [0x1012574], eax
je 0x1009f10
push 0x1002e24
push edi
call esi
push 0x1002e10
push edi
mov dword [0x1012578], eax
call esi
cmp dword [0x1012228], 2
mov dword [0x101257c], eax
jne 0x1009ed5
push 0x1002df4
push edi
call esi
test eax, eax
mov dword [0x1012584], eax
je 0x1009ed5
push 0x1002ddc
push edi
call esi
mov dword [0x1012580], eax
mov eax, dword [0x1012580]
test eax, eax
je 0x1009f1a
call eax
test eax, eax
je 0x1009f01
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x1012584]
test eax, eax
je 0x1009f01
test byte [ebp - 8], 1
jne 0x1009f1a
cmp dword [0x1012234], 4
jb 0x1009f14
or byte [ebp + 0x12], 0x20
jmp 0x1009f39
xor eax, eax
jmp 0x1009f49
or byte [ebp + 0x12], 4
jmp 0x1009f39
mov eax, dword [0x1012578]
test eax, eax
je 0x1009f39
call eax
mov ebx, eax
test ebx, ebx
je 0x1009f39
mov eax, dword [0x101257c]
test eax, eax
je 0x1009f39
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x1012574]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x100a690
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x1011660]
xor ecx, ecx
cmp dword [ebp + 0x10], ecx
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov dword [ebp - 0x420], edi
mov dword [ebp - 0x418], ecx
mov dword [ebp - 0x41c], ecx
jne 0x100a6c7
xor eax, eax
jmp 0x100a87a
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 + 0x10129a0]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x100a6fc
push 2
push ecx
push ecx
push dword [ebp + 8]
call fcn.0100c921
add esp, 0x10
xor ecx, ecx
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x100a7ca
cmp dword [ebp + 0x10], ecx
mov dword [ebp - 0x414], edi
mov dword [ebp - 0x40c], ecx
jbe 0x100a848
jmp 0x100a723
xor ecx, ecx
mov dword [ebp - 0x410], ecx
mov ecx, dword [ebp - 0x414]
sub ecx, dword [ebp - 0x420]
lea eax, [ebp - 0x408]
cmp ecx, dword [ebp + 0x10]
jae 0x100a779
mov edx, dword [ebp - 0x414]
inc dword [ebp - 0x414]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x100a764
inc dword [ebp - 0x41c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x410]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x410]
cmp dword [ebp - 0x410], 0x400
jl 0x100a73b
mov edi, eax
lea eax, [ebp - 0x408]
sub edi, eax
push 0
lea eax, [ebp - 0x424]
push eax
push edi
lea eax, [ebp - 0x408]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100a7f7
mov eax, dword [ebp - 0x424]
add dword [ebp - 0x418], eax
cmp eax, edi
jl 0x100a803
mov eax, dword [ebp - 0x414]
sub eax, dword [ebp - 0x420]
cmp eax, dword [ebp + 0x10]
jb 0x100a721
jmp 0x100a803
push ecx
lea ecx, [ebp - 0x424]
push ecx
push dword [ebp + 0x10]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100a7f7
mov eax, dword [ebp - 0x424]
and dword [ebp - 0x40c], 0
mov dword [ebp - 0x418], eax
jmp 0x100a803
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x40c], eax
mov eax, dword [ebp - 0x418]
test eax, eax
jne 0x100a872
cmp dword [ebp - 0x40c], eax
je 0x100a842
push 5
pop esi
cmp dword [ebp - 0x40c], esi
jne 0x100a834
call fcn.01009844
mov dword [eax], 9
call fcn.01009852
mov dword [eax], esi
jmp 0x100a86d
push dword [ebp - 0x40c]
call fcn.01009860
pop ecx
jmp 0x100a86d
mov edi, dword [ebp - 0x420]
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x100a85a
cmp byte [edi], 0x1a
jne 0x100a85a
xor eax, eax
jmp 0x100a878
call fcn.01009844
mov dword [eax], 0x1c
call fcn.01009852
and dword [eax], 0
or eax, 0xffffffff
jmp 0x100a878
sub eax, dword [ebp - 0x41c]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
pop edi
call fcn.0100524b
leave
ret
Function at 0x100c89d
Capabilities:
Get system information on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
push 4
pop eax
call fcn.01005b50
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x100c903
mov edi, dword [ebp - 0x1c]
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [0x1012228]
mov esi, dword [ebp - 0x40]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
lea edx, [esi - 1]
and ecx, 0x103
not edx
and edx, ebx
inc ecx
sub edx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0xfffffff1
add eax, 0x11
imul eax, esi
add eax, edi
cmp edx, eax
jae 0x100c907
xor eax, eax
jmp 0x100c914
lea eax, [ebp - 4]
push eax
push ecx
push esi
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x50]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x100d063
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
call fcn.0100d399
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x100d1aa
push 2
push esi
push dword [ebp + 8]
call fcn.0100d399
add esp, 0xc
cmp eax, ebx
je 0x100d1aa
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x100d14d
mov ebx, 0x1000
push ebx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [ebp - 4], eax
jne 0x100d0de
call fcn.01009844
mov dword [eax], 0xc
or esi, 0xffffffff
jmp 0x100d195
push 0x8000
push dword [ebp + 8]
call fcn.0100d68a
pop ecx
pop ecx
mov dword [ebp - 8], eax
cmp edi, ebx
mov eax, ebx
jge 0x100d0f8
mov eax, edi
push eax
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.0100a690
add esp, 0xc
cmp eax, 0xffffffff
je 0x100d114
sub edi, eax
test edi, edi
jg 0x100d0f0
jmp 0x100d12c
call fcn.01009852
cmp dword [eax], 5
jne 0x100d129
call fcn.01009844
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.0100d68a
pop ecx
pop ecx
push dword [ebp - 4]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x100d195
jge 0x100d195
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0100d399
push dword [ebp + 8]
call fcn.0100adb8
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, ebx
jne 0x100d195
call fcn.01009844
mov dword [eax], 0xd
call fcn.01009852
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0100d399
add esp, 0xc
mov eax, esi
pop edi
jmp 0x100d1ac
mov eax, ebx
pop esi
pop ebx
leave
ret
Function at 0x100d1b5
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
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 0x100d38d
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x10129a0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x100d38d
test cl, 0x48
je 0x100d222
cmp byte [eax + 5], 0xa
je 0x100d222
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 0x100d274
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x100d25c
call fcn.01009844
mov dword [eax], 9
call fcn.01009852
mov dword [eax], esi
jmp 0x100d26c
cmp eax, 0x6d
je 0x100d38d
push eax
call fcn.01009860
pop ecx
or eax, 0xffffffff
jmp 0x100d38f
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x100d388
test eax, eax
je 0x100d29b
cmp byte [ebx], 0xa
jne 0x100d29b
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x100d2a4
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 0x100d382
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x100d372
cmp al, 0xd
je 0x100d2d6
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x100d364
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x100d2f0
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x100d2eb
add dword [ebp + 0x10], 2
jmp 0x100d344
mov dword [ebp + 0x10], eax
jmp 0x100d360
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 0x100d318
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x100d360
cmp dword [ebp - 0xc], 0
je 0x100d360
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x100d339
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x100d344
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x100d363
cmp ebx, dword [ebp + 0xc]
jne 0x100d349
cmp byte [ebp - 1], 0xa
jne 0x100d349
mov byte [ebx], 0xa
jmp 0x100d363
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0100c921
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x100d364
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x100d2ba
jmp 0x100d382
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x100d382
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 0x100d38f
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret