joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405d20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408ac8
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x40d024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x2c], ebx
cmp dword [ebx + 0x38], 0
je 0x405ed1
cmp byte [ebx + 0x3d], 0
je 0x405ed1
mov eax, dword [ebx]
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
sete al
test al, al
je 0x405d7c
xor al, al
jmp 0x405ed3
sub esp, 8
lea ecx, [ebp - 0x28]
call fcn.00403e30
mov dword [ebp - 4], 0
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x28]
jmp 0x405da3
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x28]
nop dword [eax]
mov ebx, dword [ebp - 0x2c]
cmp esi, 0x10
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x28]
cmovae edx, edi
lea ecx, [ebp - 0x28]
cmovae ecx, edi
add eax, edx
push eax
push ecx
mov ecx, dword [ebx + 0x38]
lea eax, [ebx + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x405dee
sub eax, 1
je 0x405df2
sub eax, 2
je 0x405ec3
lea ecx, [ebp - 0x28]
xor bl, bl
call fcn.00403dc0
mov al, bl
jmp 0x405ed3
mov byte [ebx + 0x3d], 0
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov edi, dword [ebp - 0x28]
cmp esi, 0x10
mov ebx, dword [ebp - 0x30]
cmovae eax, edi
sub ebx, eax
je 0x405e2e
mov ecx, dword [ebp - 0x2c]
lea eax, [ebp - 0x28]
cmp esi, 0x10
cmovae eax, edi
push dword [ecx + 0x4c]
push ebx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp ebx, eax
jne 0x405ddd
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x2c]
cmp byte [eax + 0x3d], 0
je 0x405ec3
test ebx, ebx
mov ebx, eax
jne 0x405da3
mov ecx, dword [ebp - 0x18]
or eax, 0xffffffff
sub eax, ecx
cmp eax, 8
jbe 0x405eb8
lea ebx, [ecx + 8]
cmp ebx, 0xfffffffe
ja 0x405eb8
cmp esi, ebx
jae 0x405ea1
push ecx
push ebx
lea ecx, [ebp - 0x28]
call fcn.004060f0
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x28]
test ebx, ebx
je 0x405da0
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
cmp esi, 0x10
xorps xmm0, xmm0
cmovae ecx, edi
movq qword [ecx + eax], xmm0
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 0x10
mov dword [ebp - 0x18], ebx
cmovae eax, dword [ebp - 0x28]
mov byte [eax + ebx], 0
jmp 0x405d96
test ebx, ebx
jne 0x405e76
cmp esi, 0x10
mov dword [ebp - 0x18], ebx
lea eax, [ebp - 0x28]
cmovae eax, edi
mov byte [eax], bl
jmp 0x405d96
push str.string_too_long
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const__]
lea ecx, [ebp - 0x28]
mov bl, 1
call fcn.00403dc0
mov al, bl
jmp 0x405ed3
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004076ea
mov esp, ebp
pop ebp
ret
Function at 0x100014f0
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x1002d040]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp + 0xc]
push eax
push ecx
push dword [ebp + 8]
mov ecx, 0x1002e588
call fcn.10001080
add esp, 0xc
push 0x1002e588
push 1
call dword [sym.imp.CLEO.asi_Ordinal_39]
lea eax, [ebp - 8]
push eax
call dword [sym.imp.SHELL32.dll_SHQueryUserNotificationState]
mov eax, dword [ebp - 8]
cmp eax, 2
je 0x10001563
cmp eax, 3
je 0x10001563
cmp eax, 4
je 0x10001563
push 0x41010
push str.CLEO_error
push 0x1002e588
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100083b5
mov esp, ebp
pop ebp
ret
push 0
push 0xf020
push 0x112
push 0
call dword [sym.imp.USER32.dll_PostMessageA]
push 6
push 0
call dword [sym.imp.USER32.dll_ShowWindow]
push 0x41010
push str.CLEO_error
push 0x1002e588
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
push 0xf120
push 0x112
push 0
call dword [sym.imp.USER32.dll_PostMessageA]
push 9
push 0
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100083b5
mov esp, ebp
pop ebp
ret
Function at 0x10004e40
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x35c
mov eax, dword [0x1002d040]
xor eax, esp
mov dword [esp + 0x358], eax
push ebx
push esi
push edi
push 0x140
lea eax, [esp + 0x14]
mov esi, ecx
push 0
push eax
call fcn.100098b0
add esp, 0xc
lea eax, [esp + 0x258]
push esi
push str._s
push eax
call fcn.100010c0
add esp, 0xc
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x25c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x10004fa5
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileA]
nop dword [eax]
test byte [esp + 0x10], 0x10
lea eax, [esp + 0x3c]
je 0x10004f52
mov ecx, 0x1002a1d4
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10004ee4
test dl, dl
je 0x10004ee0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10004ee4
add eax, 2
add ecx, 2
test dl, dl
jne 0x10004ec4
xor eax, eax
jmp 0x10004ee9
sbb eax, eax
or eax, 1
test eax, eax
je 0x10004f8e
mov eax, 0x1002a1d8
lea ecx, [esp + 0x3c]
nop word [eax + eax]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x10004f20
test dl, dl
je 0x10004f1c
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x10004f20
add ecx, 2
add eax, 2
test dl, dl
jne 0x10004f00
xor eax, eax
jmp 0x10004f25
sbb eax, eax
or eax, 1
test eax, eax
je 0x10004f8e
lea eax, [esp + 0x3c]
push eax
push esi
lea eax, [esp + 0x158]
push str._s_s
push eax
call fcn.100010c0
add esp, 0x10
lea ecx, [esp + 0x150]
call fcn.10004e40
jmp 0x10004f8a
push eax
push esi
lea eax, [esp + 0x158]
push str._s_s
push eax
call fcn.100010c0
add esp, 0x10
lea eax, [esp + 0x150]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [esp + 0x150]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x10004fc1
lea eax, [esp + 0x10]
push eax
push edi
call ebx
test eax, eax
jne 0x10004eb0
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x358]
xor ecx, esp
call fcn.100083b5
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x364]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100083b5
mov esp, ebp
pop ebp
ret
Function at 0x10005450
Capabilities:
Copy file
Create directory
Enumerate files on windows
Enumerate files recursively
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x464
mov eax, dword [0x1002d040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, edx
mov edi, ecx
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x1000558e
push 0x140
lea eax, [ebp - 0x460]
push 0
push eax
call fcn.100098b0
add esp, 0xc
lea eax, [ebp - 0x320]
push edi
push str._s
push eax
call fcn.100010c0
add esp, 0xc
lea eax, [ebp - 0x460]
push eax
lea eax, [ebp - 0x320]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x100055f3
lea eax, [ebp - 0x434]
push eax
push edi
lea eax, [ebp - 0x110]
push str._s_s
push eax
call fcn.100010c0
lea eax, [ebp - 0x434]
push eax
push ebx
lea eax, [ebp - 0x218]
push str._s_s
push eax
call fcn.100010c0
add esp, 0x20
test byte [ebp - 0x460], 0x10
je 0x100055a1
mov ecx, 0x1002a1d4
lea eax, [ebp - 0x434]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10005532
test dl, dl
je 0x1000552e
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10005532
add eax, 2
add ecx, 2
test dl, dl
jne 0x10005512
xor eax, eax
jmp 0x10005537
sbb eax, eax
or eax, 1
test eax, eax
je 0x100055d6
mov ecx, 0x1002a1d8
lea eax, [ebp - 0x434]
nop word [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10005570
test dl, dl
je 0x1000556c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10005570
add eax, 2
add ecx, 2
test dl, dl
jne 0x10005550
xor eax, eax
jmp 0x10005575
sbb eax, eax
or eax, 1
test eax, eax
je 0x100055d6
lea edx, [ebp - 0x218]
lea ecx, [ebp - 0x110]
call fcn.10005450
test eax, eax
jne 0x100055d6
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100083b5
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x1000558e
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x460]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x100054c5
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100083b5
mov esp, ebp
pop ebp
ret
Function at 0x10007b70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x1002d040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 8], edx
mov esi, ebx
and esi, 0xfffffffe
mov dword [ebp - 0x10], esi
jne 0x10007ba3
xor eax, eax
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100083b5
mov esp, ebp
pop ebp
ret
not bl
mov dword [ebp - 0xc], 0
and bl, 1
je 0x10007bd0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push 1
push dword [ebp - 8]
call dword [0x1002e440]
add esp, 0x10
mov dword [ebp - 0xc], eax
jmp 0x10007be2
push esi
push dword [ebp + 8]
push 1
push edx
call fcn.10014cbe
add esp, 0x10
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], 0
test bl, bl
je 0x10007c1e
mov dword [ebp - 8], 0
push 1
push dword [ebp - 8]
push dword [ebp - 0x14]
call dword [0x1002e448]
add esp, 0xc
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0xc]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100083b5
mov esp, ebp
pop ebp
ret
push 1
push 0
push esi
call fcn.1000e2aa
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp - 0xc]
xor ecx, ebp
pop esi
pop ebx
call fcn.100083b5
mov esp, ebp
pop ebp
ret
Function at 0x1000d7ac
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.10023140
mov eax, dword [0x1002d040]
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.10017446
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x1000d7ee
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x1000d94a
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.10023090
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 + 0x1002df88]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.100181c4
mov ecx, dword [esi*4 + 0x1002df88]
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 0x1000d943
cmp eax, dword [ecx + edi + 0x24]
jne 0x1000d943
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 0x1000d943
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.100181c4
add esp, 0x14
test edx, edx
jl 0x1000d943
jg 0x1000d8b9
test eax, eax
jb 0x1000d943
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x1000d943
jl 0x1000d8d3
cmp dword [ebp - 0x1008], eax
ja 0x1000d943
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x1000d8f1
test ebx, ebx
je 0x1000d92a
cmp ecx, edi
jae 0x1000d92a
mov al, byte [ecx]
cmp al, 0xd
jne 0x1000d90b
lea eax, [edi - 1]
cmp ecx, eax
jae 0x1000d917
cmp byte [ecx + 1], 0xa
jne 0x1000d917
inc ecx
jmp 0x1000d917
movzx eax, al
movsx eax, byte [eax + 0x1002d278]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x1000d8f1
cmp edx, ebx
jne 0x1000d8f1
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x1000d948
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.100083b5
leave
ret

Function at 0x10015193
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x100151d2
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x100151d2
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x100151d2
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x100151d2
cmp dword [ecx + 0x74], 0xe
jbe 0x100151d2
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x10018240
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 + 0x1002df88]
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 0x10018280
cmp byte [ebx], 0xa
jne 0x10018280
or byte [edi + eax + 0x28], 4
jmp 0x10018285
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 0x10018384
mov dl, byte [eax]
cmp dl, 0x1a
je 0x10018367
inc eax
cmp dl, 0xd
je 0x100182b1
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x100182d7
cmp eax, ecx
jae 0x100182e5
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 0x10018299
jmp 0x10018384
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 0x10018362
cmp dword [ebp - 0x10], 0
je 0x10018362
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x1002df88]
test byte [eax + edi + 0x28], 0x48
je 0x1001833c
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x10018327
mov byte [esi], dl
jmp 0x10018338
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x1002df88]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x10018384
cmp byte [ebp - 1], 0xa
jne 0x1001834b
cmp esi, ebx
jne 0x1001834b
mov byte [esi], 0xa
jmp 0x10018383
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.100181e2
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x10018384
mov byte [esi], 0xd
jmp 0x10018383
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x1002df88]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x10018381
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x10018384
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x1001838d
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 + 0x1002df88]
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 0x100183d3
cmp word [ebx], dx
jne 0x100183d3
or byte [eax + edi + 0x28], 4
jmp 0x100183d8
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 0x1001853b
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 0x1001851b
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x10018419
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x1001844f
cmp eax, edx
jae 0x1001845d
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 0x100183f4
jmp 0x1001853b
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 0x10018516
cmp dword [ebp - 0x18], 0
je 0x10018516
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x1002df88]
test byte [eax + edi + 0x28], 0x48
je 0x100184ec
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 0x100184b0
mov word [esi], cx
jmp 0x100184e7
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x1002df88]
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 + 0x1002df88]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x1002df88]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x1001853b
pop eax
cmp word [ebp - 4], ax
jne 0x100184fc
cmp esi, ebx
jne 0x100184fc
mov word [esi], ax
jmp 0x10018538
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.100181e2
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x1001853b
push 0xd
pop eax
jmp 0x100184f7
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x1002df88]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x10018535
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x1001853b
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 0x1001bb78
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 0x1001bc15
push ebx
push esi
call fcn.1001bb41
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.1001bad5
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x1001bbc2
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1001bc14
push edi
push eax
call fcn.1001623c
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x1001bbe2
call fcn.10016202
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1001bc13
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1001bad5
add esp, 0x20
test eax, eax
jne 0x1001bc01
push edi
call fcn.10016202
jmp 0x1001bc09
push ebx
call fcn.10016202
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 0x1001be82
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10026e68
push 0x10026e60
push str.FlsAlloc
push 0x1f
call fcn.1001bd9e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1001beb6
push dword [ebp + 8]
mov ecx, esi
call dword [0x100241b8]
call esi
jmp 0x1001bebc
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x1001bf00
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10026e78
push 0x10026e70
push str.FlsGetValue
push 0x21
call fcn.1001bd9e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1001bf37
push dword [ebp + 8]
mov ecx, esi
call dword [0x100241b8]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x1001bf3f
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10026e80
push 0x10026e78
push str.FlsSetValue
push 0x22
call fcn.1001bd9e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1001bf79
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x100241b8]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x10020d41
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.10020cbd
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x10020eb0
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x10020eb0
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x10020e65
jg 0x10020d9d
test eax, eax
je 0x10020e5b
push 1
push 0x1000
call fcn.1001a564
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x10020dc0
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x10020e52
push 0x8000
push ebx
call fcn.10020bee
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x10020de9
jg 0x10020de4
cmp ecx, 0x1000
jb 0x10020de9
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.10019b9b
add esp, 0x10
cmp eax, 0xffffffff
je 0x10020e2e
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 0x10020de4
jl 0x10020e15
test ecx, ecx
jne 0x10020dd6
push dword [ebp - 0xc]
push ebx
call fcn.10020bee
push esi
call fcn.10016202
add esp, 0xc
xor ebx, ebx
jmp 0x10020ebe
cmp byte [edi + 0x24], 0
je 0x10020e45
cmp dword [edi + 0x20], 5
jne 0x10020e45
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x10020e50
mov ebx, dword [edi + 0x18]
jmp 0x10020e52
xor ebx, ebx
push esi
call fcn.10016202
pop ecx
jmp 0x10020ebe
test ecx, ecx
jg 0x10020e27
jl 0x10020e65
test eax, eax
jae 0x10020e27
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.100181e2
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x10020e85
cmp byte [edi + 0x1c], 0
je 0x10020e27
jmp 0x10020eb6
push ebx
call fcn.1001ea7a
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x10020e27
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 0x10020ebe
cmp byte [edi + 0x1c], 0
je 0x10020ebb
mov ebx, dword [edi + 0x18]
jmp 0x10020ebe
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.100181e2
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x10022ef0
Capabilities:
Parse pe header

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