joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40e818
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
mov ebx, eax
push edi
mov dword [ebp - 4], edx
xor edx, edx
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0xc18], edx
cmp byte [ebx + 0x16], 0
mov esi, ecx
je 0x40e83b
mov al, 1
cmp byte [ebp + 8], 0
mov edi, 0x80000000
je 0x40e84c
or edi, 0x40000000
mov dword [ebp - 8], 1
test al, al
je 0x40e85b
or dword [ebp - 8], 2
xor eax, eax
cmp byte [ebx + 0x15], 0
jne 0x40e868
add eax, 0x8000000
mov dword [ebp - 0xc], eax
call fcn.0040571c
test eax, eax
je 0x40e895
test esi, esi
je 0x40e895
cmp word [esi], 0
je 0x40e895
push 0
push dword [ebp - 0xc]
push 3
push 0
push dword [ebp - 8]
push edi
push esi
call sub.KERNEL32.DLL_CreateFileW
mov edi, eax
jmp 0x40e8ac
push 0
push dword [ebp - 0xc]
push 3
push 0
push dword [ebp - 8]
push edi
push dword [ebp - 4]
call sub.KERNEL32.DLL_CreateFileA
mov edi, eax
cmp edi, 0xffffffff
jne 0x40e8c5
call sub.KERNEL32.DLL_GetLastError
cmp eax, 2
jne 0x40e8c5
mov dword [ebx + 0xc18], 1
xor edx, edx
cmp edi, 0xffffffff
mov byte [ebx + 0x12], 0
setne cl
mov dword [ebx + 0xc], edx
and ecx, 1
mov byte [ebx + 0x10], 0
mov byte [ebp - 0xd], cl
cmp byte [ebp - 0xd], 0
je 0x40e92f
mov dword [ebx + 4], edi
test esi, esi
je 0x40e8fa
lea eax, [ebx + 0x418]
mov edx, esi
call fcn.00410540
jmp 0x40e903
mov word [ebx + 0x418], 0
cmp dword [ebp - 4], 0
je 0x40e916
lea eax, [ebx + 0x17]
mov edx, dword [ebp - 4]
call fcn.0040fd68
jmp 0x40e925
lea edx, [ebx + 0x17]
mov ecx, 0x1000000
mov eax, esi
call fcn.00410320
mov edx, dword [ebx + 4]
mov eax, ebx
call fcn.0040ea14
mov al, byte [ebp - 0xd]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x40eb20
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff8
mov esi, ecx
test esi, esi
mov edi, eax
mov dword [esp], edx
je 0x40ec43
mov eax, dword [edi + 0xc]
test eax, eax
je 0x40eb5b
dec eax
je 0x40eb45
dec eax
je 0x40eb51
jmp 0x40eb5b
push 0xfffffffffffffff5
call sub.KERNEL32.DLL_GetStdHandle
mov dword [edi + 4], eax
jmp 0x40eb5b
push 0xfffffffffffffff4
call sub.KERNEL32.DLL_GetStdHandle
mov dword [edi + 4], eax
cmp dword [edi + 0xc], 0
je 0x40ebad
xor ebp, ebp
cmp esi, ebp
jle 0x40ebc9
push 0
lea eax, [esp + 8]
push eax
mov edx, esi
sub edx, ebp
cmp edx, 0x4000
jge 0x40eb80
mov ecx, esi
sub ecx, ebp
jmp 0x40eb85
mov ecx, 0x4000
push ecx
mov eax, dword [esp + 0xc]
add eax, ebp
push eax
push dword [edi + 4]
call sub.KERNEL32.DLL_WriteFile
test eax, eax
setne bl
and ebx, 1
test bl, bl
je 0x40ebc9
add ebp, 0x4000
cmp esi, ebp
jg 0x40eb67
jmp 0x40ebc9
push 0
lea eax, [esp + 8]
push eax
push esi
push dword [esp + 0xc]
push dword [edi + 4]
call sub.KERNEL32.DLL_WriteFile
test eax, eax
setne bl
and ebx, 1
test bl, bl
jne 0x40ec3f
cmp byte [edi + 0x14], 0
je 0x40ec3f
cmp dword [edi + 0xc], 0
jne 0x40ec3f
lea edx, [edi + 0x17]
mov eax, 0x41b998
call fcn.0040cca4
test al, al
je 0x40ec29
mov ecx, dword [esp + 4]
cmp ecx, esi
jae 0x40eb5b
cmp dword [esp + 4], 0
jbe 0x40eb5b
mov eax, edi
call fcn.0040ee68
push edx
push eax
mov eax, dword [esp + 0xc]
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
push edx
push eax
xor edx, edx
mov eax, edi
call fcn.0040edb0
jmp 0x40eb5b
lea ecx, [edi + 0x17]
mov eax, 0x41b998
xor edx, edx
call fcn.0040cc8c
jmp 0x40ec3f
mov byte [edi + 8], 1
pop ecx
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x40ed30
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, eax
push esi
push edi
push ecx
mov edi, edx
cmp dword [ebx + 0xc], 1
mov esi, ecx
jne 0x40ed57
cmp esi, 0x4e20
jle 0x40ed4d
mov esi, 0x4e20
push 0xfffffffffffffff6
call sub.KERNEL32.DLL_GetStdHandle
mov dword [ebx + 4], eax
push 0
lea eax, [esp + 4]
push eax
push esi
push edi
push dword [ebx + 4]
call sub.KERNEL32.DLL_ReadFile
test eax, eax
jne 0x40eda8
mov eax, ebx
call fcn.0040f070
test al, al
je 0x40ed8f
cmp esi, 0x4e20
jle 0x40ed8f
mov ecx, 0x4e20
mov edx, edi
mov eax, ebx
call fcn.0040ed30
jmp 0x40edab
cmp dword [ebx + 0xc], 1
jne 0x40eda3
call sub.KERNEL32.DLL_GetLastError
cmp eax, 0x6d
jne 0x40eda3
xor eax, eax
jmp 0x40edab
or eax, 0xffffffff
jmp 0x40edab
mov eax, dword [esp]
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x4102b0
Capabilities:
Check for time delay via gettickcount

Disassembly:
cmp byte [0x41577c], 0
jne 0x4102c9
call fcn.0040ff04
mov dword [0x415778], eax
inc byte [0x41577c]
call fcn.0040ff04
sub eax, dword [0x415778]
cmp eax, 0x64
jle 0x410305
cmp dword [0x416188], 0
je 0x410300
mov eax, 0x41b998
mov edx, 0xff
call fcn.0040ce40
mov eax, 0x41b998
mov edx, 0xff
call fcn.0040ce38
call fcn.00402c70
ret
Function at 0x412d10
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0xe000]
push edi
jmp 0x412d2a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x412d31
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x412d20
mov eax, 1
add ebx, ebx
jne 0x412d43
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x412d38
jne 0x412d54
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x412d38
xor ecx, ecx
sub eax, 3
jb 0x412d68
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x412dda
mov ebp, eax
add ebx, ebx
jne 0x412d73
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x412d80
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x412da4
inc ecx
add ebx, ebx
jne 0x412d90
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x412d85
jne 0x412da1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x412d85
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x412dc4
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x412db5
jmp 0x412d26
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x412dc4
add edi, ecx
jmp 0x412d26
pop esi
mov edi, esi
mov ecx, 0x331
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x412de2
cmp byte [edi], 0
jne 0x412de2
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 0x412de7
lea edi, [esi + 0x10000]
mov eax, dword [edi]
or eax, eax
je 0x412e56
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x120e4]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x12198]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x412e14
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x1219c]
or eax, eax
je 0x412e50
mov dword [ebx], eax
add ebx, 4
jmp 0x412e31
call dword [esi + 0x121ac]
mov ebp, dword [esi + 0x121a0]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x21f]
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 0x412e8a
sub esp, 0xffffff80
jmp 0x4082e8
Function at 0x401e8c
Capabilities:
Delete directory

Disassembly:
push ebx
xor eax, eax
push eax
call fcn.0040e100
mov ebx, dword [esp]
cmp ebx, 1
jne 0x401eb7
push dword [0x418018]
call fcn.004053ab
and eax, eax
je 0x401eb7
push dword [0x418018]
call fcn.0040541a
call fcn.004030a7
push dword [0x418058]
call fcn.0040a879
push dword [0x418044]
call sub.KERNEL32.dll_RemoveDirectoryW
push dword [0x418070]
call sub.KERNEL32.dll_RemoveDirectoryW
push dword [esp + 0xc]
jmp 0x4011b6

Function at 0x4025d0
Capabilities:
Accept command line arguments

Disassembly:
push ebx
mov edx, 9
sub esp, 4
mov dword [esp], 0
dec edx
jne 0x4025d6
call fcn.0040e100
push dword [esp + 0x2c]
call fcn.00405190
mov eax, 0x4170a3
mov dword [0x418034], eax
mov dword [esp], 0
jmp 0x402604
mov eax, 6
cmp eax, dword [esp]
jl 0x402672
mov eax, dword [0x418034]
movsx eax, byte [eax]
mov dword [esp + 4], eax
inc dword [0x418034]
push edx
call fcn.0040dfc0
pop edx
push eax
push edx
call fcn.0040dfc0
pop edx
push eax
mov ebx, dword [esp + 0xc]
imul ebx, ebx, 0xffffffff
push ebx
call fcn.00405e40
lea eax, [esp + 0xc]
push eax
call fcn.0040e000
mov edx, dword [esp + 0xc]
push edx
call fcn.0040dfc0
pop edx
push eax
push edx
call fcn.0040e160
mov edx, dword [esp + 0xc]
push edx
call fcn.0040e160
lea eax, [esp + 0x10]
push eax
call fcn.0040e000
inc dword [esp]
jno 0x402604
push edx
call fcn.0040dfc0
pop edx
push eax
push edx
call fcn.0040dfc0
pop edx
push eax
call sub.KERNEL32.dll_GetCommandLineW
push eax
call fcn.00409cc0
lea eax, [esp + 0x14]
push eax
call fcn.0040e000
mov edx, dword [esp + 0x10]
push edx
call fcn.0040dfc0
pop edx
push eax
push edx
call fcn.0040e160
lea eax, [esp + 0x18]
push eax
call fcn.0040e000
mov eax, dword [esp + 0x14]
push eax
call sub.SHLWAPI.DLL_PathRemoveArgsW
mov dword [esp + 0x18], eax
push dword [esp + 0x14]
call fcn.00405ba0
mov dword [esp + 0x1c], eax
mov ebx, dword [esp + 0x1c]
and ebx, ebx
jle 0x402730
push edx
call fcn.0040dfc0
pop edx
push eax
mov edx, 0x417026
push edx
call fcn.0040e160
push edx
call fcn.0040dfc0
pop edx
push eax
push edx
call fcn.0040dfc0
pop edx
push eax
push edx
call fcn.0040dfc0
pop edx
push eax
push edx
call fcn.0040dfc0
pop edx
push eax
mov ebx, dword [esp + 0x30]
inc ebx
push ebx
push dword [esp + 0x28]
call fcn.00405ef0
call fcn.00405172
add dword [esp], edx
call fcn.00405e20
pop eax
lea eax, [esp + 0x24]
push eax
call fcn.0040e000
push dword [esp + 0x20]
push dword [esp + 0x10]
call fcn.0040997a
mov edx, dword [esp + 0x20]
push edx
call fcn.0040dfc0
pop edx
push eax
push edx
call fcn.0040e160
pop eax
push eax
call fcn.00405160
pop edx
add eax, edx
jmp 0x402765
push dword [esp + 0x14]
call fcn.0040e090
push dword [esp + 8]
call fcn.0040e090
push dword [esp + 0x10]
call fcn.0040e090
push dword [esp + 0xc]
call fcn.0040e090
push dword [esp + 0x20]
call fcn.0040e090
add esp, 0x24
pop ebx
ret
Function at 0x402797
Capabilities:
Extract resource via kernel32 functions

Disassembly:
xor eax, eax
push eax
push eax
call fcn.0040e100
push dword [esp + 0x10]
push dword [esp + 0x10]
call sub.KERNEL32.dll_LoadResource
mov dword [esp], eax
push dword [esp + 0x10]
push dword [esp + 0x10]
call sub.KERNEL32.dll_SizeofResource
mov dword [0x418024], eax
push dword [0x418024]
call fcn.00409d10
mov dword [esp + 4], eax
push dword [0x418024]
push dword [esp + 8]
push dword [esp + 8]
call fcn.00409d30
push dword [esp]
call sub.KERNEL32.dll_FreeResource
mov eax, dword [esp + 4]
jmp 0x4027f4
add esp, 8
ret 8

Function at 0x4030a7
Capabilities:
Delete directory

Disassembly:
push ebp
push ebx
xor eax, eax
push eax
call fcn.0040e100
mov ebx, dword [0x418030]
cmp ebx, 1
jne 0x403154
push dword [0x4180a4]
call fcn.0040a4f3
mov ebx, eax
and ebx, ebx
jle 0x4030fb
push dword [0x4180a4]
call fcn.0040a4fd
push dword [0x4180a4]
call fcn.0040a512
or eax, eax
je 0x4030fb
mov ebp, dword [0x4180a8]
push dword [ebp + 8]
call fcn.0040a879
jmp 0x4030dc
push dword [0x41809c]
call fcn.0040a4f3
mov dword [esp], eax
mov ebx, dword [esp]
and ebx, ebx
jle 0x403154
push 5
push 0
push 1
push dword [0x41809c]
call fcn.004069e0
push dword [0x41809c]
call fcn.0040a4fd
push dword [0x41809c]
call fcn.0040a512
or eax, eax
je 0x403154
mov ebp, dword [0x4180a0]
push dword [ebp + 0xc]
call sub.KERNEL32.dll_RemoveDirectoryW
jmp 0x403135
mov eax, 1
jmp 0x40315d
add esp, 4
pop ebx
pop ebp
ret
Function at 0x403cc8
Capabilities:
Get common file path

Disassembly:
push ebx
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
call fcn.0040e100
mov eax, 0x417131
mov dword [0x418034], eax
mov dword [esp], 0
jmp 0x403ce9
mov eax, 3
cmp eax, dword [esp]
jl 0x403d57
mov eax, dword [0x418034]
movsx eax, byte [eax]
mov dword [esp + 4], eax
inc dword [0x418034]
push edx
call fcn.0040dfc0
pop edx
push eax
push edx
call fcn.0040dfc0
pop edx
push eax
mov ebx, dword [esp + 0xc]
imul ebx, ebx, 0xffffffff
push ebx
call fcn.00405e40
lea eax, [esp + 0xc]
push eax
call fcn.0040e000
mov edx, dword [esp + 0xc]
push edx
call fcn.0040dfc0
pop edx
push eax
push edx
call fcn.0040e160
mov edx, dword [esp + 0xc]
push edx
call fcn.0040e160
lea eax, [esp + 0x10]
push eax
call fcn.0040e000
inc dword [esp]
jno 0x403ce9
push 0x400
call fcn.00409d10
mov dword [esp + 0x10], eax
push edx
call fcn.0040dfc0
pop edx
push eax
push edx
call fcn.0040dfc0
pop edx
push eax
call fcn.0040a9b9
lea eax, [esp + 0x18]
push eax
call fcn.0040e000
push dword [esp + 0x10]
push 0
mov eax, 0x417020
push eax
push dword [esp + 0x20]
call sub.KERNEL32.dll_GetTempFileNameW
push edx
call fcn.0040dfc0
pop edx
push eax
push edx
call fcn.0040dfc0
pop edx
push eax
push dword [esp + 0x18]
call fcn.00409cc0
lea eax, [0x418070]
push eax
call fcn.0040e000
push dword [0x418070]
call fcn.0040a879
push dword [0x418070]
call fcn.0040a775
push dword [esp + 0x10]
push 0
mov eax, 0x417020
push eax
push dword [0x418070]
call sub.KERNEL32.dll_GetTempFileNameW
push edx
call fcn.0040dfc0
pop edx
push eax
push edx
call fcn.0040dfc0
pop edx
push eax
push dword [esp + 0x18]
call fcn.00409cc0
lea eax, [0x418044]
push eax
call fcn.0040e000
push dword [0x418044]
call fcn.0040a879
push dword [0x418044]
call fcn.0040a775
push dword [esp + 0x10]
push 0
mov eax, 0x417020
push eax
push dword [0x418044]
call sub.KERNEL32.dll_GetTempFileNameW
push dword [0x418044]
call sub.SHLWAPI.DLL_PathAddBackslashW
push edx
call fcn.0040dfc0
pop edx
push eax
push edx
call fcn.0040dfc0
pop edx
push eax
push dword [esp + 0x18]
call fcn.00409cc0
lea eax, [0x418058]
push eax
call fcn.0040e000
push dword [0x418058]
call fcn.0040a879
push dword [esp + 0xc]
push dword [0x418058]
call sub.SHLWAPI.DLL_PathRenameExtensionW
push dword [esp + 0x10]
call fcn.00409c30
jmp 0x403e9d
push dword [esp + 0xc]
call fcn.0040e090
push dword [esp + 0x14]
call fcn.0040e090
push dword [esp + 8]
call fcn.0040e090
add esp, 0x18
pop ebx
ret

Function at 0x40541a
Capabilities:
Terminate thread

Disassembly:
push ebx
push esi
push edi
mov edi, dword [esp + 0x10]
push 0
push edi
call fcn.004053ce
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ebx, 0x4186a8
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x4180c0]
jmp 0x40544b
cmp dword [esi + 0xc], edi
je 0x405451
mov esi, dword [esi]
test esi, esi
jne 0x405444
jmp 0x405469
add esi, 8
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push 0x4180c0
call fcn.0040dc52
pop ecx
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
ret 4
Function at 0x405476
Capabilities:
Create thread

Disassembly:
push ecx
push ebp
push esi
lea eax, [esp + 8]
xor esi, esi
push eax
push esi
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebp, eax
test ebp, ebp
je 0x40550e
push edi
push 0x4186a8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0x4180c0]
test edi, edi
je 0x4054e2
push ebx
push esi
lea ebx, [edi + 8]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4054db
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi]
push ebx
push 0x4180c0
call fcn.0040dc52
pop ecx
pop ecx
jmp 0x4054dd
mov edi, dword [edi]
test edi, edi
jne 0x4054b2
pop ebx
mov eax, dword [0x417138]
mov esi, eax
inc eax
push 0x10
push 0x4180c0
mov dword [0x417138], eax
call fcn.0040dc92
pop ecx
pop ecx
push 0x4186a8
mov dword [eax], ebp
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebp
pop ecx
ret 8
Function at 0x408fb8
Capabilities:
Enumerate gui resources

Disassembly:
cmp dword [esp + 4], 0
push ebx
push esi
push edi
je 0x40900d
push dword [esp + 0x10]
push 0x408f37
call dword [sym.imp.USER32.DLL_EnumWindows]
mov esi, dword [0x4180e8]
test esi, esi
je 0x409066
xor edi, edi
mov ebx, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 8], eax
jne 0x409005
cmp byte [esi + 0x10], 0
je 0x409005
push 3
push edi
push edi
push edi
push edi
push 0xfffffffffffffffe
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_SetWindowPos]
mov esi, ebx
test ebx, ebx
jne 0x408fe1
jmp 0x409066
mov esi, dword [0x4180e8]
test esi, esi
je 0x409066
xor edi, edi
push ebp
mov ebx, dword [esi]
lea ebp, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp], eax
jne 0x40905f
cmp byte [esi + 0x11], 0
je 0x40903b
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_EnableWindow]
cmp byte [esi + 0x10], 0
je 0x409052
push 3
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_SetWindowPos]
push ebp
push 0x4180e8
call fcn.0040dc52
pop ecx
pop ecx
mov esi, ebx
test ebx, ebx
jne 0x40901a
pop ebp
pop edi
pop esi
pop ebx
ret 4

Function at 0x40916a
Capabilities:
Accept command line arguments

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
push edi
push dword [0x4186cc]
call fcn.0040d408
mov ebp, eax
or ebx, 0xffffffff
xor eax, eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, dword [esp + 0x1c]
movzx edx, word [eax]
test dx, dx
je 0x40926a
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], 0x20
mov dword [esp + 0x14], 0x22
cmp dx, word [esp + 0x10]
jne 0x4091c0
push 0x20
pop edx
add eax, 2
cmp word [eax], dx
je 0x4091b8
movzx edx, word [eax]
mov dword [esp + 0x1c], 1
cmp dx, word [esp + 0x14]
jne 0x409200
add eax, 2
mov esi, eax
movzx ecx, word [eax]
test cx, cx
je 0x409242
push 0x22
pop edx
cmp cx, dx
je 0x4091f2
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x4091e2
xor ecx, ecx
cmp word [eax], cx
je 0x409242
mov ecx, eax
add eax, 2
jmp 0x409244
test dx, dx
je 0x40924a
push 0x20
mov esi, eax
pop ecx
cmp dx, cx
je 0x4091f2
add eax, 2
push 0x22
pop edx
cmp word [eax], dx
jne 0x409238
add eax, 2
movzx ecx, word [eax]
test cx, cx
je 0x409242
cmp cx, dx
je 0x409235
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x409225
push 0x20
pop ecx
movzx edx, word [eax]
test dx, dx
jne 0x40920a
jmp 0x4091f2
mov ecx, eax
mov edx, dword [esp + 0x1c]
jmp 0x40924c
xor edx, edx
cmp dword [ebp], ebx
jne 0x409255
test edi, edi
jne 0x409272
test edx, edx
je 0x40925a
inc ebx
xor edx, edx
mov esi, edx
movzx edx, word [eax]
test dx, dx
jne 0x4091ae
test edi, edi
jne 0x409283
mov eax, ebx
jmp 0x409287
test esi, esi
je 0x409283
sub ecx, esi
mov eax, esi
sar ecx, 1
mov dword [edi], ecx
inc dword [ebp]
jmp 0x409287
xor ecx, ecx
mov dword [edi], ecx
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
Function at 0x40a775
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
cmp dword [ebp + 8], 0
je 0x40a7ed
push 0x104
push dword [ebp + 8]
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [ebp - 4], ax
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcslen
lea ecx, [ebp - 0x20c]
add esp, 0x10
lea eax, [ecx + eax*2]
jmp 0x40a7ce
movzx ecx, word [eax - 2]
cmp ecx, 0x20
je 0x40a7cb
cmp ecx, 0x5c
je 0x40a7cb
cmp ecx, 0x2f
jne 0x40a7d8
add eax, 0xfffffffe
lea ecx, [ebp - 0x20c]
cmp eax, ecx
ja 0x40a7b8
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x40a7ef
xor eax, eax
mov esp, ebp
pop ebp
ret 4

Function at 0x40a7f5
Capabilities:
Set file attributes

Disassembly:
xor eax, eax
cmp dword [esp + 4], eax
je 0x40a803
jmp dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
ret 8

Function at 0x40a84b
Capabilities:
Delete file
Set file attributes

Disassembly:
cmp dword [esp + 4], 0
je 0x40a874
test byte [esp + 8], 2
je 0x40a868
push pe_nt_image_headers32
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40a876
xor eax, eax
ret 8

Function at 0x40aaf0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x40ab2c
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4

Function at 0x40ae50
Capabilities:
Write file on windows

Disassembly:
push dword [esp + 4]
push dword [0x418724]
call fcn.0040d579
test eax, eax
je case.0x40ae7e.3
mov ecx, dword [esp + 8]
add ecx, 0xfffffffe
cmp ecx, 0x17
ja case.0x40ae7e.3
movzx ecx, byte [ecx + 0x40af88]
jmp dword [ecx*4 + 0x40af70]
cmp dword [eax + 4], 0
je 0x40ae9b
push 2
push 0x4136c8
push eax
call fcn.0040b140
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 2
push 0x4136c8
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x40aeca
push 3
push 0x4136cc
push eax
call fcn.0040b140
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 3
push 0x4136cc
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x40aef9
push 2
push 0x4136d0
push eax
call fcn.0040b140
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 2
push 0x4136d0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x40af28
push 4
push 0x4136d4
push eax
call fcn.0040b140
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 4
push 0x4136d4
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x40af57
push 4
push 0x4136dc
push eax
call fcn.0040b140
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 4
push 0x4136dc
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
Function at 0x40b0a0
Capabilities:
Write file on windows

Disassembly:
push ecx
mov edx, dword [esp + 0xc]
mov dword [esp], 0
test edx, edx
je 0x40b094
cmp word [edx], 0
je 0x40b094
mov ecx, dword [esp + 0x10]
push esi
cmp ecx, 0x19
jne 0x40b02d
mov esi, dword [esp + 0xc]
mov ecx, edx
push edi
cmp dword [esi + 4], 0
lea edi, [ecx + 2]
je 0x40b000
jmp 0x40afe0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40afe0
sub ecx, edi
sar ecx, 1
lea eax, [ecx + ecx]
push eax
push edx
push esi
call fcn.0040b140
pop edi
pop esi
pop ecx
ret 0xc
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b000
sub ecx, edi
lea eax, [esp + 8]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
push edx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
xor eax, eax
cmp ecx, 2
lea ecx, [esp + 0x10]
setne al
push ecx
dec eax
and eax, 0xfde9
push edx
push eax
call fcn.0040b250
mov esi, eax
test esi, esi
je 0x40b08b
mov eax, dword [esp + 0xc]
cmp dword [eax + 4], 0
je 0x40b068
push dword [esp + 0x10]
push esi
push eax
call fcn.0040b140
mov dword [esp + 4], eax
jmp 0x40b07c
push 0
lea ecx, [esp + 8]
push ecx
push dword [esp + 0x18]
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
push 0
push dword [0x418010]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 0xc
xor eax, eax
pop ecx
ret 0xc
push dword [esp + 4]
push dword [0x418724]
call fcn.0040d579
test eax, eax
je 0x40b0bc
mov dword [esp + 4], eax
jmp 0x40afa0
xor eax, eax
ret 0xc

Function at 0x40b0d0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
mov dword [esp + 4], 0
test esi, esi
je 0x40b135
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40b12d
push dword [esp + 0x10]
push dword [0x418724]
call fcn.0040d579
test eax, eax
je 0x40b123
cmp dword [eax + 4], 0
je 0x40b112
push edi
push esi
push eax
call fcn.0040b140
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea ecx, [esp + 0xc]
push ecx
push edi
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
pop edi
xor eax, eax
pop esi
pop ecx
ret 0xc
xor eax, eax
pop esi
pop ecx
ret 0xc