joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10100020
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x18
mov ecx, dword [esp + 0x20]
xor edx, edx
push ebx
mov ebx, dword [esp + 0x20]
push ebp
mov dword [esp + 0x10], edx
mov ebp, dword [ebx]
mov dword [esp + 0x18], ebp
mov eax, dword [ebp + 0x10]
cmp dword [ebp + 0x14], edx
jle 0x101001aa
add eax, 0xc
push esi
mov dword [esp + 0x18], eax
push edi
nop
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
mov dword [esp + 0x14], eax
test eax, eax
je 0x1010018f
mov eax, dword [eax + 8]
mov dword [esp + 0x10], eax
cmp byte [eax + 0x2b], 1
je 0x10100175
mov ebp, dword [eax + 8]
test ebp, ebp
je 0x10100175
nop dword [eax]
test ecx, ecx
je 0x101000cb
movzx eax, word [ebp + 0x34]
xor edi, edi
test eax, eax
je 0x10100162
mov ebx, dword [ebp + 4]
cmp word [ebx], 0
jl 0x10100152
mov eax, dword [ebp + 0x20]
mov esi, ecx
mov eax, dword [eax + edi*4]
sub esi, eax
nop dword [eax]
movzx edx, byte [eax]
movzx ecx, byte [esi + eax]
cmp edx, ecx
jne 0x10100132
test edx, edx
jne 0x10100144
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x3c]
mov esi, 0xffff8000
test ecx, ecx
je 0x101000ed
mov eax, dword [ebx]
xor esi, esi
mov eax, dword [eax + 0x10]
add eax, 0xc
cmp dword [eax], ecx
je 0x101000ed
lea eax, [eax + 0x10]
inc esi
cmp dword [eax], ecx
jne 0x101000e5
mov eax, dword [ebx + 0x78]
mov edi, ebx
test eax, eax
mov ecx, esi
cmovne edi, eax
mov eax, 1
shl eax, cl
mov edx, dword [edi + 0x58]
test edx, eax
jne 0x1010011b
bts edx, esi
mov dword [edi + 0x58], edx
cmp esi, 1
jne 0x1010011b
push edi
call fcn.101258f0
add esp, 4
mov eax, dword [edi + 0x54]
push 0xffffffffffffffff
bts eax, esi
push ebp
push ebx
mov dword [edi + 0x54], eax
call fcn.1012e000
add esp, 0xc
jmp 0x10100162
movzx ecx, byte [ecx + 0x1018ff38]
movzx edx, byte [edx + 0x1018ff38]
sub edx, ecx
jne 0x1010014a
inc eax
jmp 0x101000b0
movzx eax, word [ebp + 0x34]
mov ecx, dword [esp + 0x30]
inc edi
add ebx, 2
cmp edi, eax
jl 0x10100095
mov ebx, dword [esp + 0x2c]
mov ebp, dword [ebp + 0x14]
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x10]
test ebp, ebp
jne 0x10100080
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x10100061
mov edx, dword [esp + 0x18]
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
inc edx
add eax, 0x10
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
cmp edx, dword [ebp + 0x14]
jl 0x10100050
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
Function at 0x101001b0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ecx
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
cmp byte [eax + 0x2b], 1
je 0x101002a2
push ebp
mov ebp, dword [eax + 8]
test ebp, ebp
je 0x101002a1
push ebx
push esi
push edi
test ecx, ecx
je 0x1010021f
movzx eax, word [ebp + 0x34]
xor edi, edi
test eax, eax
je 0x1010028b
mov ebx, dword [ebp + 4]
nop word [eax + eax]
cmp word [ebx], 0
jl 0x101002c4
mov eax, dword [ebp + 0x20]
mov esi, ecx
mov eax, dword [eax + edi*4]
sub esi, eax
movzx edx, byte [eax]
movzx ecx, byte [esi + eax]
cmp edx, ecx
jne 0x101002a4
test edx, edx
jne 0x101002b6
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x3c]
mov esi, 0xffff8000
mov ebx, dword [esp + 0x18]
test ecx, ecx
je 0x10100248
mov eax, dword [ebx]
xor esi, esi
mov eax, dword [eax + 0x10]
add eax, 0xc
cmp dword [eax], ecx
je 0x10100248
nop dword [eax]
lea eax, [eax + 0x10]
inc esi
cmp dword [eax], ecx
jne 0x10100240
mov eax, dword [ebx + 0x78]
mov edi, ebx
test eax, eax
mov ecx, esi
cmovne edi, eax
mov eax, 1
shl eax, cl
mov edx, dword [edi + 0x58]
test edx, eax
jne 0x10100276
bts edx, esi
mov dword [edi + 0x58], edx
cmp esi, 1
jne 0x10100276
push edi
call fcn.101258f0
add esp, 4
mov eax, dword [edi + 0x54]
push 0xffffffffffffffff
bts eax, esi
push ebp
push ebx
mov dword [edi + 0x54], eax
call fcn.1012e000
add esp, 0xc
mov ebp, dword [ebp + 0x14]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
test ebp, ebp
jne 0x101001d2
pop edi
pop esi
pop ebx
pop ebp
pop ecx
ret
movzx ecx, byte [ecx + 0x1018ff38]
movzx edx, byte [edx + 0x1018ff38]
sub edx, ecx
jne 0x101002bc
inc eax
jmp 0x10100204
movzx eax, word [ebp + 0x34]
mov ecx, dword [esp + 0x20]
inc edi
add ebx, 2
cmp edi, eax
jl 0x101001f0
jmp 0x1010028b

Function at 0x10101a90
Capabilities:
Reference sql statements

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push edi
push dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
push dword [esp + 0x1c]
push dword [esp + 0x1c]
mov byte [edi + 0x10], 1
push ebx
push ebx
push str.SELECT_1_FROM___w_.sqlite_master_WHERE_name_NOT_LIKE_sqliteX____ESCAPE_X_AND_sql_NOT_LIKE_create_virtual___AND_sqlite_rename_test__Q__sql__type__name___d___Q___d_NULL
push edi
call fcn.10125310
add esp, 0x1c
cmp dword [esp + 0x14], 0
jne 0x10101ad8
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push ebx
push str.SELECT_1_FROM_temp.sqlite_master_WHERE_name_NOT_LIKE_sqliteX____ESCAPE_X_AND_sql_NOT_LIKE_create_virtual___AND_sqlite_rename_test__Q__sql__type__name__1___Q___d_NULL
push edi
call fcn.10125310
add esp, 0x14
pop edi
pop ebx
ret
Function at 0x1011ca70
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push esi
mov esi, dword [esp + 0xc]
mov ebp, dword [esi]
mov eax, dword [ebp + 0x20]
and eax, 0x4000
or eax, 0
je 0x1011cbf2
mov eax, dword [esp + 0x14]
cmp byte [eax + 0x2b], 0
jne 0x1011cbf2
push ebx
mov ebx, dword [esi + 8]
push edi
xor edi, edi
test ebx, ebx
jne 0x1011cac0
cmp dword [esi + 0x78], edi
jne 0x1011cab1
test byte [ebp + 0x50], 8
jne 0x1011cab1
mov byte [esi + 0x17], 1
push esi
call fcn.1013a130
mov ebx, eax
add esp, 4
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x3c]
push 0
push dword [eax]
add ecx, 0x38
push ecx
call fcn.100eacf0
add esp, 0xc
cmp dword [eax + 8], edi
jne 0x1011cb1a
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + 0x30]
test ecx, ecx
je 0x1011cbf0
cmp byte [ecx + 0x18], 0
jne 0x1011cb06
mov eax, dword [ebp + 0x20]
and eax, 0x80000
or eax, 0
jne 0x1011cb06
mov ecx, dword [ecx + 4]
test ecx, ecx
jne 0x1011cae7
pop edi
pop ebx
pop esi
pop ebp
ret
dec dword [esi + 0x38]
mov edi, dword [esi + 0x38]
push edi
push 1
push 0x31
push ebx
call fcn.10139b00
add esp, 0x10
push 0
push 0
push 0
push 0
push dword [esp + 0x28]
mov byte [esi + 0x9b], 1
push ebp
call fcn.10134180
add esp, 0xc
push eax
push esi
call fcn.10113460
mov byte [esi + 0x9b], 0
add esp, 0x14
mov eax, dword [ebp + 0x20]
and eax, 0x80000
or eax, 0
jne 0x1011cbc6
mov eax, dword [ebx + 0x6c]
add eax, 2
push eax
push 0
push 0x31
push ebx
call fcn.10139b00
mov ebp, dword [esi + 8]
add esp, 0x10
test ebp, ebp
jne 0x1011cb8b
cmp dword [esi + 0x78], ebp
jne 0x1011cb80
mov eax, dword [esi]
test byte [eax + 0x50], 8
jne 0x1011cb80
mov byte [esi + 0x17], 1
push esi
call fcn.1013a130
add esp, 4
mov ebp, eax
mov ecx, dword [esi + 0x78]
test ecx, ecx
push 0xffffffffffffffff
push 0
push 0
push 2
cmovne esi, ecx
push 0x313
push 0x46
push ebp
mov byte [esi + 0x15], 1
call fcn.10139bc0
mov eax, dword [ebp + 0x6c]
add esp, 0x1c
test eax, eax
jle 0x1011cbc6
lea ecx, [eax + eax*4]
mov edx, 4
mov eax, dword [ebp + 0x68]
mov word [eax + ecx*4 - 0x12], dx
test edi, edi
je 0x1011cbf0
mov ecx, dword [ebx + 0xc]
not edi
mov eax, dword [ecx + 0x3c]
add eax, dword [ecx + 0x38]
jns 0x1011cbe7
push edi
push ebx
push ecx
call fcn.101020c0
add esp, 0xc
pop edi
pop ebx
pop esi
pop ebp
ret
mov ecx, dword [ecx + 0x40]
mov eax, dword [ebx + 0x6c]
mov dword [ecx + edi*4], eax
pop edi
pop ebx
pop esi
pop ebp
ret
Function at 0x10157d90
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, dword [esp + 8]
push esi
push 0
push 0x14
mov dword [ebp], 0
call fcn.10124b60
mov esi, eax
add esp, 8
test esi, esi
jne 0x10157db5
lea eax, [esi + 7]
pop esi
pop ebp
ret
cmp byte [0x101a1154], 0
push ebx
push edi
je 0x10157e07
mov eax, dword [0x101a1250]
test eax, eax
je 0x10157dd7
push 0xc8
call eax
add esp, 4
test eax, eax
jne 0x10157e07
mov eax, dword [esp + 0x18]
lea ebx, [esi + 4]
push ebx
push 0
push esi
push 0x10135730
lea edi, [esi + 8]
mov dword [edi], eax
mov eax, dword [esp + 0x2c]
push 0
push 0
mov dword [esi + 0xc], eax
call fcn.1016dad8
add esp, 0x18
mov dword [esi], eax
test eax, eax
jne 0x10157e1a
jmp 0x10157e0d
lea edi, [esi + 8]
lea ebx, [esi + 4]
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
cmp dword [edi], 0
jne 0x10157e35
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push dword [esp + 0x1c]
mov dword [ebx], eax
call dword [esp + 0x1c]
add esp, 4
mov dword [esi + 0x10], eax
pop edi
pop ebx
mov dword [ebp], esi
xor eax, eax
pop esi
pop ebp
ret
Function at 0x101722dc
Capabilities:
Parse pe header

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

Function at 0x10174951
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10199b14
push 0x10199b0c
push str.FlsAlloc
push 0x1f
call fcn.101747d0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10174985
push dword [ebp + 8]
mov ecx, esi
call dword [0x101831fc]
call esi
jmp 0x1017498b
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x101749cf
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10199b24
push 0x10199b1c
push str.FlsGetValue
push 0x21
call fcn.101747d0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10174a06
push dword [ebp + 8]
mov ecx, esi
call dword [0x101831fc]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x10174a0e
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10199b2c
push 0x10199b24
push str.FlsSetValue
push 0x22
call fcn.101747d0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10174a48
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x101831fc]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x1017520d
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.1016a480
mov eax, dword [0x101a2ce4]
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.10173ce0
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x1017524f
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x101753ab
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.1016a880
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 + 0x101a4788]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.10174e25
mov ecx, dword [esi*4 + 0x101a4788]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x101753a4
cmp eax, dword [ecx + edi + 0x24]
jne 0x101753a4
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x101753a4
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10174e25
add esp, 0x14
test edx, edx
jl 0x101753a4
jg 0x1017531a
test eax, eax
jb 0x101753a4
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x101753a4
jl 0x10175334
cmp dword [ebp - 0x1008], eax
ja 0x101753a4
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x10175352
test ebx, ebx
je 0x1017538b
cmp ecx, edi
jae 0x1017538b
mov al, byte [ecx]
cmp al, 0xd
jne 0x1017536c
lea eax, [edi - 1]
cmp ecx, eax
jae 0x10175378
cmp byte [ecx + 1], 0xa
jne 0x10175378
inc ecx
jmp 0x10175378
movzx eax, al
movsx eax, byte [eax + 0x101a2ef0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x10175352
cmp edx, ebx
jne 0x10175352
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x101753a9
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.10169f7a
leave
ret
Function at 0x10175606
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
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 + 0x101a4788]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x10175646
cmp byte [ebx], 0xa
jne 0x10175646
or byte [edi + eax + 0x28], 4
jmp 0x1017564b
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x1017574a
mov dl, byte [eax]
cmp dl, 0x1a
je 0x1017572d
inc eax
cmp dl, 0xd
je 0x10175677
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x1017569d
cmp eax, ecx
jae 0x101756ab
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x1017565f
jmp 0x1017574a
push 0
lea eax, [ebp - 0x10]
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 0x10175728
cmp dword [ebp - 0x10], 0
je 0x10175728
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x101a4788]
test byte [eax + edi + 0x28], 0x48
je 0x10175702
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x101756ed
mov byte [esi], dl
jmp 0x101756fe
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x101a4788]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x1017574a
cmp byte [ebp - 1], 0xa
jne 0x10175711
cmp esi, ebx
jne 0x10175711
mov byte [esi], 0xa
jmp 0x10175749
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10174e43
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x1017574a
mov byte [esi], 0xd
jmp 0x10175749
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x101a4788]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x10175747
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x1017574a
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x10175753
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x101a4788]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x10175799
cmp word [ebx], dx
jne 0x10175799
or byte [eax + edi + 0x28], 4
jmp 0x1017579e
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x10175901
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x101758e1
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x101757df
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x10175815
cmp eax, edx
jae 0x10175823
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x101757ba
jmp 0x10175901
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x101758dc
cmp dword [ebp - 0x18], 0
je 0x101758dc
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x101a4788]
test byte [eax + edi + 0x28], 0x48
je 0x101758b2
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x10175876
mov word [esi], cx
jmp 0x101758ad
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x101a4788]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x101a4788]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x101a4788]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x10175901
pop eax
cmp word [ebp - 4], ax
jne 0x101758c2
cmp esi, ebx
jne 0x101758c2
mov word [esi], ax
jmp 0x101758fe
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10174e43
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x10175901
push 0xd
pop eax
jmp 0x101758bd
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x101a4788]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x101758fb
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x10175901
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x1017b0be
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 0x1017b15b
push ebx
push esi
call fcn.1017b087
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.1017b01b
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x1017b108
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1017b15a
push edi
push eax
call fcn.10177409
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x1017b128
call fcn.10173ca6
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1017b159
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1017b01b
add esp, 0x20
test eax, eax
jne 0x1017b147
push edi
call fcn.10173ca6
jmp 0x1017b14f
push ebx
call fcn.10173ca6
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 0x1017b15e
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x1017b16f
pop esi
ret
push ebx
push edi
push esi
call fcn.1017b087
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.10177409
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x1017b197
push ebx
push esi
push edi
call fcn.1016b7f0
add esp, 0xc
push 0
call fcn.10173ca6
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x1017b567
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1017b1ac
Function at 0x101809c1
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.1018093d
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x10180b30
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x10180b30
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x10180ae5
jg 0x10180a1d
test eax, eax
je 0x10180adb
push 1
push 0x1000
call fcn.10174640
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x10180a40
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x10180ad2
push 0x8000
push ebx
call fcn.1018086e
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x10180a69
jg 0x10180a64
cmp ecx, 0x1000
jb 0x10180a69
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.101771ed
add esp, 0x10
cmp eax, 0xffffffff
je 0x10180aae
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x10180a64
jl 0x10180a95
test ecx, ecx
jne 0x10180a56
push dword [ebp - 0xc]
push ebx
call fcn.1018086e
push esi
call fcn.10173ca6
add esp, 0xc
xor ebx, ebx
jmp 0x10180b3e
cmp byte [edi + 0x24], 0
je 0x10180ac5
cmp dword [edi + 0x20], 5
jne 0x10180ac5
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x10180ad0
mov ebx, dword [edi + 0x18]
jmp 0x10180ad2
xor ebx, ebx
push esi
call fcn.10173ca6
pop ecx
jmp 0x10180b3e
test ecx, ecx
jg 0x10180aa7
jl 0x10180ae5
test eax, eax
jae 0x10180aa7
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10174e43
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x10180b05
cmp byte [edi + 0x1c], 0
je 0x10180aa7
jmp 0x10180b36
push ebx
call fcn.1017c58c
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x10180aa7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x10180b3e
cmp byte [edi + 0x1c], 0
je 0x10180b3b
mov ebx, dword [edi + 0x18]
jmp 0x10180b3e
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10174e43
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x10182060
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1018208d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1018208d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret