joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402290
Capabilities:
Copy file
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x280
mov eax, dword [0x44206c]
xor eax, esp
mov dword [esp + 0x27c], eax
push esi
push edi
mov dword [esp + 0xc], 0x5d73b797
mov edx, 0x5db7e153
mov eax, dword [esp + 0xc]
mov edi, ecx
sub edx, eax
lea eax, [esp + 0x78]
push eax
push 0
push 0
mov esi, dword [edx]
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x4023ed
lea esi, [esi*2 + 0x36574ad0]
mov eax, 0x6e8de892
sub eax, esi
push eax
lea eax, [esp + 0x7c]
push 0x104
push eax
call fcn.0041a0d3
add esp, 0xc
test eax, eax
jne 0x4023ed
mov eax, 0x6e8de8aa
sub eax, esi
push eax
lea eax, [esp + 0x7c]
push 0x104
push eax
call fcn.0041a0d3
add esp, 0xc
test eax, eax
jne 0x4023ed
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
lea eax, [esp + 0x54]
push eax
push 0
push edi
call esi
test eax, eax
je 0x4023ed
lea eax, [esp + 0x30]
push eax
push 0
lea eax, [esp + 0x80]
push eax
call esi
test eax, eax
je 0x4023cb
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x50]
cmp dword [esp + 0x4c], eax
jb 0x4023cb
ja 0x40236c
cmp ecx, dword [esp + 0x74]
jbe 0x4023cb
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
add ecx, 0xd71bc000
mov dword [esp + 0x18], ecx
adc eax, 0xfffffa7f
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
cmp eax, 1
jne 0x4023cb
pop edi
pop esi
mov ecx, dword [esp + 0x27c]
xor ecx, esp
call fcn.004146e0
mov esp, ebp
pop ebp
ret
push 0
lea eax, [esp + 0x7c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
pop edi
pop esi
mov ecx, dword [esp + 0x27c]
xor ecx, esp
call fcn.004146e0
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x284]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.004146e0
mov esp, ebp
pop ebp
ret
Function at 0x402410
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea eax, [ebp - 4]
push ebx
push esi
mov esi, ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4024b1
cmp dword [ebp - 4], 0
jne 0x4024b1
test ebx, ebx
je 0x4024a6
push 0
push 0
push 0
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x4024a6
push edi
push 0
push 0
push 0
push 2
push eax
or edi, 0xffffffff
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 8], eax
test eax, eax
je 0x402480
mov edx, ebx
mov ecx, eax
call fcn.004024c0
push dword [ebp - 8]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0xffffffff
je 0x4024a5
cmp edi, ebx
jae 0x4024a5
push 0
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402be0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 8], 0x5d887838
mov eax, dword [ebp - 8]
push edi
mov edi, edx
mov dword [ebp - 4], ecx
call esi
mov edx, dword [ebp - 4]
mov ebx, eax
mov dword [ebp - 8], 0x2e248699
mov eax, dword [ebp - 8]
test edx, edx
je 0x402c1a
call esi
mov edx, dword [ebp - 4]
jmp 0x402c1d
mov eax, dword [ebp - 0xc]
mov dword [ebp - 8], eax
mov eax, dword [0x444080]
test eax, eax
je 0x402cd4
lea ecx, [ecx]
cmp dword [eax + 0x120], 0
mov ecx, dword [eax + 0x12c]
mov dword [ebp - 0xc], ecx
je 0x402c86
test edx, edx
je 0x402c75
call esi
mov edx, dword [ebp - 8]
mov ecx, eax
sub ecx, edx
cmp ecx, edi
jae 0x402cc8
sub edx, eax
mov eax, dword [0x444080]
add edx, edi
push edx
push dword [eax + 0x120]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x402cc8
mov eax, dword [0x444080]
push dword [eax + 0x120]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x444080]
push dword [eax + 0x14]
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov eax, dword [0x444080]
push dword [eax + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [0x444080]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0xc]
mov eax, ecx
mov dword [0x444080], eax
test ecx, ecx
je 0x402cd4
mov edx, dword [ebp - 4]
jmp 0x402c30
pop edi
pop esi
mov eax, 0x5b4
pop ebx
mov esp, ebp
pop ebp
ret
call esi
mov ecx, eax
sub ecx, ebx
cmp ecx, edi
jae 0x402cc8
mov ecx, dword [ebp - 4]
sub ebx, eax
add ebx, edi
test ecx, ecx
je 0x402cf2
call esi
mov ecx, dword [ebp - 4]
mov edi, eax
jmp 0x402cf5
mov edi, dword [ebp - 0xc]
mov eax, dword [0x44407c]
test eax, eax
je 0x402d62
mov edi, edi
mov esi, dword [eax + 4]
test ecx, ecx
je 0x402d35
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
sub ecx, edi
cmp ecx, ebx
jae 0x402cc8
mov ecx, edi
sub ecx, eax
mov eax, dword [0x44407c]
add ecx, ebx
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x402cc8
mov eax, dword [0x44407c]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [0x44407c]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, esi
mov dword [0x44407c], eax
test esi, esi
je 0x402d62
mov ecx, dword [ebp - 4]
jmp 0x402d00
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403480
Capabilities:
Connect pipe
Create pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
push edi
mov esi, edx
mov dword [ebp - 4], 0x21e229fd
mov eax, dword [ebp - 4]
sub esp, 0xc
xor edx, edx
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], ecx
call fcn.0040a6f0
add esp, 0xc
test eax, eax
mov eax, str.D:_A__GA___WD__A__GA___AN_S:_ML__NW___ME_
jne 0x4034b5
mov eax, str.D:_A__GA___WD__A__GA___AN_
push 0
lea ecx, [ebp - 8]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
je 0x4035af
mov edi, dword [ebp - 8]
test edi, edi
je 0x4035af
push ebx
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0xc
push eax
push 0x1388
push 0x100
push 0x100
push 0xff
push 6
push 0x40000003
push str..pipeunchecky
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], 0
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x403532
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop ebx
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
mov dword [ebp - 4], 0x3ca1ab9c
xor edi, edi
mov eax, dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x403559
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x403599
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x217
je 0x403587
cmp eax, 0x3e5
jne 0x403597
mov edi, 1
mov eax, dword [ebp + 8]
mov dword [eax], edi
mov eax, dword [ebp - 0x10]
mov dword [eax], ebx
xor eax, eax
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc]
push dword [eax + 0x10]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x403574
call esi
mov esi, eax
test esi, esi
je 0x403579
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x403a00
Capabilities:
Prepare http request

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
mov esi, ecx
push edi
push 0
lea ebx, [esi + 0x100]
push ebx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x403a3b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x403a35
movzx eax, ax
or eax, 0x80070000
test eax, eax
js 0x403c03
push dword [ebp + 0x20]
mov eax, dword [ebp + 8]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push 0
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [eax + 4]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
test eax, eax
jne 0x403a6e
call fcn.00409640
test eax, eax
jns 0x403a71
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
mov dword [esi + 4], eax
cmp dword [esi + 0x80], 0
je 0x403aa5
push 4
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 2
push eax
push 2
push dword [esi + 4]
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x403aa5
call fcn.00409640
test eax, eax
js 0x403c03
push 0
push 0xffffffffffffffff
push 0x403960
push dword [esi + 4]
call dword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
cmp eax, 0xffffffff
jne 0x403aca
call fcn.00409640
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
mov ecx, esi
call fcn.00403c10
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x1fa0
call fcn.0041dd88
add esp, 4
mov dword [esi + 0xd0], eax
test eax, eax
je 0x403b92
mov dword [esi + 0xd4], 0x1fa0
cmp dword [esi + 0xac], 0
je 0x403b72
cmp dword [esi + 0xb0], 8
lea eax, [esi + 0x9c]
jb 0x403b17
mov eax, dword [eax]
push ecx
push 0
push ecx
push 4
push 0
push 0x40000000
push eax
lea ecx, [esi + 0xd8]
call fcn.00409520
mov edi, eax
test edi, edi
js 0x403bfa
push 0
push dword [esi + 0x7c]
lea ecx, [esi + 0xd8]
push dword [esi + 0x78]
call fcn.004094e0
mov edi, eax
test edi, edi
js 0x403bfa
push dword [esi + 0x7c]
lea ecx, [esi + 0xd8]
push dword [esi + 0x78]
call fcn.00409480
mov edi, eax
test edi, edi
js 0x403bfa
cmp dword [esi + 0x94], 0
je 0x403bf8
push 0x1fa0
call fcn.0041dd88
add esp, 4
mov dword [esi + 0xe0], eax
test eax, eax
jne 0x403ba9
push ebx
mov edi, 0x8007000e
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
lea eax, [esi + 0x84]
mov dword [esi + 0xe4], 0x1fa0
cmp dword [eax + 0x14], 8
jb 0x403bc1
mov eax, dword [eax]
push ecx
push 0
push ecx
push 3
push 0
push 0x80000000
push eax
lea ecx, [esi + 0xe8]
call fcn.00409520
mov edi, eax
test edi, edi
js 0x403bfa
lea eax, [esi + 0xf0]
push eax
lea ecx, [esi + 0xe8]
call fcn.00409440
mov edi, eax
test edi, edi
js 0x403bfa
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
Function at 0x4045f0
Capabilities:
Read http header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x44206c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
xor eax, eax
push eax
mov word [ebp - 0x44], ax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x44]
mov dword [edi], 0xffffffff
push eax
push 0
push 5
mov dword [edi + 4], 0xffffffff
push dword [ecx + 4]
mov dword [ebp - 0x48], 0x40
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x404656
call fcn.00409640
mov esi, eax
test esi, esi
jns 0x404658
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004146e0
mov esp, ebp
pop ebp
ret 4
xor esi, esi
lea eax, [ebp - 0x44]
push eax
call fcn.0041d946
mov ecx, dword [ebp - 4]
add esp, 4
mov dword [edi], eax
xor ecx, ebp
mov dword [edi + 4], edx
mov eax, esi
pop edi
pop esi
call fcn.004146e0
mov esp, ebp
pop ebp
ret 4

Function at 0x4048c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42ec28
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x44206c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea eax, [esi + 0x100]
xor ebx, ebx
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x10], 1
mov dword [ebp - 4], ebx
mov ecx, dword [ebp + 0xc]
add dword [esi + 0x138], ecx
mov eax, dword [esi + 0xd8]
adc dword [esi + 0x13c], ebx
test eax, eax
je 0x40493d
push ebx
lea edx, [ebp + 0xc]
push edx
push ecx
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x404939
call fcn.00409640
mov ebx, eax
jmp 0x40499f
xor ebx, ebx
jmp 0x40499f
mov eax, dword [esi + 0xb8]
lea edi, [esi + 0xb4]
mov edx, dword [edi]
sub eax, edx
jne 0x404985
mov ecx, dword [esi + 0x120]
mov eax, ecx
and eax, dword [esi + 0x124]
cmp eax, 0xffffffff
mov eax, dword [edi + 8]
je 0x404975
sub eax, edx
cmp ecx, eax
jbe 0x404985
cmp ecx, 0x7fffffff
ja 0x4049c9
jmp 0x40497d
mov ecx, dword [esi + 0xd4]
jmp 0x404965
push ecx
mov ecx, edi
call fcn.00407ee0
push dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
add eax, ecx
push eax
push ecx
push dword [esi + 0xb8]
mov ecx, edi
call fcn.00408670
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x34]
lea eax, [esi + 0x100]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
call fcn.00407e00
int3
Function at 0x404af0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x100]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0xe8]
test eax, eax
je 0x404bb1
push 0
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0
push ecx
push dword [esi + 0xe4]
push dword [esi + 0xe0]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x404b4c
call fcn.00409640
mov edi, eax
test edi, edi
js 0x404be1
push 0
push dword [esp + 0x10]
push dword [esi + 0xe0]
push dword [esi + 4]
call dword [sym.imp.WINHTTP.dll_WinHttpWriteData]
test eax, eax
jne 0x404b70
call fcn.00409640
mov edi, eax
test edi, edi
js 0x404be1
mov eax, dword [esp + 0xc]
add dword [esi + 0xf8], eax
mov ecx, dword [esi + 0xf8]
adc dword [esi + 0xfc], 0
mov eax, dword [esi + 0xfc]
cmp eax, dword [esi + 0xf4]
jb 0x404b9f
ja 0x404bdc
cmp ecx, dword [esi + 0xf0]
jae 0x404bdc
push ebx
xor edi, edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xc4]
test eax, eax
je 0x404bdc
push 0
push eax
push dword [esi + 0xc0]
push dword [esi + 4]
call dword [sym.imp.WINHTTP.dll_WinHttpWriteData]
test eax, eax
jne 0x404bdc
call fcn.00409640
mov edi, eax
test edi, edi
js 0x404be1
mov edi, 1
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408da0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x408db9
pop edi
pop ebx
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x408df6
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 8]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x408df2
lea ebx, [ebx]
cmp esi, edx
jae 0x408df6
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x408de0
cmp esi, edx
jb 0x408dfd
pop esi
pop edi
xor eax, eax
pop ebx
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x409440
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea eax, [ebp - 8]
push eax
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
jne 0x409466
call fcn.00409640
test eax, eax
js 0x409473
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov eax, dword [ebp - 8]
mov dword [ecx + 4], eax
xor eax, eax
mov esp, ebp
pop ebp
ret 4
Function at 0x40a790
Capabilities:
Check if file exists
Create directory
Execute anti-debugging instructions
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 0xc]
push ebx
push 0x104
mov dword [ebp - 0x18], edx
mov dword [ebp - 0xc], ecx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 4], eax
test eax, eax
jne 0x40a7be
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0x103
jbe 0x40a7cf
mov eax, 0x7a
pop ebx
mov esp, ebp
pop ebp
ret
push esi
mov ecx, 0x104
xor esi, esi
sub ecx, eax
lea eax, [ebx + eax*2]
push edi
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], eax
rdtsc
push eax
push esi
push dword [ebp - 0xc]
push str._s_d_x_
push ecx
push dword [ebp - 0x10]
call fcn.00409410
add esp, 0x18
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x40a90a
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40a879
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0xb7
jne 0x40a856
mov eax, dword [ebp - 4]
xor ecx, ecx
add eax, dword [ebp - 8]
push ebx
mov dword [ebp - 8], eax
mov word [ebx + eax*2 - 2], cx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40a85b
test al, 0x10
je 0x40a85b
mov eax, dword [ebp - 8]
mov ecx, 0x5c
mov word [ebx + eax*2 - 2], cx
jmp 0x40a87f
cmp edi, 3
je 0x40a86d
inc esi
cmp esi, 9
jg 0x40a8f8
mov ecx, dword [ebp - 0x14]
jmp 0x40a7e6
pop edi
pop esi
mov eax, 3
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
add eax, dword [ebp - 8]
cmp esi, 9
jg 0x40a8f8
mov ecx, 0x104
xor esi, esi
sub ecx, eax
lea eax, [ebx + eax*2]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], eax
push dword [ebp + 8]
rdtsc
push eax
push esi
push dword [ebp - 0x18]
push str._s_d_x._s
push ecx
push dword [ebp - 0x14]
call fcn.00409410
add esp, 0x1c
cmp eax, 0xffffffff
je 0x40a90a
push 0
push pe_nt_image_headers32
push 2
push 0
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x40a8ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x10]
inc esi
mov edi, eax
cmp esi, 9
jle 0x40a896
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, 9
jle 0x40a901
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0x7a
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a920
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 4]
push edi
push eax
push esi
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push eax
push dword [ebp - 4]
mov dword [ebp - 8], eax
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [edi + 8], eax
test eax, eax
jne 0x40a960
call fcn.00409640
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [ebp - 8]
push 0
push eax
push 0
push 0
mov dword [edi + 4], eax
push 0xf001f
push dword [edi + 8]
mov dword [edi + 0x18], 0xf001f
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
call dword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov dword [edi], eax
test eax, eax
jne 0x40a9b7
call fcn.00409640
push dword [edi + 8]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 8], 0
mov eax, esi
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x18
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x18
Function at 0x40b3e0
Capabilities:
Encode data using xor
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42f2a0
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x44206c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x444094]
test eax, eax
jne 0x40b427
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor ecx, ecx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x30]
push ecx
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push 2
push eax
call dword [sym.imp.KERNEL32.dll_LockFileEx]
test eax, eax
setne byte [ebp - 0x38]
mov dword [ebp - 4], 0
test eax, eax
jne 0x40b466
xor bl, bl
jmp 0x40b584
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
sub ecx, 0x10
call fcn.00408cc0
lea esi, [eax + 0x10]
mov dword [ebp + 8], esi
mov byte [ebp - 4], 1
mov ebx, dword [esi - 0xc]
lea edi, [ebx + 1]
test edi, edi
js 0x40b5b3
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x40b4a8
push edi
lea ecx, [ebp + 8]
call fcn.00409100
mov esi, dword [ebp + 8]
mov eax, 0xa
mov word [esi + ebx*2], ax
cmp edi, dword [esi - 8]
jg 0x40b5b3
mov dword [esi - 0xc], edi
xor eax, eax
mov word [esi + edi*2], ax
cmp dword [esi - 4], 1
mov edi, dword [esi - 0xc]
jle 0x40b4d8
push edi
lea ecx, [ebp + 8]
call fcn.00409030
mov esi, dword [ebp + 8]
xor eax, eax
test edi, edi
jle 0x40b4ec
mov ecx, 0xdead
xor word [esi + eax*2], cx
inc eax
cmp eax, edi
jl 0x40b4e3
mov eax, edi
cmp edi, 0xffffffff
jne 0x40b4ff
push dword [esi - 8]
push esi
call fcn.0041dbd1
add esp, 8
test eax, eax
js 0x40b5b3
cmp eax, dword [esi - 8]
jg 0x40b5b3
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea eax, [ebp - 0x18]
push 2
push eax
push ecx
push dword [0x444094]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x40b53c
call fcn.00409640
push 0
lea eax, [ebp + 8]
push eax
lea eax, [edi + edi]
push eax
push esi
push dword [0x444094]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40b560
call fcn.00409640
mov ebx, eax
jmp 0x40b562
xor ebx, ebx
shr ebx, 0x1f
add esi, 0xfffffff0
xor bl, 1
mov byte [ebp - 4], 0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40b584
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0x38], 0
je 0x40b59d
lea eax, [ebp - 0x30]
push eax
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_UnlockFileEx]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.004093b0
int3