joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4d6678
Capabilities:
Check for time delay via gettickcount
Log keystrokes via polling

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
xor ebx, ebx
push 1
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], ebx
call edi
test ax, ax
jge 0x4d66a0
or dword [esi + 0x38], 1
or dword [esi + 0x34], 2
jmp 0x4d66b1
push 2
call edi
test ax, ax
jge 0x4d66b1
or dword [esi + 0x38], 2
or dword [esi + 0x34], 1
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebp
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x34]
push dword [eax + 0x1c]
call dword [sym.imp.USER32.dll_SetCapture]
push eax
call fcn.004ca6d4
cmp dword [esi + 0x30], ebx
jne 0x4d678b
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
mov ebx, 0x100
call dword [sym.imp.USER32.dll_GetCapture]
push eax
call fcn.004ca6d4
cmp eax, dword [esp + 0x34]
jne 0x4d678b
push 1
push 0x209
push 0x200
lea eax, [esp + 0x20]
push 0
push eax
call edi
test eax, eax
jne 0x4d6727
push 1
push 0x108
push ebx
push eax
lea eax, [esp + 0x24]
push eax
call edi
test eax, eax
je 0x4d676c
mov eax, dword [esp + 0x18]
cmp eax, 0x202
je 0x4d678b
cmp eax, 0x205
je 0x4d678b
cmp eax, 0x201
je 0x4d678b
cmp eax, 0x204
je 0x4d678b
cmp eax, ebx
jne 0x4d6752
cmp dword [esp + 0x1c], 0x1b
je 0x4d678b
push dword [esp + 0x2c]
lea eax, [esi + 0x20]
push dword [esp + 0x2c]
push eax
call dword [sym.imp.USER32.dll_PtInRect]
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x30], eax
call ebp
sub eax, dword [esp + 0x10]
cmp eax, dword [0x64aa94]
jbe 0x4d6781
mov dword [esi + 0x30], 1
cmp dword [esi + 0x30], 0
je 0x4d66e4
call dword [sym.imp.USER32.dll_ReleaseCapture]
mov eax, dword [esi + 0x30]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4

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 0x408df6
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
lea ebx, [ebp - 0x244]
sub esp, 0x254
mov dword [esp + 4], 0x104
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push edx
push edx
lea edx, [eax - 1]
cmp edx, 0x103
ja 0x408e34
xor edx, edx
cmp word [ebp + eax*2 - 0x246], 0x5c
sete dl
jmp 0x408e3b
xor eax, eax
mov edx, 1
mov ecx, dword [ebp + 8]
add edx, edx
add eax, eax
mov dword [esp + 4], str._s_S.dll
add edx, 0x40c660
add eax, ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp], eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov dword [esp], ebx
mov dword [esp + 8], 8
mov dword [esp + 4], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov ebx, dword [ebp - 4]
sub esp, 0xc
leave
ret 4

Function at 0x408fdc
Capabilities:
Hash data with crc32

Disassembly:
push ebp
cmp dword [0x43d564], 0
mov ebp, esp
push esi
mov edx, dword [ebp + 0xc]
push ebx
jne 0x409019
xor ecx, ecx
mov eax, ecx
mov ebx, 8
mov esi, eax
shr esi, 1
and eax, 1
je 0x409004
mov eax, 0xedb88320
xor eax, esi
dec ebx
jne 0x408ff6
mov dword [ecx*4 + 0x43d560], eax
inc ecx
cmp ecx, 0x100
jne 0x408fef
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
not eax
add ebx, edx
cmp edx, ebx
je 0x40903b
mov cl, byte [edx]
inc edx
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x43d560]
jmp 0x409023
pop ebx
not eax
pop esi
pop ebp
ret 0xc

Function at 0x43b63d
Capabilities:
Encode data using xor

Disassembly:
mov ecx, 0x43b3c1
push 0x36d393c6
pop eax
call fcn.0043b676
mov ebx, 0x77f64c4d
xor dword [edx], ecx
add ebx, 0xd3b95530
add eax, 1
add edx, 1
add eax, ebx
mov ebx, ebx
cmp edx, esi
jne fcn.0043b63d
dec ebx
inc ebx
ret
Function at 0x1000a450
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x10]
xor ebx, ebx
cmp dword [esi + 4], ebx
push edi
jle 0x1000a468
mov eax, dword [esi + 0x14]
test byte [eax + 8], 1
jne 0x1000a4d4
push ebp
push esi
mov ecx, ebp
call fcn.1000a8f0
add esp, 8
xor ecx, ecx
cmp dword [esi + 0x10], ebx
jle 0x1000a48b
jmp 0x1000a480
mov edx, dword [eax]
mov dword [edx + ecx*4], ebx
inc ecx
cmp ecx, dword [esi + 0x10]
jl 0x1000a480
mov ecx, dword [esi + 0x28]
mov ecx, dword [ecx + 0xc]
mov edi, dword [eax]
mov edx, ecx
shr edx, 5
lea edx, [edi + edx*4]
and ecx, 0x1f
mov edi, 1
shl edi, cl
or dword [edx], edi
mov ecx, dword [esi + 0x10]
cmp ecx, 1
jne 0x1000a4b5
mov ecx, dword [eax]
mov edx, dword [ecx]
jmp 0x1000a4ca
xor edx, edx
cmp ecx, ebx
jle 0x1000a4ca
mov ecx, dword [eax]
mov edi, dword [esi + 0x10]
xor edx, dword [ecx]
add ecx, 4
sub edi, 1
jne 0x1000a4c0
mov dword [eax + 4], edx
mov dword [eax + 8], 0xd
xor ecx, ecx
cmp dword [esi + 4], ebx
jle 0x1000a4f0
xor edx, edx
lea ecx, [ecx]
mov edi, dword [esi + 0x14]
mov dword [edx + edi + 0x14], ebx
inc ecx
add edx, 0x20
cmp ecx, dword [esi + 4]
jl 0x1000a4e0
mov dword [eax + 0x14], ebp
pop edi
pop ebp
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], ebx
pop ebx
pop ecx
ret
Function at 0x10014ed0
Capabilities:
Query environment variable

Disassembly:
push ebx
push 0x100bcd5c
call dword [sym.imp.MSVCR90.dll_getenv]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x10014f8e
mov ecx, dword [0x100d34e8]
test ecx, ecx
je 0x10014f20
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10014f13
test dl, dl
je 0x10014f0f
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10014f13
add eax, 2
add ecx, 2
test dl, dl
jne 0x10014ef3
xor eax, eax
jmp 0x10014f18
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10014fb6
call dword [sym.imp.MSVCR90.dll__tzset]
mov eax, dword [0x100d34e8]
test eax, eax
je 0x10014f39
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov eax, ebx
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10014f40
push esi
sub eax, edx
push edi
lea edi, [eax + 1]
push edi
call dword [sym.imp.MSVCR90.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
jne 0x10014f70
test edi, edi
je 0x10014f70
push edi
push str.unable_to_alloc__u_bytes
call sym.tcl85.dll_Tcl_Panic
add esp, 8
mov dword [0x100d34e8], esi
mov eax, ebx
sub esi, ebx
lea ebx, [ebx]
mov cl, byte [eax]
mov byte [esi + eax], cl
inc eax
test cl, cl
jne 0x10014f80
pop edi
pop esi
pop ebx
ret
cmp dword [0x100d34e8], 0
je 0x10014fb6
call dword [sym.imp.MSVCR90.dll__tzset]
mov eax, dword [0x100d34e8]
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov dword [0x100d34e8], 0
pop ebx
ret
Function at 0x10045050
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x100d351c]
test eax, eax
je 0x10045070
mov ecx, dword [esp + 4]
push ecx
call eax
add esp, 4
mov dword [esp + 4], str.AppExitProc_returned_unexpectedly
jmp sym.tcl85.dll_Tcl_Panic
call sym.tcl85.dll_Tcl_Finalize
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.MSVCR90.dll_exit]
int3
Function at 0x10059e40
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, dword [0x100d3214]
sub esp, 0xc
push ebx
push ebp
push esi
push edi
test eax, eax
jne 0x10059ea1
push 0x24
call dword [sym.imp.MSVCR90.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
jne 0x10059e70
push 0x24
push str.unable_to_alloc__u_bytes
call sym.tcl85.dll_Tcl_Panic
add esp, 8
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov ebx, 0x100d3214
mov dword [0x100d3214], esi
call fcn.1008f950
mov eax, dword [0x100d3214]
mov esi, eax
add eax, 4
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], eax
mov edi, edi
mov eax, dword [esp + 0x14]
mov ebx, dword [eax]
test ebx, ebx
je 0x10059ed3
lea ebx, [ebx]
test dword [ebx + 4], 0x82100
mov edi, dword [ebx + 0x70]
je 0x10059efd
mov ebx, dword [ebx + 0x78]
test ebx, ebx
jne 0x10059ec0
call fcn.100aada0
cmp dword [0x100d3460], 0
je 0x10059ef5
push 0
push 0x100a8550
push 0x100a8490
call sym.tcl85.dll_Tcl_DeleteEventSource
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push 0x100c1ef4
push str._blocking
push edi
push 0
call sym.tcl85.dll_Tcl_SetChannelOption
add esp, 0x10
cmp edi, dword [esi + 8]
je 0x10059f21
cmp edi, dword [esi + 0x10]
je 0x10059f21
cmp edi, dword [esi + 0x18]
jne 0x10059f24
dec dword [ebx + 0x30]
cmp dword [ebx + 0x30], 0
jg 0x10059f3a
push edi
push 0
call sym.tcl85.dll_Tcl_Close
add esp, 8
jmp 0x10059eb0
mov esi, dword [edi]
mov ebp, dword [esi + 0x70]
mov edx, 4
call fcn.1005e840
test eax, eax
jne 0x10059f6c
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x10059f5f
mov ecx, dword [eax]
cmp ecx, dword [eax + 4]
jle 0x10059f5f
or dword [esi + 4], 0x40
push 0
push ebp
push 0
call fcn.1005b2f0
add esp, 0xc
mov eax, dword [edi + 8]
mov ecx, dword [eax + 8]
push 0
cmp ecx, 1
je 0x10059f84
mov edx, dword [edi + 4]
push edx
call ecx
add esp, 8
jmp 0x10059f92
mov ecx, dword [edi + 4]
mov edx, dword [eax + 0x28]
push 0
push ecx
call edx
add esp, 0xc
mov esi, dword [esp + 0x18]
mov dword [edi + 4], 0
or dword [ebx + 4], 0x2000
jmp 0x10059eb0
Function at 0x1005b900
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, dword [0x100d3214]
push ebp
mov ebp, dword [esp + 8]
push esi
test eax, eax
jne 0x1005b962
push 0x24
call dword [sym.imp.MSVCR90.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
jne 0x1005b92f
push 0x24
push str.unable_to_alloc__u_bytes
call sym.tcl85.dll_Tcl_Panic
add esp, 8
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
push ebx
mov dword [esi + 0x20], eax
mov ebx, 0x100d3214
mov dword [0x100d3214], esi
call fcn.1008f950
mov eax, dword [0x100d3214]
pop ebx
mov esi, dword [eax + 4]
push edi
mov edi, dword [ebp]
test esi, esi
je 0x1005b98d
cmp edi, esi
jne 0x1005b979
mov ecx, dword [edi + 0x78]
mov dword [eax + 4], ecx
jmp 0x1005b9a0
test esi, esi
je 0x1005b98d
lea ecx, [ecx]
mov eax, dword [esi + 0x78]
cmp eax, edi
je 0x1005b99a
mov esi, eax
test esi, esi
jne 0x1005b980
push str.FlushChannel:_damaged_channel_list
call sym.tcl85.dll_Tcl_Panic
add esp, 4
mov edx, dword [edi + 0x78]
mov dword [esi + 0x78], edx
mov dword [edi + 0x78], 0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 4]
pop edi
cmp eax, 2
je 0x1005b9d4
cmp eax, 3
je 0x1005b9d4
cmp eax, 4
je 0x1005b9c2
cmp eax, 5
jne 0x1005b9d4
mov ecx, dword [ecx + 0x3c]
test ecx, ecx
je 0x1005b9d4
mov eax, dword [ebp + 4]
push 1
push eax
call ecx
add esp, 8
pop esi
pop ebp
ret

Function at 0x1005b9e0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [eax]
mov eax, dword [0x100d3214]
push ebp
mov ebp, dword [ecx + 0x74]
push esi
test eax, eax
jne 0x1005ba47
push 0x24
call dword [sym.imp.MSVCR90.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
jne 0x1005ba14
push 0x24
push str.unable_to_alloc__u_bytes
call sym.tcl85.dll_Tcl_Panic
add esp, 8
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
push ebx
mov dword [esi + 0x20], eax
mov ebx, 0x100d3214
mov dword [0x100d3214], esi
call fcn.1008f950
mov eax, dword [0x100d3214]
pop ebx
mov esi, dword [eax + 4]
push edi
mov edi, dword [ebp]
test esi, esi
je 0x1005ba6f
cmp edi, esi
jne 0x1005ba5e
mov edx, dword [edi + 0x78]
mov dword [eax + 4], edx
jmp 0x1005ba82
test esi, esi
je 0x1005ba6f
mov eax, dword [esi + 0x78]
cmp eax, edi
je 0x1005ba7c
mov esi, eax
test esi, esi
jne 0x1005ba62
push str.FlushChannel:_damaged_channel_list
call sym.tcl85.dll_Tcl_Panic
add esp, 4
mov eax, dword [edi + 0x78]
mov dword [esi + 0x78], eax
mov dword [edi + 0x78], 0
pop edi
lea ebx, [ebx]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 4]
cmp eax, 2
je 0x1005babc
cmp eax, 3
je 0x1005babc
cmp eax, 4
je 0x1005baaa
cmp eax, 5
jne 0x1005babc
mov eax, dword [ecx + 0x3c]
test eax, eax
je 0x1005babc
mov ecx, dword [ebp + 4]
push 1
push ecx
call eax
add esp, 8
mov ebp, dword [ebp + 0x10]
test ebp, ebp
jne 0x1005ba90
pop esi
pop ebp
ret
Function at 0x1005bb90
Capabilities:
Resolve function by parsing pe exports

Disassembly:
cmp dword [0x100d3214], 0
mov eax, dword [esp + 4]
mov ecx, dword [eax]
push ebx
push esi
push edi
mov edi, dword [ecx + 0x74]
jne 0x1005bbf1
push 0x24
call dword [sym.imp.MSVCR90.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
jne 0x1005bbc5
push 0x24
push str.unable_to_alloc__u_bytes
call sym.tcl85.dll_Tcl_Panic
add esp, 8
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov ebx, 0x100d3214
mov dword [0x100d3214], esi
call fcn.1008f950
mov esi, dword [edi]
cmp dword [esi + 0x78], 0
mov ebx, dword [0x100d3214]
je 0x1005bc0c
push str.SpliceChannel:_trying_to_add_channel_used_in_different_list
call sym.tcl85.dll_Tcl_Panic
add esp, 4
mov edx, dword [ebx + 4]
mov dword [esi + 0x78], edx
mov dword [ebx + 4], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi + 0x7c], eax
mov edi, edi
mov ecx, dword [edi + 8]
mov eax, dword [ecx + 4]
cmp eax, 2
je 0x1005bc4c
cmp eax, 3
je 0x1005bc4c
cmp eax, 4
je 0x1005bc3a
cmp eax, 5
jne 0x1005bc4c
mov eax, dword [ecx + 0x3c]
test eax, eax
je 0x1005bc4c
mov ecx, dword [edi + 4]
push 0
push ecx
call eax
add esp, 8
mov edi, dword [edi + 0x10]
test edi, edi
jne 0x1005bc20
pop edi
pop esi
pop ebx
ret

Function at 0x10065270
Capabilities:
Set socket configuration

Disassembly:
sub esp, 8
cmp dword [0x100d35f0], 1
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_getsockopt]
push ebp
push esi
mov esi, dword [esp + 0x18]
mov ebp, 4
push edi
mov dword [esp + 0x10], ebp
jne 0x100652aa
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x18]
push ecx
push 0x1001
push 0xffff
push esi
call ebx
mov edx, dword [esp + 0x14]
cmp edx, dword [esp + 0x20]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
jge 0x100652da
cmp dword [0x100d35f0], 1
mov dword [esp + 0x10], ebp
jne 0x100652da
push ebp
lea eax, [esp + 0x24]
push eax
push 0x1001
push 0xffff
push esi
call edi
cmp dword [0x100d35f0], 1
mov dword [esp + 0x10], ebp
jne 0x100652fe
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x18]
push edx
push 0x1002
push 0xffff
push esi
call ebx
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x14], eax
jge 0x10065328
cmp dword [0x100d35f0], 1
mov dword [esp + 0x10], ebp
jne 0x10065328
push ebp
lea ecx, [esp + 0x24]
push ecx
push 0x1002
push 0xffff
push esi
call edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
Function at 0x1009e370
Capabilities:
Get system information on windows

Disassembly:
mov eax, dword [0x100d344c]
sub esp, 0x44
test eax, eax
jne 0x1009e3bb
push ebx
push esi
push 4
call dword [sym.imp.MSVCR90.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
jne 0x1009e39e
push 4
push str.unable_to_alloc__u_bytes
call sym.tcl85.dll_Tcl_Panic
add esp, 8
mov dword [esi], 0
mov ebx, 0x100d344c
mov dword [0x100d344c], esi
call fcn.1008f950
mov eax, dword [0x100d344c]
pop esi
pop ebx
mov dword [esp], eax
mov eax, dword [eax]
test eax, eax
je 0x1009e3cb
lea ecx, [esp]
cmp ecx, eax
jae 0x1009e42a
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push 0x1c
lea eax, [esp + 8]
push eax
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x1009e416
mov eax, dword [esp]
cmp dword [eax], 0
jne 0x1009e42a
mov edx, dword [esp + 0x24]
dec edx
not edx
lea ecx, [esp]
and edx, ecx
mov dword [eax], edx
mov eax, dword [esp]
mov ecx, dword [eax]
mov edx, dword [esp + 0x48]
mov dword [edx], ecx
mov eax, 1
add esp, 0x44
ret
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 8]
lea ecx, [eax + edx + 0x8000]
mov edx, dword [esp]
mov dword [edx], ecx
mov eax, dword [esp]
mov ecx, dword [eax]
mov edx, dword [esp + 0x48]
mov dword [edx], ecx
mov eax, 1
add esp, 0x44
ret
Function at 0x1009e440
Capabilities:
Link many functions at runtime

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [0x100d3444]
push edi
call fcn.10040e50
xor ebp, ebp
cmp dword [esp + 0x14], ebp
je 0x1009e58b
push str.unicode
push ebp
mov dword [0x100d3a70], 0x100d02d8
call sym.tcl85.dll_Tcl_GetEncoding
mov dword [0x100d3444], eax
mov eax, dword [0x100d3a70]
add esp, 8
cmp dword [eax + 0x68], ebp
jne 0x1009e5fa
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.kernel32
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
cmp edi, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_FreeLibrary]
je 0x1009e4fd
push str.GetFileAttributesExW
push edi
call esi
mov ecx, dword [0x100d3a70]
push str.CreateHardLinkW
push edi
mov dword [ecx + 0x68], eax
call esi
mov edx, dword [0x100d3a70]
push str.FindFirstFileExW
push edi
mov dword [edx + 0x6c], eax
call esi
mov ecx, dword [0x100d3a70]
push str.GetVolumeNameForVolumeMountPointW
push edi
mov dword [ecx + 0x70], eax
call esi
mov edx, dword [0x100d3a70]
push str.GetLongPathNameW
push edi
mov dword [edx + 0x74], eax
call esi
mov ecx, dword [0x100d3a70]
push edi
mov dword [ecx + 0x78], eax
call ebp
push str.advapi32
call ebx
mov edi, eax
test edi, edi
je 0x1009e5fa
push str.GetFileSecurityW
push edi
call esi
mov edx, dword [0x100d3a70]
push str.ImpersonateSelf
push edi
mov dword [edx + 0x7c], eax
call esi
mov ecx, dword [0x100d3a70]
push str.OpenThreadToken
push edi
mov dword [ecx + 0x80], eax
call esi
mov edx, dword [0x100d3a70]
push str.RevertToSelf
push edi
mov dword [edx + 0x84], eax
call esi
mov ecx, dword [0x100d3a70]
push str.MapGenericMask
push edi
mov dword [ecx + 0x88], eax
call esi
mov edx, dword [0x100d3a70]
push str.AccessCheck
push edi
mov dword [edx + 0x8c], eax
call esi
mov ecx, dword [0x100d3a70]
push edi
mov dword [ecx + 0x90], eax
call ebp
pop edi
pop esi
pop ebp
pop ebx
ret
mov dword [0x100d3a70], 0x100d0238
mov dword [0x100d3444], ebp
cmp dword [0x100d02a0], ebp
jne 0x1009e5fa
push str.kernel32
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebp
je 0x1009e5fa
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GetFileAttributesExA
push esi
call edi
mov edx, dword [0x100d3a70]
push str.CreateHardLinkA
push esi
mov dword [edx + 0x68], eax
call edi
mov ecx, dword [0x100d3a70]
push str.GetVolumeNameForVolumeMountPointA
push esi
mov dword [ecx + 0x6c], eax
mov dword [ecx + 0x70], ebp
mov dword [ecx + 0x78], ebp
call edi
mov ecx, dword [0x100d3a70]
push esi
mov dword [ecx + 0x74], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x100a03f0
Capabilities:
Create thread

Disassembly:
sub esp, 0x2c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x28], eax
push ebp
push esi
push edi
mov edi, ecx
call fcn.1009f920
push 0x205c
call dword [sym.imp.MSVCR90.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
jne 0x100a042e
push 0x205c
push str.unable_to_alloc__u_bytes
call sym.tcl85.dll_Tcl_Panic
add esp, 8
push 0x205c
push 0
push esi
call sub.MSVCR90.dll_memset
mov eax, dword [esp + 0x48]
add esp, 0xc
mov dword [esi + 0x10], ebx
mov dword [esi], eax
mov dword [esi + 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
push eax
lea ecx, [esp + 0x1c]
push str.cp_d
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push esi
push str.file_x
push edi
mov dword [esi + 0x1c], eax
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
push ebx
push esi
push edi
push 0x100d01a8
call sym.tcl85.dll_Tcl_CreateChannel
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateThread]
add esp, 0x10
mov dword [esi + 0xc], eax
test bl, 2
je 0x100a0514
mov eax, dword [esi]
lea edx, [esp + 0x10]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov eax, dword [esp + 0x10]
and eax, 0xffffffe7
or eax, 2
mov dword [esp + 0x10], eax
mov ecx, dword [esi]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
push 0
push 1
push 1
push 0
call edi
push 0
push 0
push 0
push 0
mov dword [esi + 0x2c], eax
call edi
push 0
push 0
push 0
push 0
mov dword [esi + 0x38], eax
call edi
lea edx, [esp + 0x14]
push edx
push 0
push esi
push 0x100a01f0
push pe_nt_image_headers32
push 0
mov dword [esi + 0x3c], eax
call ebp
push 2
push eax
mov dword [esi + 0x24], eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
test bl, 4
je 0x100a0562
push 0
push 1
push 1
push 0
call edi
push 0
push 0
push 0
push 0
mov dword [esi + 0x28], eax
call edi
push 0
push 0
push 0
push 0
mov dword [esi + 0x30], eax
call edi
mov dword [esi + 0x34], eax
lea eax, [esp + 0x14]
push eax
push 0
push esi
push 0x100a02f0
push pe_nt_image_headers32
push 0
call ebp
push 2
push eax
mov dword [esi + 0x20], eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov ecx, dword [esi + 0xc]
push str.auto
push str._translation
push ecx
push 0
call sym.tcl85.dll_Tcl_SetChannelOption
mov edx, dword [esi + 0xc]
push 0x100c76ec
push str._eofchar
push edx
push 0
call sym.tcl85.dll_Tcl_SetChannelOption
mov eax, dword [0x100d3a70]
add esp, 0x20
cmp dword [eax], 0
je 0x100a05a9
mov ecx, dword [esi + 0xc]
push str.unicode
push str._encoding
push ecx
jmp 0x100a05b7
mov eax, dword [esi + 0xc]
lea edx, [esp + 0x18]
push edx
push str._encoding
push eax
push 0
call sym.tcl85.dll_Tcl_SetChannelOption
mov eax, dword [esi + 0xc]
mov ecx, dword [esp + 0x44]
add esp, 0x10
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.100b1b48
add esp, 0x2c
ret
Function at 0x100a0b80
Capabilities:
Read file on windows

Disassembly:
xor eax, eax
mov dword [esi + 0xc], eax
mov dword [esi + 8], eax
mov eax, dword [esi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
mov eax, dword [ebx]
push esi
push edi
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x100a0bcc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x100a0bbb
xor eax, eax
ret
mov ecx, dword [ebx]
push 1
push edi
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x100a0bb8
mov eax, 1
ret

Function at 0x100a0be0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [edi + 0x10]
push ebx
push ebp
mov ebp, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea ebx, [esi + 0x68]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esp + 0x14]
sub dword [esi + 0x9c], ebp
mov edx, dword [esp + 0xc]
push edi
push ecx
xor eax, eax
push ebp
mov dword [edi + 0xc], eax
mov dword [edi + 8], eax
mov eax, dword [esi]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x100a0c5b
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x3e5
je 0x100a0c46
sub eax, 0x7c
je 0x100a0c5b
pop ebp
xor eax, eax
pop ebx
ret
mov ecx, dword [esp + 0x14]
mov edx, dword [esi]
push 1
push ecx
push edi
push edx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x100a0c41
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
sub ecx, ebp
add dword [esi + 0x9c], ecx
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebp
mov eax, 1
pop ebx
ret