joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407630
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x5000]
push edi
or ebp, 0xffffffff
jmp 0x407652
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x407659
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x407648
mov eax, 1
add ebx, ebx
jne 0x40766b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x407660
jne 0x40767c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x407660
xor ecx, ecx
sub eax, 3
jb 0x407690
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x407702
mov ebp, eax
add ebx, ebx
jne 0x40769b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x4076a8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x4076cc
inc ecx
add ebx, ebx
jne 0x4076b8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x4076ad
jne 0x4076c9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4076ad
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x4076ec
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x4076dd
jmp 0x40764e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x4076ec
add edi, ecx
jmp 0x40764e
pop esi
mov edi, esi
mov ecx, 0x1d
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x40770a
cmp byte [edi], 2
jne 0x40770a
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x40770f
lea edi, [esi + 0x5000]
mov eax, dword [edi]
or eax, eax
je 0x407787
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x8f04]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x8f5c]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x40773c
mov ecx, edi
jns 0x40776b
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x8f64]
or eax, eax
je 0x407781
mov dword [ebx], eax
add ebx, 4
jmp 0x407759
call dword [esi + 0x8f60]
mov ebp, dword [esi + 0x8f68]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x207]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x4077bb
sub esp, 0xffffff80
jmp 0x401a22
Function at 0x407250
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 4], ecx
mov eax, dword [ebp + 8]
push eax
call fcn.00405ee0
add esp, 4
push eax
lea ecx, [ebp - 0xc]
push ecx
call fcn.004073f0
add esp, 8
push eax
lea ecx, [ebp - 8]
call fcn.00407460
lea ecx, [ebp - 0xc]
call fcn.00407360
mov dword [ebp - 0x10], 0x4074a0
mov edx, dword [ebp - 4]
add edx, 4
push edx
push 0
lea ecx, [ebp - 8]
call fcn.00401630
push eax
mov eax, dword [ebp - 0x10]
push eax
push 0
push 0
call fcn.0040e21b
add esp, 0x18
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
cmp dword [edx], 0
je 0x4072c3
lea ecx, [ebp - 8]
call fcn.004069b0
jmp 0x4072d4
mov eax, dword [ebp - 4]
mov dword [eax + 4], 0
push 6
call fcn.00407902
lea ecx, [ebp - 8]
call fcn.00407360
mov esp, ebp
pop ebp
ret 4

Function at 0x40a44e
Capabilities:
Parse pe header

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

Function at 0x41673d
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42aa2c
push 0x42aa24
push str.FlsAlloc
push 0x1e
call fcn.0041656a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x416771
push dword [ebp + 8]
mov ecx, esi
call dword [0x42714c]
call esi
jmp 0x416777
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4167bb
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42aa3c
push 0x42aa34
push str.FlsGetValue
push 0x20
call fcn.0041656a
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4167f2
push dword [ebp + 8]
mov ecx, esi
call dword [0x42714c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4195a6
Capabilities:
Read file on windows

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

Function at 0x4195b1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004193d7
Function at 0x41ac1c
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0040a5c0
mov eax, dword [0x435018]
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.004183d9
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x41ac5e
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x41adba
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00426490
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 + 0x436b00]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.0041b042
mov ecx, dword [esi*4 + 0x436b00]
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 0x41adb3
cmp eax, dword [edi + ecx + 0x24]
jne 0x41adb3
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 0x41adb3
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0041b042
add esp, 0x14
test edx, edx
jl 0x41adb3
jg 0x41ad29
test eax, eax
jb 0x41adb3
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x41adb3
jl 0x41ad43
cmp dword [ebp - 0x1008], eax
ja 0x41adb3
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x41ad61
test ebx, ebx
je 0x41ad9a
cmp ecx, edi
jae 0x41ad9a
mov al, byte [ecx]
cmp al, 0xd
jne 0x41ad7b
lea eax, [edi - 1]
cmp ecx, eax
jae 0x41ad87
cmp byte [ecx + 1], 0xa
jne 0x41ad87
inc ecx
jmp 0x41ad87
movzx eax, al
movsx eax, byte [eax + 0x435980]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x41ad61
cmp edx, ebx
jne 0x41ad61
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x41adb8
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004097c7
leave
ret
Function at 0x41e9ad
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 0x41ea4a
push ebx
push esi
call fcn.0041e976
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.0041d5fb
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x41e9f7
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41ea49
push edi
push eax
call fcn.00417477
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x41ea17
call fcn.0041628f
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41ea48
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0041d5fb
add esp, 0x20
test eax, eax
jne 0x41ea36
push edi
call fcn.0041628f
jmp 0x41ea3e
push ebx
call fcn.0041628f
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 0x4235de
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 + 0x436b00]
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 0x42361e
cmp byte [ebx], 0xa
jne 0x42361e
or byte [eax + edi + 0x28], 4
jmp 0x423623
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x423721
mov al, byte [edx]
cmp al, 0x1a
je 0x423703
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x423652
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x423677
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x423681
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 0x423634
jmp 0x423721
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 0x4236fe
cmp dword [ebp - 0xc], 0
je 0x4236fe
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x436b00]
test byte [eax + edi + 0x28], 0x48
je 0x4236d8
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4236c3
mov byte [esi], dl
jmp 0x4236d4
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x436b00]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x423721
cmp byte [ebp - 1], 0xa
jne 0x4236e7
cmp esi, ebx
jne 0x4236e7
mov byte [esi], 0xa
jmp 0x423720
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041b060
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x423721
mov byte [esi], 0xd
jmp 0x423720
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x436b00]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x42371d
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x423721
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x42372a
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 + 0x436b00]
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 0x42376d
cmp word [esi], dx
jne 0x42376d
or byte [edi + eax + 0x28], 4
jmp 0x423772
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 0x4238c5
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 0x4238a5
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4237b4
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4237ea
cmp eax, edx
jae 0x4237f6
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 0x42378c
jmp 0x4238c5
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 0x4238a1
cmp dword [ebp - 0x14], 0
je 0x4238a1
mov eax, dword [ebx*4 + 0x436b00]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x423879
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x423842
mov word [esi], cx
jmp 0x423875
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x436b00]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x436b00]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x436b00]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4238c5
pop ebx
cmp word [ebp - 4], bx
jne 0x42388a
cmp esi, dword [ebp + 0xc]
jne 0x42388a
mov word [esi], bx
jmp 0x4238c2
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041b060
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4238c5
push 0xd
jmp 0x4238be
mov ecx, dword [ebx*4 + 0x436b00]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4238bc
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4238c5
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 0x426290
Capabilities:
Parse pe header

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

Function at 0x10003e00
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x10007018]
jne 0x10003e0a
repz ret
jmp fcn.100041c3
Function at 0x4014ef
Capabilities:
Get file version info

Disassembly:
push ebp
lea ebp, [esp - 0x198]
sub esp, 0x218
mov eax, dword [0x431d24]
push ebx
xor eax, ebp
push esi
push edi
mov dword [ebp + 0x194], eax
call fcn.0040143a
mov edx, eax
xor ebx, ebx
xor eax, eax
mov word [ebp - 0x74], bx
mov ecx, 0x81
lea edi, [ebp - 0x72]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea eax, [ebp - 0x74]
push eax
push edx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x80], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x74]
push eax
mov dword [ebp - 0x7c], ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
cmp esi, ebx
je 0x401564
lea eax, [esi + esi]
push eax
call fcn.00410fb6
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x40156b
xor eax, eax
jmp 0x4015f6
push edi
push esi
push ebx
lea eax, [ebp - 0x74]
push eax
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
mov esi, 0x433108
je 0x4015e2
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x78]
push eax
push 0x424850
push edi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x4015e2
mov eax, dword [ebp - 0x78]
push dword [eax + 0x30]
mov ecx, dword [eax + 0xc]
push dword [eax + 0x2c]
mov edx, dword [eax + 8]
push dword [eax + 0x28]
movzx ebx, cx
push dword [eax + 0x24]
push dword [eax + 0x20]
push dword [eax + 0x18]
push dword [eax + 0x1c]
push dword [eax]
push dword [eax + 0x14]
push dword [eax + 0x10]
movzx eax, dx
push ecx
push edx
push ebx
shr ecx, 0x10
push ecx
push eax
shr edx, 0x10
push edx
push str.FileVersion_:__d._d._d._d___FileVersionMS_:_0x_08x__FileVersionLS_:_0x_08x__ProductVersionMS_:_0x_08x__ProductVersionLS_:_0x_08x__Signature_:_0x_08x__FileFlags_:_0x_08x__FileFlagsMask_:_0x_08x__FileOS_:_0x_08x__FileType_:_0x_08x__FileSubType_:_0x_08x__FileDateMS_:_0x_08x__FileDateLS_:_0x_08x__
push 0x168
push esi
call fcn.00413b3d
add esp, 0x4c
push edi
call fcn.00413d59
mov ax, word [0x433108]
neg ax
pop ecx
sbb eax, eax
and eax, esi
mov ecx, dword [ebp + 0x194]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00413d8f
add ebp, 0x198
leave
ret
Function at 0x40178a
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
lea ebp, [esp - 0x88]
sub esp, 0x108
mov eax, dword [0x431d24]
push ebx
mov ebx, dword [ebp + 0x90]
push edi
xor eax, ebp
mov dword [ebp + 0x84], eax
push 0x40
xor eax, eax
test ebx, ebx
mov byte [ebp - 0x80], 0
pop ecx
lea edi, [ebp - 0x7f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
jne 0x4017c6
xor eax, eax
jmp 0x40181a
lea edi, [ebx + 1]
mov al, byte [edi]
test al, al
push esi
je 0x401816
mov esi, edi
sub esi, ebx
cmp al, 0x5c
jne 0x40180e
push esi
lea eax, [ebp - 0x80]
push ebx
push eax
call fcn.004132a0
add esp, 0xc
lea eax, [ebp - 0x80]
push eax
mov byte [ebp + esi - 0x80], 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4017fe
test al, 0x10
jne 0x40180e
push 0
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x401833
inc edi
mov al, byte [edi]
inc esi
test al, al
jne 0x4017d4
xor eax, eax
inc eax
pop esi
mov ecx, dword [ebp + 0x84]
pop edi
xor ecx, ebp
pop ebx
call fcn.00413d8f
add ebp, 0x88
leave
ret 4
xor eax, eax
jmp 0x401819

Function at 0x401837
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
lea ebp, [esp - 0x190]
sub esp, 0x210
mov eax, dword [0x431d24]
and word [ebp - 0x7c], 0
mov edx, dword [ebp + 0x198]
xor eax, ebp
push edi
mov dword [ebp + 0x18c], eax
xor eax, eax
test edx, edx
mov ecx, 0x81
lea edi, [ebp - 0x7a]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x80], edx
stosw word es:[edi], ax
jne 0x401877
xor eax, eax
jmp 0x4018df
lea edi, [edx + 2]
mov ax, word [edi]
test ax, ax
push ebx
push esi
je 0x4018da
mov ebx, edi
sub ebx, edx
cmp ax, 0x5c
jne 0x4018ce
mov esi, ebx
sar esi, 1
shl esi, 1
push esi
push edx
lea eax, [ebp - 0x7c]
push eax
call fcn.004132a0
and word [ebp + esi - 0x7c], 0
add esp, 0xc
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4018bb
test al, 0x10
jne 0x4018cb
push 0
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4018f7
mov edx, dword [ebp - 0x80]
inc edi
inc edi
mov ax, word [edi]
inc ebx
inc ebx
test ax, ax
jne 0x401888
xor eax, eax
inc eax
pop esi
pop ebx
mov ecx, dword [ebp + 0x18c]
xor ecx, ebp
pop edi
call fcn.00413d8f
add ebp, 0x190
leave
ret 4
xor eax, eax
jmp 0x4018dd
Function at 0x4031f5
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 0x10]
mov eax, dword [esi]
and dword [esi], 0
push edi
mov edi, dword [ebp + 0xc]
shl eax, 1
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push edi
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 8]
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x403253
cmp dword [ebp + 0x10], 1
je 0x403231
cmp dword [ebp + 0x10], 2
jne 0x403248
test edi, edi
mov eax, dword [ebp - 4]
je 0x40324d
test al, 1
jne 0x403248
mov ecx, eax
shr ecx, 1
cmp word [edi + ecx*2 - 2], 0
je 0x40324d
push 0xd
pop eax
jmp 0x403253
shr eax, 1
mov dword [esi], eax
xor eax, eax
pop edi
pop esi
leave
ret 0xc

Function at 0x40655f
Capabilities:
Print debug messages

Disassembly:
mov eax, 0x4227a1
call fcn.00414798
sub esp, 0x2cc
mov eax, dword [0x431d24]
push ebx
mov ebx, dword [ebp + 8]
xor eax, ebp
push esi
xor esi, esi
mov dword [ebp - 0x10], eax
cmp dword [0x434a28], esi
je 0x4066f4
push edi
push 0x7f
mov word [ebp - 0x210], si
pop ecx
xor eax, eax
lea edi, [ebp - 0x20e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
call fcn.004016cc
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0x425ebc
lea eax, [ebp - 0x210]
push 0x100
push eax
call fcn.00413b3d
add esp, 0x14
push ebx
lea ecx, [ebp - 0x2a0]
call fcn.00405af3
mov edi, eax
mov dword [ebp - 4], esi
push 0x425eb8
lea ecx, [ebp - 0x268]
call fcn.00405af3
mov dword [ebp - 0x230], eax
xor ebx, ebx
inc ebx
mov byte [ebp - 4], bl
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0x2bc]
call fcn.00405af3
mov byte [ebp - 4], 2
push dword [ebp - 0x230]
push eax
lea eax, [ebp - 0x24c]
push eax
call fcn.004058d9
mov byte [ebp - 4], 3
push edi
push eax
lea eax, [ebp - 0x2d8]
push eax
call fcn.004058d9
mov byte [ebp - 4], 4
push 0x425eb4
push eax
lea eax, [ebp - 0x284]
push eax
call fcn.00406349
mov byte [ebp - 4], 5
push str._Module_Unloading____n
push eax
lea eax, [ebp - 0x22c]
push eax
call fcn.00406349
add esp, 0x30
mov byte [ebp - 4], 0xc
push esi
push ebx
lea ecx, [ebp - 0x284]
call fcn.00403c42
mov byte [ebp - 4], 0xb
push esi
push ebx
lea ecx, [ebp - 0x2d8]
call fcn.00403c42
mov byte [ebp - 4], 0xa
push esi
push ebx
lea ecx, [ebp - 0x24c]
call fcn.00403c42
mov byte [ebp - 4], 9
push esi
push ebx
lea ecx, [ebp - 0x2bc]
call fcn.00403c42
mov byte [ebp - 4], 8
push esi
push ebx
lea ecx, [ebp - 0x268]
call fcn.00403c42
mov byte [ebp - 4], 7
push esi
push ebx
lea ecx, [ebp - 0x2a0]
call fcn.00403c42
cmp dword [ebp - 0x214], 8
mov eax, dword [ebp - 0x228]
pop edi
jae 0x4066dc
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
or dword [ebp - 4], 0xffffffff
push esi
push ebx
lea ecx, [ebp - 0x22c]
call fcn.00403c42
mov ecx, dword [ebp - 0xc]
mov eax, dword [0x434a28]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
xor ecx, ebp
pop ebx
call fcn.00413d8f
leave
ret
Function at 0x406ca8
Capabilities:
Delete file
Enumerate files on windows

Disassembly:
mov eax, 0x42280c
call fcn.00414798
sub esp, 0x4b8
mov eax, dword [0x431d24]
push ebx
push esi
push edi
push 7
pop esi
mov edi, ecx
xor eax, ebp
xor ebx, ebx
push ebx
lea ecx, [ebp - 0x250]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x4a8], edi
mov dword [ebp - 0x238], esi
call fcn.0040352e
mov dword [ebp - 4], ebx
add edi, 0xf8
push edi
lea ecx, [ebp - 0x4c4]
call fcn.00405ab0
mov byte [ebp - 4], 1
lea eax, [ebp - 0x250]
push eax
lea eax, [ebp - 0x4c4]
push eax
call fcn.004067f5
pop ecx
pop ecx
mov byte [ebp - 4], bl
push ebx
push 1
lea ecx, [ebp - 0x4c4]
call fcn.004042af
cmp dword [ebp - 0x238], 8
mov eax, dword [ebp - 0x24c]
jae 0x406d38
lea eax, [ebp - 0x24c]
push dword [ebp + 8]
mov dword [ebp - 0x4a4], eax
mov word [ebp - 0x218], bx
xor eax, eax
mov ecx, 0x81
lea edi, [ebp - 0x216]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp - 0x4a8]
stosw word es:[edi], ax
call fcn.0040160e
push eax
push str.TSLOG
push dword [ebp - 0x4a4]
lea eax, [ebp - 0x218]
push str._s_s._s__d_..log
push 0x104
push eax
call fcn.00413b3d
add esp, 0x1c
lea eax, [ebp - 0x4a0]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
push ebx
lea ecx, [ebp - 0x234]
mov edi, eax
mov dword [ebp - 0x21c], esi
call fcn.0040352e
mov byte [ebp - 4], 2
cmp edi, 0xffffffff
je 0x406e4c
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x4a4]
lea ecx, [ebp - 0x234]
call fcn.0040587c
lea eax, [ebp - 0x474]
push eax
lea ecx, [ebp - 0x234]
call fcn.0040585f
cmp dword [ebp - 0x21c], 8
mov eax, dword [ebp - 0x230]
jae 0x406dfc
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x406e36
cmp dword [ebp - 0x21c], 8
mov eax, dword [ebp - 0x230]
jae 0x406e1c
lea eax, [ebp - 0x230]
push eax
call esi
push eax
call esi
push eax
push str.DeleteLogFile_Failed__ErrorCode_:__d_0x_08x___LogFilePath_:__s
push dword [ebp - 0x4a8]
call fcn.0040b177
add esp, 0x14
lea eax, [ebp - 0x4a0]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x406dc4
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov byte [ebp - 4], bl
push ebx
push 1
lea ecx, [ebp - 0x234]
call fcn.00403c42
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x250]
call fcn.00403c42
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
xor ecx, ebp
pop ebx
call fcn.00413d8f
leave
ret 4