joyce8/EMBER2024-capa huggingface dataset:
Function at 0x48bf40
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Get common file path
Move file
Set current directory
Set file attributes

Disassembly:
sub esp, 0x558
lea eax, [esp + 8]
push esi
push eax
mov dword [esp + 0xc], ecx
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetCurrentDirectoryA]
lea ecx, [esp + 0xc]
lea edx, [esp + 0x354]
push ecx
push str._sTemp
push edx
call fcn.004b8784
mov esi, dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
add esp, 0xc
lea eax, [esp + 0x354]
push eax
call esi
test eax, eax
jne 0x48bf9f
lea ecx, [esp + 0xc]
push ecx
call esi
mov eax, 1
pop esi
add esp, 0x558
ret 4
push ebx
push ebp
lea edx, [esp + 0x21c]
push edi
push edx
push 0x4e1758
call dword [sym.imp.KERNEL32.DLL_FindFirstFileA]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x18]
push eax
call esi
mov ebx, dword [sym.imp.KERNEL32.DLL_FindNextFileA]
mov esi, dword [sym.imp.KERNEL32.DLL_SetFileAttributesA]
mov edi, dword [sym.imp.KERNEL32.DLL_DeleteFileA]
mov ebp, dword [sym.imp.KERNEL32.DLL_MoveFileA]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x220]
push ecx
push edx
call ebx
test eax, eax
je 0x48c080
cmp byte [esp + 0x24c], 0x2e
je 0x48bfd8
lea eax, [esp + 0x24c]
lea ecx, [esp + 0x360]
push eax
push ecx
lea edx, [esp + 0x46c]
push str._s_s
push edx
call fcn.004b8784
lea eax, [esp + 0x25c]
lea ecx, [esp + 0x28]
push eax
push ecx
lea edx, [esp + 0x134]
push str._s_s
push edx
call fcn.004b8784
add esp, 0x20
lea eax, [esp + 0x11c]
push 0x80
push eax
call esi
lea ecx, [esp + 0x11c]
push ecx
call edi
lea edx, [esp + 0x11c]
lea eax, [esp + 0x464]
push edx
push eax
call ebp
test eax, eax
je 0x48bfd8
mov ecx, dword [esp + 0x14]
push 1
call fcn.0048cb80
jmp 0x48bfd8
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.DLL_FindClose]
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
push str.Temp
call dword [sym.imp.KERNEL32.DLL_RemoveDirectoryA]
mov ecx, dword [esp + 0x56c]
pop edi
pop ebp
pop ebx
and eax, ecx
pop esi
add esp, 0x558
ret 4
Function at 0x48d230
Capabilities:
Check mutex on windows
Create process on windows

Disassembly:
sub esp, 0x100
push ebp
push esi
push edi
xor esi, esi
push 0x4ce4b6
push esi
push esi
call dword [sym.imp.KERNEL32.DLL_CreateMutexA]
mov ebp, eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0xb7
jne 0x48d2a6
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x110]
push 0x100
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10]
push eax
push 0x15
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
push esi
lea edx, [esp + 0x10]
push str.Info
push edx
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x100
ret 0x10
mov ecx, 0x41e5
xor eax, eax
mov edi, 0x5c8938
push 0x59c
rep stosd dword es:[edi], eax
call fcn.004b7e62
add esp, 4
test eax, eax
je 0x48d2cc
mov ecx, eax
call fcn.0048a690
mov edi, dword [sym.imp.KERNEL32.DLL_Sleep]
mov ecx, dword [0x5c8890]
push 1
call fcn.0048bf40
test eax, eax
jne 0x48d2f0
push 0x1f4
call edi
inc esi
cmp esi, 3
jl 0x48d2d2
mov ecx, dword [0x5c8890]
cmp dword [ecx + 0x578], 1
jne 0x48d359
test ecx, ecx
je 0x48d309
mov eax, dword [ecx]
push 1
call dword [eax]
push ebp
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [0x5c8890]
push 0x16
stosb byte es:[edi], al
call fcn.0048cd00
push 0
lea edx, [esp + 0x10]
push str.Info
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x100
ret 0x10
mov eax, dword [esp + 0x118]
push eax
call fcn.0048d1e0
add esp, 4
test eax, eax
jne 0x48d3b3
mov ecx, 0x3f
lea edi, [esp + 0xd]
mov byte [esp + 0xc], al
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [0x5c8890]
push 0x17
stosb byte es:[edi], al
call fcn.0048cd00
push 0
lea edx, [esp + 0x10]
push str.Info
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x100
ret 0x10
mov ecx, dword [0x5c8890]
call fcn.0048c7e0
mov eax, dword [esp + 0x11c]
mov ecx, dword [esp + 0x110]
push 6
push eax
push ecx
mov ecx, dword [0x5c8890]
call fcn.0048b400
test eax, eax
je 0x48d3ec
mov ecx, dword [0x5c8890]
call fcn.0048bb50
jmp 0x48d406
mov eax, dword [0x5c8890]
mov ecx, dword [eax + 0x10]
call fcn.00411390
push 0
push 0
push 0x10
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [0x5c8890]
push 0
call fcn.0048bf40
mov ecx, dword [0x5c8890]
test ecx, ecx
je 0x48d432
call fcn.0048b950
mov ecx, dword [0x5c8890]
test ecx, ecx
je 0x48d432
mov edx, dword [ecx]
push 1
call dword [edx]
push ebp
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 1
push 0
push 0
push str.rundll32
push 0x4e64f8
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x100
ret 0x10
Function at 0x4024f0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
xorps xmm0, xmm0
mov dword [esp + 0x44], 0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff4
movlpd qword [esp + 0x1c], xmm0
movlpd qword [esp + 0x24], xmm0
movlpd qword [esp + 0x2c], xmm0
movlpd qword [esp + 0x34], xmm0
movlpd qword [esp + 0x3c], xmm0
movlpd qword [esp + 0x44], xmm0
mov dword [esp + 0x18], 0x44
call esi
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x68]
test eax, eax
je 0x402545
mov eax, dword [eax]
jmp 0x402549
push 0xfffffffffffffff5
call esi
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x64]
test eax, eax
je 0x402559
mov eax, dword [eax]
jmp 0x40255d
push 0xfffffffffffffff6
call esi
mov esi, dword [esp + 0x60]
xorps xmm0, xmm0
or dword [esp + 0x40], 0x100
mov dword [esp + 0x4c], eax
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 0
push 1
push 0
push 0
push esi
push dword [esp + 0x80]
movups xmmword [esp + 0x2c], xmm0
push 0x425788
call fcn.00402620
add esp, 0xc
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4025c0
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 4]
pop esi
add esp, 0x54
ret
call fcn.00401050
push eax
push esi
push dword [esp + 0x64]
call fcn.00402600
add esp, 8
push eax
push str.Could_not_create_child_process__s:__s_n
call fcn.004010f0
int3
Function at 0x402cf0
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry value

Disassembly:
sub esp, 0x28
mov eax, dword [0x42f140]
xor eax, esp
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x2c]
push eax
call fcn.004028a0
add esp, 4
test al, al
jne 0x402ecf
lea eax, [esp]
push eax
push 0x201
push 0
push str.SOFTWAREMicrosoftVisualStudioSxSVS7
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402ecf
push ebp
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor ebp, ebp
push ebx
mov dword [esp + 0x20], str.14.0
mov dword [esp + 0x24], str.12.0
mov dword [esp + 0x28], str.11.0
mov dword [esp + 0x2c], str.10.0
push esi
mov esi, dword [esp + ebp*4 + 0x24]
lea eax, [esp + 0x1c]
push eax
push 0
lea eax, [esp + 0x28]
push eax
push 0
push esi
push dword [esp + 0x24]
call edi
cmp eax, 2
je 0x402ea2
cmp dword [esp + 0x20], 1
jne 0x402ea2
push dword [esp + 0x1c]
call fcn.0040ab6a
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x402ecb
lea eax, [esp + 0x1c]
push eax
push ebx
push 0
push 0
push esi
push dword [esp + 0x24]
call edi
test eax, eax
jne 0x402ea2
mov esi, ebx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x402dc3
sub esi, ecx
sar esi, 1
lea edi, [esi + esi]
lea eax, [edi + 0x1a]
push eax
call fcn.0040ab6a
push edi
push ebx
push eax
mov dword [esp + 0x24], eax
call fcn.00408510
mov eax, dword [esp + 0x24]
add esp, 0x10
movups xmm0, xmmword [str.VCLib_amd64]
xor ecx, ecx
movups xmmword [edi + eax], xmm0
movq xmm0, qword [0x425a6c]
movq qword [edi + eax + 0x10], xmm0
mov edi, eax
mov word [eax + esi*2 + 0x18], cx
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x402e16
sub edi, ecx
sar edi, 1
lea esi, [edi + edi]
lea eax, [esi + 0x1e]
push eax
call fcn.0040ab6a
push esi
push dword [esp + 0x1c]
mov dword [esp + 0x24], eax
push eax
call fcn.00408510
mov ecx, dword [esp + 0x28]
add esp, 0x10
movups xmm0, xmmword [str._vcruntime.lib]
movups xmmword [esi + ecx], xmm0
push ecx
movq xmm0, qword [0x4259b0]
movq qword [esi + ecx + 0x10], xmm0
mov eax, dword [0x4259b8]
mov dword [esi + ecx + 0x18], eax
xor eax, eax
mov word [ecx + edi*2 + 0x1c], ax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x402e80
test al, 0x10
je 0x402eae
mov eax, dword [esp + 0x18]
push eax
call fcn.0040ab4f
push dword [esp + 0x18]
call fcn.0040ab4f
push ebx
call fcn.0040ab4f
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
add esp, 0xc
inc ebp
cmp ebp, 4
jl 0x402d62
jmp 0x402ec1
mov eax, dword [esp + 0x18]
push eax
call fcn.0040ab4f
push ebx
call fcn.0040ab4f
add esp, 8
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop edi
pop ebp
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.004076d6
add esp, 0x28
ret
Function at 0x402fe0
Capabilities:
Create process on windows
Create shortcut via ishelllink
Get common file path

Disassembly:
sub esp, 0x2b4
mov eax, dword [0x42f140]
xor eax, esp
mov dword [esp + 0x2b0], eax
push ebx
mov ebx, dword [esp + 0x2bc]
lea eax, [esp + 4]
push esi
push edi
push eax
push 0
push 0
push 0x426220
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
jne 0x403059
mov edx, dword [esp + 0xc]
mov ecx, edx
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403020
sub ecx, esi
sar ecx, 1
lea edi, [ecx + 0x31]
lea eax, [edi + edi]
push eax
push edx
call dword [sym.imp.ole32.dll_CoTaskMemRealloc]
mov esi, dword [sym.imp.ole32.dll_CoTaskMemFree]
test eax, eax
jne 0x40307e
push dword [esp + 0xc]
call esi
call dword [sym.imp.ole32.dll_CoUninitialize]
push dword [esp + 0xc]
call esi
push str.Couldnt_find_osu_.exe
call fcn.00401170
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2b0]
xor ecx, esp
call fcn.004076d6
add esp, 0x2b4
ret
push 0x425c00
push edi
push eax
mov dword [esp + 0x18], eax
call fcn.0040a8d0
add esp, 0xc
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [esp + 0x10]
push eax
push 0x426200
push 1
push 0
push 0x426210
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x40304d
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push 0x4261f0
push eax
mov ecx, dword [eax]
mov eax, dword [ecx]
call eax
test eax, eax
js 0x40304d
mov eax, dword [esp + 0x14]
push 0
push dword [esp + 0x10]
mov ecx, dword [eax]
push eax
mov eax, dword [ecx + 0x14]
call eax
test eax, eax
js 0x40304d
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x6c]
push 6
push edx
push 0x208
mov ecx, dword [eax]
push ebx
push eax
mov eax, dword [ecx + 0xc]
call eax
call dword [sym.imp.ole32.dll_CoUninitialize]
push dword [esp + 0xc]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
xorps xmm0, xmm0
push 0xfffffffffffffff4
movlpd qword [esp + 0x20], xmm0
movlpd qword [esp + 0x28], xmm0
movlpd qword [esp + 0x30], xmm0
movlpd qword [esp + 0x38], xmm0
movlpd qword [esp + 0x40], xmm0
movlpd qword [esp + 0x48], xmm0
mov dword [esp + 0x50], 0
mov dword [esp + 0x1c], 0x44
call esi
push 0xfffffffffffffff5
mov dword [esp + 0x5c], eax
call esi
push 0xfffffffffffffff6
mov dword [esp + 0x58], eax
call esi
or dword [esp + 0x44], 0x100
xorps xmm0, xmm0
mov dword [esp + 0x50], eax
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push 0
push 1
push 0
push 0
push ebx
push 0
movups xmmword [esp + 0x84], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x40320c
push str.Launched_osu_._Injecting_in_8_seconds.
call fcn.004010a0
add esp, 4
push 0x1f40
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push str.._freedom_injector.exe
call fcn.00402770
mov esi, edx
mov edi, eax
push esi
push edi
push 0x425788
call fcn.00402620
push eax
push str.CMD:__s
call fcn.004010a0
push 0
push 0
push esi
push edi
call fcn.004024f0
push eax
call fcn.004037a0
mov ecx, dword [esp + 0x2ec]
add esp, 0x30
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004076d6
add esp, 0x2b4
ret
push str.Couldnt_launch_osu_
jmp 0x40305e
Function at 0x403220
Capabilities:
Accept command line arguments

Disassembly:
sub esp, 0xc
push str.VCINSTALLDIR
call fcn.0040b28b
add esp, 4
test eax, eax
je 0x40324a
push dword [esp + 0x14]
push dword [esp + 0x14]
call fcn.00403840
add esp, 8
xor eax, eax
add esp, 0xc
ret
lea eax, [esp + 4]
mov dword [esp + 4], 0
push ebp
push eax
mov dword [esp + 0x10], 0
call fcn.00402cf0
mov ebp, dword [esp + 0xc]
add esp, 4
test ebp, ebp
jne 0x403284
push str.Couldnt_find_Visual_Studio_2017_or_higher._Please_run_this_from_the_MSVC_x86_native_tools_command_prompt.
call fcn.00401170
add esp, 4
xor eax, eax
pop ebp
add esp, 0xc
ret
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov esi, ebp
mov dword [esp + 0x10], eax
lea edx, [esi + 2]
mov cx, word [esi]
add esi, 2
test cx, cx
jne 0x403296
sub esi, edx
xor edi, edi
sar esi, 1
test eax, eax
je 0x4032bf
mov edi, eax
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x4032b0
sub edi, ecx
sar edi, 1
lea eax, [edi + esi]
lea eax, [eax*2 + 0x16]
push eax
call fcn.0040ab6a
mov ebx, eax
lea ecx, [esi + esi]
push ecx
mov eax, 0x22
push ebp
lea ecx, [ebx + 2]
mov word [ebx], ax
push ecx
call fcn.00408510
movups xmm0, xmmword [str.__x86_]
mov ecx, dword [esp + 0x20]
add esp, 0x10
movups xmmword [ebx + esi*2 + 2], xmm0
mov ax, word [0x4261b4]
mov word [ebx + esi*2 + 0x12], ax
test ecx, ecx
je 0x40331d
lea eax, [edi + edi]
push eax
lea eax, [esi + 0xa]
push ecx
lea eax, [ebx + eax*2]
push eax
call fcn.00408510
add esp, 0xc
lea eax, [edi + esi]
xor ecx, ecx
push ebx
push 0x4261b8
mov word [ebx + eax*2 + 0x14], cx
call fcn.00403810
push ebx
call fcn.0040ac90
push ebx
call fcn.0040ab4f
push ebp
call fcn.0040ab4f
push dword [esp + 0x2c]
call fcn.0040ab4f
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
add esp, 0xc
ret

Function at 0x403500
Capabilities:
Move file

Disassembly:
push 1
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
je 0x403515
ret
call fcn.00401050
push eax
push dword [esp + 0xc]
push dword [esp + 0xc]
push str.could_not_rename__s_to__s:__s
call fcn.004010f0
int3
Function at 0x403530
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4036f8
test al, 0x10
je 0x4036f8
push esi
push ebx
call fcn.00403360
mov esi, eax
add esp, 4
test esi, esi
je 0x403745
push ebp
push edi
call fcn.0040a8bd
mov ebp, dword [sym.imp.KERNEL32.dll_FindNextFileA]
mov dword [eax], 0
cmp dword [esi + 0x144], 0
jne 0x403594
push 0x105
push 1
call fcn.0040ab44
add esp, 8
mov dword [esi + 0x144], eax
jmp 0x4035a4
lea eax, [esi + 4]
push eax
push dword [esi]
call ebp
test eax, eax
je 0x403666
push 0x105
push 0
push dword [esi + 0x144]
call fcn.00408a90
push 0x104
lea eax, [esi + 0x30]
push eax
push dword [esi + 0x144]
call fcn.0040aa20
mov edi, dword [esi + 0x144]
add esp, 0x18
test edi, edi
je 0x40367c
mov ecx, 0x4257fc
mov eax, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x403602
test dl, dl
je 0x4035fe
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x403602
add eax, 2
add ecx, 2
test dl, dl
jne 0x4035e2
xor eax, eax
jmp 0x403607
sbb eax, eax
or eax, 1
test eax, eax
je 0x403574
mov ecx, 0x425800
mov eax, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x403636
test dl, dl
je 0x403632
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x403636
add eax, 2
add ecx, 2
test dl, dl
jne 0x403616
xor eax, eax
jmp 0x40363b
sbb eax, eax
or eax, 1
test eax, eax
je 0x403574
push 0
push edi
push ebx
call fcn.00402770
push edx
push eax
push 0x4257d8
call fcn.00402620
push eax
call fcn.00403530
add esp, 0x1c
jmp 0x403574
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x40367c
call fcn.0040a8bd
mov dword [eax], 0x28
call fcn.0040a8bd
pop edi
pop ebp
cmp dword [eax], 0
jg 0x403760
push dword [esi]
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
jne 0x4036a5
call fcn.0040a8bd
mov dword [eax], 0x28
jmp 0x4036c1
mov eax, dword [esi + 0x144]
test eax, eax
je 0x4036b8
push eax
call fcn.0040ab4f
add esp, 4
push esi
call fcn.0040ab4f
add esp, 4
push ebx
call fcn.004144f1
add esp, 4
test eax, eax
jns 0x4036f5
call fcn.0040a8bd
cmp dword [eax], 2
jne 0x40377b
call fcn.0040a8bd
push ebx
push str.directory__s_does_not_exist
mov dword [eax], 0
call fcn.00401170
add esp, 8
pop esi
pop ebx
ret
push ebx
call fcn.0041447c
add esp, 4
test eax, eax
jns 0x4036f6
call fcn.0040a8bd
cmp dword [eax], 2
jne 0x40372a
call fcn.0040a8bd
push ebx
push str.file__s_does_not_exist
mov dword [eax], 0
call fcn.00401170
add esp, 8
pop ebx
ret
call fcn.0040a8bd
push dword [eax]
call fcn.0040aa0a
add esp, 4
push eax
push ebx
push str.could_not_remove_file__s:__s
call fcn.004010f0
call fcn.0040a8bd
push dword [eax]
call fcn.0040aa0a
add esp, 4
push eax
push ebx
push str.could_not_open_directory__s:__s
call fcn.004010f0
call fcn.0040a8bd
push dword [eax]
call fcn.0040aa0a
add esp, 4
push eax
push ebx
push str.could_not_read_directory__s:__s
call fcn.004010f0
call fcn.0040a8bd
push dword [eax]
call fcn.0040aa0a
add esp, 4
push eax
push ebx
push str.could_not_remove_directory__s:__s
call fcn.004010f0
int3
Function at 0x408301
Capabilities:
Parse pe header

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

Function at 0x40d352
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00423ce0
mov eax, dword [0x42f140]
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.0040c7c2
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x40d394
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x40d4f0
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004076f0
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 + 0x430ea8]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.00419cbd
mov ecx, dword [esi*4 + 0x430ea8]
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 0x40d4e9
cmp eax, dword [ecx + edi + 0x24]
jne 0x40d4e9
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 0x40d4e9
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00419cbd
add esp, 0x14
test edx, edx
jl 0x40d4e9
jg 0x40d45f
test eax, eax
jb 0x40d4e9
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x40d4e9
jl 0x40d479
cmp dword [ebp - 0x1008], eax
ja 0x40d4e9
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x40d497
test ebx, ebx
je 0x40d4d0
cmp ecx, edi
jae 0x40d4d0
mov al, byte [ecx]
cmp al, 0xd
jne 0x40d4b1
lea eax, [edi - 1]
cmp ecx, eax
jae 0x40d4bd
cmp byte [ecx + 1], 0xa
jne 0x40d4bd
inc ecx
jmp 0x40d4bd
movzx eax, al
movsx eax, byte [eax + 0x42f388]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x40d497
cmp edx, ebx
jne 0x40d497
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x40d4ee
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004076d6
leave
ret

Function at 0x41669a
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041661c
Function at 0x417237
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x428e58
push 0x428e50
push str.FlsAlloc
push 0x1f
call fcn.00417076
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41726b
push dword [ebp + 8]
mov ecx, esi
call dword [0x4251a4]
call esi
jmp 0x417271
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4172b5
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x428e68
push 0x428e60
push str.FlsGetValue
push 0x21
call fcn.00417076
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4172ec
push dword [ebp + 8]
mov ecx, esi
call dword [0x4251a4]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4172f4
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x428e70
push 0x428e68
push str.FlsSetValue
push 0x22
call fcn.00417076
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41732e
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x4251a4]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x418de1
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 + 0x430ea8]
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 0x418e21
cmp byte [ebx], 0xa
jne 0x418e21
or byte [edi + eax + 0x28], 4
jmp 0x418e26
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 0x418f25
mov dl, byte [eax]
cmp dl, 0x1a
je 0x418f08
inc eax
cmp dl, 0xd
je 0x418e52
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x418e78
cmp eax, ecx
jae 0x418e86
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 0x418e3a
jmp 0x418f25
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 0x418f03
cmp dword [ebp - 0x10], 0
je 0x418f03
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x430ea8]
test byte [eax + edi + 0x28], 0x48
je 0x418edd
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x418ec8
mov byte [esi], dl
jmp 0x418ed9
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x430ea8]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x418f25
cmp byte [ebp - 1], 0xa
jne 0x418eec
cmp esi, ebx
jne 0x418eec
mov byte [esi], 0xa
jmp 0x418f24
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00419cdb
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x418f25
mov byte [esi], 0xd
jmp 0x418f24
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x430ea8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x418f22
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x418f25
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret