joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40adc0
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1014
push ebp
mov ebp, esp
call fcn.00404730
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
mov dword [ebp - 4], 0
mov eax, dword [0x4170bc]
cmp ebx, eax
jae 0x40adfb
mov eax, ebx
and eax, 0x1f
mov edx, ebx
sar edx, 5
mov edx, dword [edx*4 + 0x4170c0]
test byte [edx + eax*8 + 4], 1
jne 0x40ae0d
or eax, 0xffffffff
mov dword [0x415c84], 9
jmp 0x40af32
push 1
push 0
push ebx
call fcn.00409fd0
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x40ae37
push 2
push 0
push ebx
call fcn.00409fd0
mov dword [ebp - 8], eax
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40ae3f
or eax, 0xffffffff
jmp 0x40af32
mov eax, dword [ebp + 0xc]
mov esi, eax
sub esi, dword [ebp - 8]
test esi, esi
jle 0x40aee4
mov ecx, 0x1000
xor eax, eax
lea edx, [ebp - 0x1010]
push edi
mov edi, edx
rep stosb byte es:[edi], al
pop edi
mov eax, edx
push 0x8000
push ebx
call fcn.0040b330
add esp, 8
mov dword [ebp - 0x10], eax
mov eax, esi
cmp eax, 0x1000
jb 0x40ae8a
mov dword [ebp - 0x1014], 0x1000
jmp 0x40ae92
mov eax, esi
mov dword [ebp - 0x1014], eax
mov eax, dword [ebp - 0x1014]
push eax
lea eax, [ebp - 0x1010]
push eax
push ebx
call fcn.004086d0
mov edi, eax
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40aecb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x40aec5
mov dword [0x415c84], 0xd
or dword [ebp - 4], 0xffffffff
jmp 0x40aed5
mov eax, esi
sub eax, edi
test eax, eax
mov esi, eax
jg 0x40ae75
mov eax, dword [ebp - 0x10]
push eax
push ebx
call fcn.0040b330
add esp, 8
jmp 0x40af20
test esi, esi
jge 0x40af20
push 0
mov eax, dword [ebp + 0xc]
push eax
push ebx
call fcn.00409fd0
add esp, 0xc
push ebx
call fcn.00408b00
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
setne al
and eax, 1
dec eax
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x40af20
mov dword [0x415c84], 0xd
push 0
mov eax, dword [ebp - 0xc]
push eax
push ebx
call fcn.00409fd0
add esp, 0xc
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x1000928f
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x1000b348]
jne 0x10009299
repz ret
jmp fcn.1000966a
Function at 0x406128
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x40614d
mov dword [0x40a0f4], eax
add esp, 0xfffffff8
push 0x4060ec
push eax
call fcn.00407c20
jmp 0x406152
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x406168
mov dword [0x409054], 0x40624c
jmp 0x406172
mov dword [0x409054], 0x406200
leave
ret

Function at 0x411294
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
nop
lea eax, [ebp - 0x44]
push eax
call sub.kernel32.dll_GetStartupInfoA
mov eax, dword [ebp - 0x18]
and eax, 1
cmp eax, 0
je 0x4112c2
movzx eax, word [ebp - 0x14]
mov dword [ebp - 0x50], eax
jmp 0x4112ca
mov eax, 0xa
mov dword [ebp - 0x50], eax
mov eax, 0
mov dword [ebp - 0x48], eax
call sub.kernel32.dll_GetCommandLineA
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 8]
cmp eax, 0
je 0x4112f9
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0x4c]
push eax
call sub.msvcrt.dll_strstr
add esp, 8
mov dword [ebp - 0x48], eax
mov eax, 0
mov ecx, dword [ebp - 0x48]
cmp eax, ecx
jne 0x41131f
mov eax, 0x4240fc
push eax
call sub.msvcrt.dll__strdup
add esp, 4
mov dword [ebp - 0x48], eax
jmp 0x411348
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x4c]
cmp eax, ecx
jbe 0x411348
mov eax, dword [ebp - 0x48]
add eax, 0xffffffff
movsx ecx, byte [eax]
cmp ecx, 0x22
jne 0x411348
mov eax, dword [ebp - 0x48]
add eax, 0xffffffff
mov dword [ebp - 0x48], eax
mov eax, 0x30000
push eax
mov eax, 0x10000
push eax
call sub.msvcrt.dll__controlfp
add esp, 8
mov eax, 0
push eax
call sub.kernel32.dll_GetModuleHandleA
mov ecx, dword [ebp - 0x50]
push ecx
mov ecx, dword [ebp - 0x48]
push ecx
mov ecx, 0
push ecx
push eax
call fcn.00410f4b
leave
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x404600
Capabilities:
Create thread

Disassembly:
sub esp, 0x2c
mov eax, dword [0x46ed00]
xor eax, esp
mov dword [esp + 0x28], eax
push 4
call fcn.00407e7a
add esp, 4
test eax, eax
je 0x404624
mov dword [eax], 0x404360
jmp 0x404626
xor eax, eax
lea ecx, [esp + 4]
push ecx
push 0
push eax
push 0x401c30
push 0
push 0
call fcn.0040d545
add esp, 0x18
mov dword [esp], eax
test eax, eax
je 0x4047a8
call dword [sym.imp.KERNEL32.dll_FreeConsole]
cmp dword [esp + 4], 0
je 0x4047b7
call sub.KERNEL32.dll_GetCurrentThreadId
mov ecx, dword [esp + 4]
cmp ecx, eax
je 0x4047be
push 0
push ecx
push dword [esp + 8]
call fcn.00404997
add esp, 0xc
test eax, eax
jne 0x4047c5
xorps xmm0, xmm0
mov dword [esp + 0x20], eax
push str.Enter_filename:__n
movups xmmword [esp + 0x14], xmm0
push 0x470168
movlpd qword [esp + 8], xmm0
mov dword [esp + 0x2c], 0xf
mov byte [esp + 0x18], al
call fcn.00401420
lea eax, [esp + 0x18]
push eax
push 0x470040
call fcn.00401200
mov ecx, dword [esp + 0x30]
add esp, 0x10
test ecx, ecx
je 0x404749
cmp dword [esp + 0x24], 0xf
lea eax, [esp + 0x10]
push esi
cmova eax, dword [esp + 0x14]
push edi
push ecx
push eax
push 0x4700b8
call fcn.00401a40
mov edi, eax
add esp, 0xc
mov ecx, dword [edi]
mov ecx, dword [ecx + 4]
mov ecx, dword [ecx + edi + 0x30]
mov esi, dword [ecx + 4]
mov ecx, esi
mov dword [esp + 0x14], esi
mov edx, dword [esi]
call dword [edx + 4]
lea eax, [esp + 0x10]
push eax
call fcn.00401c50
add esp, 4
mov ecx, eax
mov edx, dword [eax]
push 0xa
mov eax, dword [edx + 0x20]
call eax
mov byte [esp + 0x10], al
test esi, esi
je 0x404735
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
test eax, eax
je 0x404735
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push dword [esp + 0x10]
mov ecx, edi
call fcn.004040b0
mov ecx, edi
call fcn.00403c10
pop edi
pop esi
mov ecx, dword [esp + 0x24]
cmp ecx, 0xf
jbe 0x40477b
mov edx, dword [esp + 0x10]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x404771
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4047cc
push ecx
push edx
call fcn.00407eaa
add esp, 8
cmp dword [esp + 4], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0xf
mov byte [esp + 0x10], 0
jne 0x4047d1
mov ecx, dword [esp + 0x28]
xor eax, eax
xor ecx, esp
call fcn.00407ebd
add esp, 0x2c
ret
push 6
mov dword [esp + 8], 0
call fcn.00404b4d
push 1
call fcn.00404b4d
push 5
call fcn.00404b4d
push 2
call fcn.00404b4d
call fcn.0040c8ef
call fcn.0040d3ad
int3
Function at 0x4063d4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
jg 0x4063f5
jl 0x4063ec
test edi, edi
jne 0x4063f5
xor eax, eax
xor edx, edx
jmp 0x4064b6
cmp dword [ebx + 0x38], 0
je 0x40640a
push eax
push edi
push dword [ebp + 8]
call fcn.004064bc
jmp 0x4064b6
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x406451
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x406451
cmp eax, edi
jb 0x40642b
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.00409110
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 8]
sub esi, ecx
add eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], ecx
mov eax, dword [ebx + 0x1c]
add dword [eax], ecx
jmp 0x406457
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x4064ab
mov ecx, ebx
call fcn.00405c6b
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x406496
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.0040ec03
mov ecx, dword [ebp - 4]
sub esi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, esi
cmp eax, 0xfff
jne 0x4064ab
jmp 0x406469
test edx, edx
je 0x4064ab
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.0040ec03
add esp, 0x10
sub esi, eax
mov edx, dword [ebp + 0x10]
sub edi, esi
mov eax, edi
sbb edx, 0
pop esi
pop edi
pop ebx
leave
ret 0xc

Function at 0x408abc
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x408afb
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x408afb
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x408afb
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x408afb
cmp dword [ecx + 0x74], 0xe
jbe 0x408afb
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x4139a6
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42463c
push 0x424634
push str.FlsAlloc
push 0x1e
call fcn.004137d3
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4139da
push dword [ebp + 8]
mov ecx, esi
call dword [0x42115c]
call esi
jmp 0x4139e0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x413a24
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42464c
push 0x424644
push str.FlsGetValue
push 0x20
call fcn.004137d3
mov esi, eax
add esp, 0x10
test esi, esi
je 0x413a5b
push dword [ebp + 8]
mov ecx, esi
call dword [0x42115c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x41625a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00415efc

Function at 0x416265
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041608b

Function at 0x41665f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00408c20
mov eax, dword [0x46ed00]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.004150f1
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4166a1
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4167fd
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0041f830
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x470b18]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.0041782f
mov ecx, dword [esi*4 + 0x470b18]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x4167f6
cmp eax, dword [edi + ecx + 0x24]
jne 0x4167f6
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4167f6
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0041782f
add esp, 0x14
test edx, edx
jl 0x4167f6
jg 0x41676c
test eax, eax
jb 0x4167f6
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4167f6
jl 0x416786
cmp dword [ebp - 0x1008], eax
ja 0x4167f6
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x4167a4
test ebx, ebx
je 0x4167dd
cmp ecx, edi
jae 0x4167dd
mov al, byte [ecx]
cmp al, 0xd
jne 0x4167be
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4167ca
cmp byte [ecx + 1], 0xa
jne 0x4167ca
inc ecx
jmp 0x4167ca
movzx eax, al
movsx eax, byte [eax + 0x46efd0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x4167a4
cmp edx, ebx
jne 0x4167a4
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4167fb
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00407ebd
leave
ret
Function at 0x416ccd
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x470b18]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x416d0d
cmp byte [ebx], 0xa
jne 0x416d0d
or byte [eax + edi + 0x28], 4
jmp 0x416d12
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x416e10
mov al, byte [edx]
cmp al, 0x1a
je 0x416df2
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x416d41
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x416d66
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x416d70
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x416d23
jmp 0x416e10
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x416ded
cmp dword [ebp - 0xc], 0
je 0x416ded
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x470b18]
test byte [eax + edi + 0x28], 0x48
je 0x416dc7
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x416db2
mov byte [esi], dl
jmp 0x416dc3
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x470b18]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x416e10
cmp byte [ebp - 1], 0xa
jne 0x416dd6
cmp esi, ebx
jne 0x416dd6
mov byte [esi], 0xa
jmp 0x416e0f
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041784d
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x416e10
mov byte [esi], 0xd
jmp 0x416e0f
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x470b18]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x416e0c
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x416e10
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x416e19
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x470b18]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x416e5c
cmp word [esi], dx
jne 0x416e5c
or byte [edi + eax + 0x28], 4
jmp 0x416e61
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x416fb4
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x416f94
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x416ea3
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x416ed9
cmp eax, edx
jae 0x416ee5
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x416e7b
jmp 0x416fb4
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x416f90
cmp dword [ebp - 0x14], 0
je 0x416f90
mov eax, dword [ebx*4 + 0x470b18]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x416f68
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x416f31
mov word [esi], cx
jmp 0x416f64
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x470b18]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x470b18]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x470b18]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x416fb4
pop ebx
cmp word [ebp - 4], bx
jne 0x416f79
cmp esi, dword [ebp + 0xc]
jne 0x416f79
mov word [esi], bx
jmp 0x416fb1
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041784d
add esp, 0x10
cmp word [ebp - 4], bx
je 0x416fb4
push 0xd
jmp 0x416fad
mov ecx, dword [ebx*4 + 0x470b18]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x416fab
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x416fb4
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x419bc2
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x419c5f
push ebx
push esi
call fcn.00419b8b
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00418810
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x419c0c
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x419c5e
push edi
push eax
call fcn.004140e0
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x419c2c
call fcn.004132ab
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x419c5d
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00418810
add esp, 0x20
test eax, eax
jne 0x419c4b
push edi
call fcn.004132ab
jmp 0x419c53
push ebx
call fcn.004132ab
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x41f7f0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41f81d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41f81d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x1000a6f0
Capabilities:
Write file on windows

Disassembly:
push ebp
push esi
mov esi, dword [esp + 0xc]
xor ebp, ebp
cmp esi, ebp
jne 0x1000a704
pop esi
mov eax, 1
pop ebp
ret
mov ecx, dword [esp + 0x10]
cmp ecx, ebp
je 0x1000a6fc
push ebx
mov ebx, dword [esp + 0x18]
cmp ebx, ebp
jle 0x1000a71d
mov eax, dword [esp + 0x1c]
cmp eax, ebp
jne 0x1000a726
pop ebx
pop esi
mov eax, 1
pop ebp
ret
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
cmp edi, ebx
jge 0x1000a733
mov ebx, edi
mov dword [eax], ebx
cmp edi, ebp
je 0x1000a754
mov eax, dword [esi + 0xc]
add eax, dword [esi + 8]
push ecx
push ebx
push 1
push eax
call dword [sym.imp.MSVCR90.dll_fwrite]
add dword [esi + 8], ebx
add esp, 0x10
cmp ebx, edi
jne 0x1000a75a
mov dword [esi + 8], ebp
mov dword [esi + 4], ebp
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
ret

Function at 0x1000a830
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
jne 0x1000a83e
lea eax, [esi + 1]
pop esi
ret
push ebp
mov ebp, dword [esp + 0x10]
test ebp, ebp
jne 0x1000a84d
lea eax, [ebp + 1]
pop ebp
pop esi
ret
push ebx
mov ebx, dword [esp + 0x18]
test ebx, ebx
jne 0x1000a85d
lea eax, [ebx + 1]
pop ebx
pop ebp
pop esi
ret
push edi
mov edi, dword [esi + 8]
test edi, edi
je 0x1000a886
mov ecx, dword [esi + 4]
mov eax, dword [esi + 0xc]
sub ecx, edi
push ecx
lea edx, [eax + edi]
push edx
push eax
call dword [sym.imp.MSVCR90.dll_memmove]
add esp, 0xc
sub dword [esi + 4], edi
mov dword [esi + 8], 0
mov eax, dword [esi]
mov ecx, eax
sub ecx, dword [esi + 4]
pop edi
cmp ebx, ecx
jle 0x1000a8a2
cmp eax, ebx
jg 0x1000a898
mov eax, ebx
push eax
push esi
call sym.leptonlib.dll_bbufferExtendArray
add esp, 8
mov edx, dword [esi + 0xc]
add edx, dword [esi + 4]
push ebp
push ebx
push 1
push edx
call dword [sym.imp.MSVCR90.dll_fread]
add dword [esi + 4], eax
add esp, 0x10
pop ebx
pop ebp
xor eax, eax
pop esi
ret
Function at 0x10059330
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, dword [esp + 8]
test ebp, ebp
jne 0x1005933e
lea eax, [ebp + 1]
pop ebp
ret
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
push eax
call sym.leptonlib.dll_lheapGetCount
add esp, 4
xor esi, esi
mov dword [esp + 0x14], eax
test eax, eax
jle 0x100593b5
mov ecx, dword [ebp + 0x10]
push 0
push esi
push ecx
call sym.leptonlib.dll_sarrayGetString
mov edx, dword [ebp + 0xc]
push 0
push esi
push edx
mov ebx, eax
call sym.leptonlib.dll_sarrayGetString
push 0x101432bc
push eax
call dword [sym.imp.MSVCR90.dll_fopen]
mov edi, eax
add esp, 0x20
test edi, edi
je 0x100593bc
mov eax, ebx
lea edx, [eax + 1]
jmp 0x10059390
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10059390
push edi
sub eax, edx
push eax
push 1
push ebx
call dword [sym.imp.MSVCR90.dll_fwrite]
push edi
call dword [sym.imp.MSVCR90.dll_fclose]
inc esi
add esp, 0x14
cmp esi, dword [esp + 0x14]
jl 0x10059357
pop edi
pop esi
pop ebx
xor eax, eax
pop ebp
ret
pop edi
pop esi
pop ebx
mov eax, 1
pop ebp
ret

Function at 0x100597b0
Capabilities:
Execute command

Disassembly:
sub esp, 0x204
mov eax, dword [0x10185cf0]
xor eax, esp
mov dword [esp + 0x200], eax
push esi
mov esi, dword [esp + 0x20c]
test esi, esi
jne 0x100597e9
lea eax, [esi + 1]
pop esi
mov ecx, dword [esp + 0x200]
xor ecx, esp
call fcn.101407ce
add esp, 0x204
ret
push esi
call sym.leptonlib.dll_gplotGenCommandFile
push esi
call sym.leptonlib.dll_gplotGenDataFiles
add esp, 8
cmp dword [esi + 0x24], 4
je 0x10059813
mov eax, dword [esi + 4]
push eax
push str.wgnuplot__s
push 0x200
lea ecx, [esp + 0x10]
push ecx
jmp 0x10059826
mov edx, dword [esi + 4]
push edx
push str.wgnuplot__persist__s
push 0x200
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.MSVCR90.dll__snprintf]
lea ecx, [esp + 0x14]
add esp, 0x10
push ecx
call dword [sym.imp.MSVCR90.dll_system]
mov ecx, dword [esp + 0x208]
add esp, 4
pop esi
xor ecx, esp
xor eax, eax
call fcn.101407ce
add esp, 0x204
ret