joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402760
Capabilities:
Create directory
Set file attributes

Disassembly:
sub esp, 0x390
mov eax, dword [0x41c0f8]
push ebx
push ebp
mov ebp, dword [esp + 0x39c]
mov dword [esp + 0x394], eax
mov eax, ebp
push esi
mov dword [esp + 0xc], ecx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402785
sub eax, edx
mov esi, eax
cmp byte [esi + ebp - 1], 0x5c
jne 0x40279b
mov byte [esi + ebp - 1], cl
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
lea eax, [esp + 0x118]
push eax
push ebp
call ebx
cmp dword [esp + 0x118], 0x10
mov dword [esp + 0x10], eax
jne 0x4027de
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x38c]
call fcn.0040f5ac
add esp, 0x390
ret 8
push edi
xor eax, eax
test esi, esi
mov ecx, 0x41
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
jle 0x402851
lea ebx, [esp + 0x18]
mov edi, ebp
sub ebx, ebp
mov al, byte [edi]
cmp al, 0x5c
mov byte [ebx + edi], al
jne 0x402847
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x14]
call fcn.00402700
test eax, eax
jne 0x402847
push eax
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x402847
mov al, byte [esp + 0x3a8]
test al, al
je 0x402837
push 7
lea eax, [esp + 0x1c]
push eax
jmp 0x402841
push 0x80
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
inc edi
dec esi
jne 0x4027f8
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
lea edx, [esp + 0x25c]
push edx
push ebp
xor edi, edi
call ebx
cmp eax, 0xffffffff
je 0x402872
test byte [esp + 0x25c], 0x10
je 0x402872
mov edi, 1
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
push eax
call esi
test edi, edi
pop edi
jne 0x4028a8
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x4028a8
mov al, byte [esp + 0x3a4]
test al, al
je 0x40289c
push 7
jmp 0x4028a1
push 0x80
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [esp + 0x10]
push eax
call esi
lea ecx, [esp + 0x118]
push ecx
push ebp
call ebx
push eax
call esi
mov ecx, dword [esp + 0x118]
xor eax, eax
pop esi
cmp ecx, 0x10
mov ecx, dword [esp + 0x394]
pop ebp
sete al
pop ebx
call fcn.0040f5ac
add esp, 0x390
ret 8
Function at 0x402e00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x114
mov edx, dword [ebp + 8]
test edx, edx
mov eax, dword [0x41c0f8]
push ebx
push esi
mov dword [esp + 0x118], eax
push edi
mov ebx, ecx
jne 0x402e2f
mov edx, dword [ebx + 0x24]
test edx, edx
je 0x402fa7
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x10]
lea esi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov dword [esp + 0xc], 0
mov eax, edx
sub esi, edx
lea esp, [esp]
mov cl, byte [eax]
mov byte [esi + eax], cl
inc eax
test cl, cl
jne 0x402e50
lea edi, [esp + 0x10]
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402e60
mov eax, dword [str..BitField]
mov ecx, dword [0x41864c]
mov dx, word [0x418650]
push 0
push 0x8000080
push 4
push 0
mov dword [edi], eax
push 1
push closesocket
lea eax, [esp + 0x28]
mov dword [edi + 4], ecx
push eax
mov word [edi + 8], dx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402fa7
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [esp + 0x10]
push ecx
push 4
lea edx, [ebx + 4]
push edx
push esi
mov dword [esp + 0x20], 4
call edi
mov ecx, dword [esp + 0xc]
push 0
lea eax, [esp + 0x10]
push eax
push ecx
lea edx, [ebx + 8]
push edx
push esi
call edi
mov ecx, dword [esp + 0xc]
push 0
lea eax, [esp + 0x10]
push eax
push ecx
lea edx, [ebx + 0xc]
push edx
push esi
call edi
mov edx, dword [esp + 0xc]
push 0
lea ecx, [esp + 0x10]
push ecx
push edx
lea eax, [ebx + 0x10]
push eax
push esi
call edi
mov ecx, dword [esp + 0xc]
push 0
lea eax, [esp + 0x10]
push eax
push ecx
lea edx, [ebx + 0x14]
push edx
push esi
call edi
push 0
lea ecx, [esp + 0x10]
push ecx
push 2
lea eax, [ebx + 0x18]
push eax
push esi
mov dword [esp + 0x20], 2
call edi
movzx eax, word [ebx + 0x18]
push 0
lea edx, [esp + 0x10]
push edx
push eax
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x1c]
push eax
push esi
call edi
push 0
lea ecx, [esp + 0x10]
push ecx
push 2
lea eax, [ebx + 0x20]
push eax
push esi
mov dword [esp + 0x20], 2
call edi
movzx eax, word [ebx + 0x20]
push 0
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x14], eax
push eax
mov eax, dword [ebx + 0x24]
push eax
push esi
call edi
mov eax, dword [ebx + 0x10]
mov edx, dword [ebx + 0x28]
push 0
lea ecx, [esp + 0x10]
push ecx
push eax
push edx
push esi
mov dword [esp + 0x20], eax
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x11c]
call fcn.0040f5ac
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x11c]
or eax, 0xffffffff
call fcn.0040f5ac
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x403050
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x114
mov eax, dword [0x41c0f8]
push ebx
push esi
mov ebx, ecx
mov esi, dword [ebx + 0x24]
test esi, esi
mov dword [esp + 0x118], eax
push edi
je 0x403106
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x10]
lea edx, [esp + 0x10]
rep stosd dword es:[edi], eax
mov eax, esi
sub edx, esi
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x403090
lea edi, [esp + 0x10]
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4030a0
mov eax, dword [0x418654]
push 0
push 0x8000080
push 4
push 0
push 1
push closesocket
lea ecx, [esp + 0x28]
push ecx
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4030ea
xor eax, eax
mov ecx, dword [esp + 0x11c]
call fcn.0040f5ac
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
jne 0x403103
mov edx, dword [ebp + 8]
push edx
push esi
mov ecx, ebx
call fcn.00402af0
mov dword [ebx + 0x2c], esi
mov ecx, dword [esp + 0x11c]
mov eax, 1
call fcn.0040f5ac
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x403120
Capabilities:
Check mutex on windows
Write file on windows

Disassembly:
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 0x2c]
test eax, eax
jne 0x403133
or eax, 0xffffffff
pop esi
pop ecx
ret 0xc
mov eax, dword [esi + 0x1c]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateMutexA]
push edi
push eax
push 0
push 0
call ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
mov dword [esp + 0xc], eax
jne 0x40316d
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x1c]
push ecx
push 0
push 0
call ebx
mov edi, eax
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 0x2c]
push 0
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x40319a
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop ebx
or eax, 0xffffffff
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esi + 0x2c]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
push edi
je 0x40318a
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [esp + 0xc]
pop edi
pop ebx
pop esi
pop ecx
ret 0xc
Function at 0x403121
Capabilities:
Check mutex on windows
Write file on windows

Disassembly:
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 0x2c]
test eax, eax
jne 0x403133
or eax, 0xffffffff
pop esi
pop ecx
ret 0xc
mov eax, dword [esi + 0x1c]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateMutexA]
push edi
push eax
push 0
push 0
call ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
mov dword [esp + 0xc], eax
jne 0x40316d
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x1c]
push ecx
push 0
push 0
call ebx
mov edi, eax
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 0x2c]
push 0
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x40319a
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop ebx
or eax, 0xffffffff
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esi + 0x2c]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
push edi
je 0x40318a
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [esp + 0xc]
pop edi
pop ebx
pop esi
pop ecx
ret 0xc

Function at 0x403370
Capabilities:
Move file

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0xc]
test eax, eax
je 0x403395
cmp dword [esi + 0x14], eax
mov ecx, esi
jb 0x40338e
call fcn.00402fc0
mov ecx, esi
pop esi
jmp fcn.004031d0
push 0
call fcn.00402e00
pop esi
ret
Function at 0x403740
Capabilities:
Delete file
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x41c
mov eax, dword [0x41c0f8]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [esp + 0x424], eax
xor eax, eax
push eax
push 0x80
push 4
push eax
push eax
push 0x40000000
mov ecx, 0x100
lea edi, [esp + 0x38]
push ebx
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4038ad
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x100000
mov dword [esp + 0x1c], eax
jb 0x4037e5
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
push esi
je 0x4037c3
mov edi, dword [sym.imp.KERNEL32.dll_SetEndOfFile]
call edi
push esi
call edi
test eax, eax
jne 0x4037f2
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor eax, eax
mov ecx, dword [esp + 0x424]
call fcn.0040f5ac
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [esp + 0x1a]
movzx edx, word [esp + 0x18]
movzx eax, word [esp + 0x16]
push ecx
movzx ecx, word [esp + 0x18]
push edx
movzx edx, word [esp + 0x1a]
push eax
movzx eax, word [esp + 0x1a]
push ecx
movzx ecx, word [esp + 0x1c]
push edx
push eax
push ecx
lea edx, [esp + 0x3c]
push str._04d
push edx
call fcn.0040f5ba
lea eax, [esp + 0x44]
add esp, 0x24
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403840
sub eax, edx
mov edx, dword [ebp + 0xc]
lea ecx, [ebp + 0x10]
push ecx
push edx
lea eax, [esp + eax + 0x28]
push eax
call fcn.0040fd61
lea edi, [esp + 0x2c]
add esp, 0xc
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403863
mov cx, word [0x418658]
mov dl, byte [0x41865a]
mov word [edi], cx
lea eax, [esp + 0x20]
mov byte [edi + 2], dl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403885
push 0
lea ecx, [esp + 0x20]
push ecx
sub eax, edx
push eax
lea edx, [esp + 0x2c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
push esi
jne 0x4038c2
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x424]
call fcn.0040f5ac
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x424]
call fcn.0040f5ac
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403cb0
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x34c
mov eax, dword [0x41c0f8]
push ebp
push esi
mov esi, dword [esp + 0x358]
lea edx, [esp + 0x10c]
mov dword [esp + 0x350], eax
push edi
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x403cd7
lea edi, [esp + 0x110]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403cf0
mov ax, word [0x418698]
mov cl, byte [0x41869a]
mov word [edi], ax
lea edx, [esp + 0xc]
mov byte [edi + 2], cl
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x403d12
lea edi, [esp + 0xc]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403d21
mov dx, word [0x418694]
lea eax, [esp + 0x214]
push eax
lea ecx, [esp + 0x114]
push ecx
mov word [edi], dx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebp, eax
xor eax, eax
cmp ebp, 0xffffffff
je 0x403ea2
jmp 0x403d60
mov cl, byte [esp + eax + 0xc]
mov byte [esp + eax + 0x110], cl
inc eax
test cl, cl
jne 0x403d60
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
lea edx, [esp + 0x218]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x403e65
mov edi, 0x418690
lea esi, [esp + 0x244]
mov ecx, 2
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x403d77
mov edi, 0x41868c
lea esi, [esp + 0x244]
mov ecx, 3
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x403d77
lea eax, [esp + 0x244]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403dc5
lea edi, [esp + 0x10]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403dd3
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, byte [esp + 0x218]
and ecx, 3
test al, 0x10
rep movsb byte es:[edi], byte [esi]
je 0x403e25
lea eax, [esp + 0x10]
push eax
call fcn.00403cb0
add esp, 4
test eax, eax
je 0x403e70
lea ecx, [esp + 0x10]
push ecx
call ebx
xor eax, eax
mov cl, byte [esp + eax + 0x114]
mov byte [esp + eax + 0x10], cl
inc eax
test cl, cl
jne 0x403e10
jmp 0x403d77
test al, 1
je 0x403e3b
lea edx, [esp + 0x10]
push 0x80
push edx
call fcn.0040fdb8
add esp, 8
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x403e70
xor eax, eax
lea esp, [esp]
mov cl, byte [esp + eax + 0x114]
mov byte [esp + eax + 0x10], cl
inc eax
test cl, cl
jne 0x403e50
jmp 0x403d77
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x403e90
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x348]
call fcn.0040f5ac
add esp, 0x34c
ret
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x360]
push ecx
call ebx
pop ebx
mov ecx, dword [esp + 0x354]
pop edi
pop esi
pop ebp
call fcn.0040f5ac
add esp, 0x34c
ret
Function at 0x403ec0
Capabilities:
Create directory
Set file attributes

Disassembly:
sub esp, 0x38c
mov eax, dword [0x41c0f8]
push ebx
push ebp
mov ebp, dword [esp + 0x398]
mov dword [esp + 0x390], eax
mov eax, ebp
push esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403ee1
sub eax, edx
mov esi, eax
cmp byte [esi + ebp - 1], 0x5c
jne 0x403ef7
mov byte [esi + ebp - 1], cl
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
lea eax, [esp + 0x114]
push eax
push ebp
call ebx
cmp dword [esp + 0x114], 0x10
mov dword [esp + 0xc], eax
jne 0x403f38
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x388]
call fcn.0040f5ac
add esp, 0x38c
ret
push edi
xor eax, eax
test esi, esi
mov ecx, 0x41
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
jle 0x403faa
lea ebx, [esp + 0x14]
mov edi, ebp
sub ebx, ebp
mov al, byte [edi]
cmp al, 0x5c
mov byte [ebx + edi], al
jne 0x403fa0
lea ecx, [esp + 0x14]
push ecx
call fcn.00403b20
add esp, 4
test eax, eax
jne 0x403fa0
push eax
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x403fa0
mov al, byte [esp + 0x3a4]
test al, al
je 0x403f90
push 7
lea eax, [esp + 0x18]
push eax
jmp 0x403f9a
push 0x80
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
inc edi
dec esi
jne 0x403f52
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
lea edx, [esp + 0x258]
push edx
push ebp
xor edi, edi
call ebx
cmp eax, 0xffffffff
je 0x403fcb
test byte [esp + 0x258], 0x10
je 0x403fcb
mov edi, 1
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
push eax
call esi
test edi, edi
pop edi
jne 0x404001
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x404001
mov al, byte [esp + 0x3a0]
test al, al
je 0x403ff5
push 7
jmp 0x403ffa
push 0x80
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [esp + 0xc]
push eax
call esi
lea ecx, [esp + 0x114]
push ecx
push ebp
call ebx
push eax
call esi
mov ecx, dword [esp + 0x114]
xor eax, eax
pop esi
cmp ecx, 0x10
mov ecx, dword [esp + 0x390]
pop ebp
sete al
pop ebx
call fcn.0040f5ac
add esp, 0x38c
ret
Function at 0x404b80
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, ecx
push 0x9000
mov dword [esi], 0x4186f8
call fcn.0040fd22
xor ecx, ecx
add esp, 4
cmp eax, ecx
mov dword [esi + 8], eax
jne 0x404ba6
push 0xffffffffffffffff
call fcn.0040ffe3
mov dword [esi + 0xc], 0x9000
mov dword [esi + 0x10], ecx
mov dword [esi + 0x20], ecx
mov dword [esi + 0x18], ecx
mov dword [esi + 0x1c], ecx
mov dword [esi], 0x41872c
mov eax, esi
pop esi
ret

Function at 0x404bf0
Capabilities:
Set socket configuration

Disassembly:
push ecx
mov ecx, dword [ecx + 0x20]
lea eax, [esp]
push eax
push 0x8004667e
push ecx
mov dword [esp + 0xc], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
pop ecx
ret

Function at 0x404fe0
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 4]
push edi
xor edi, edi
cmp eax, edi
mov dword [esi], 0x418760
je 0x405011
cmp dword [esi + 8], edi
je 0x405011
push 1
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [esi + 4], edi
mov dword [esi + 0x10], 1
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x14], edi
pop edi
pop esi
ret

Function at 0x405020
Capabilities:
Create thread
Terminate thread

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 4]
test eax, eax
je 0x405056
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x405056
push 1
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [esi + 4], 0
mov dword [esi + 0x10], 1
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
lea eax, [esi + 0xc]
push eax
push 0
push esi
push 0x404f70
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
mov dword [esi + 4], eax
jne 0x405075
pop esi
ret
mov dword [esi + 8], 1
mov eax, 1
pop esi
ret

Function at 0x405a60
Capabilities:
Get file size
Read file on windows

Disassembly:
push ecx
push ebx
mov ebx, ecx
mov eax, dword [ebx]
test eax, eax
jne 0x405a6f
xor al, al
pop ebx
pop ecx
ret
push ebp
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
test ebp, ebp
jne 0x405a85
pop ebp
mov al, 1
pop ebx
pop ecx
ret
push esi
push edi
lea edi, [ebp + 2]
push edi
call fcn.0040f510
mov esi, eax
mov ecx, edi
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
add esp, 4
mov ecx, edx
and ecx, 3
push 0
rep stosb byte es:[edi], al
mov ecx, dword [ebx]
lea eax, [esp + 0x14]
push eax
push ebp
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405adf
push esi
call fcn.0040f50b
mov edx, dword [ebx]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov dword [ebx], 0
xor al, al
pop ebx
pop ecx
ret
cmp ebp, dword [esp + 0x10]
je 0x405b05
push esi
call fcn.0040f50b
mov eax, dword [ebx]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov dword [ebx], 0
xor al, al
pop ebx
pop ecx
ret
push ebp
push esi
mov ecx, ebx
call fcn.00405900
push esi
mov bl, al
call fcn.0040f50b
add esp, 4
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
pop ecx
ret
Function at 0x405c00
Capabilities:
Get file size
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebp
push esi
xor ebp, ebp
cmp eax, ebp
push edi
mov esi, ecx
jne 0x405c15
lea edi, [esi + 0x20]
jmp 0x405c2a
lea edx, [esi + 0x20]
mov edi, eax
sub edx, eax
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405c20
cmp edi, ebp
je 0x405c50
push ebp
push 0x8000080
push 4
push ebp
push 1
push closesocket
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0xc], edi
jne 0x405c5a
pop edi
pop esi
or eax, 0xffffffff
pop ebp
pop ecx
ret 8
push ebx
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x405c7b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, ebx
pop ebx
pop edi
pop esi
pop ebp
pop ecx
ret 8
cmp ebx, ebp
jne 0x405c93
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
pop esi
mov eax, 1
pop ebp
pop ecx
ret 8
mov eax, dword [esi + 0x22c]
cmp eax, ebp
je 0x405cb2
push eax
call fcn.0040fe3c
add esp, 4
mov dword [esi + 0x22c], ebp
mov dword [esi + 0x228], ebp
lea ebp, [ebx + 7]
shr ebp, 3
shl ebp, 3
lea eax, [ebp + 1]
push eax
mov dword [esp + 0x1c], ebp
call fcn.0040fd22
mov ecx, dword [esp + 0x1c]
mov edx, ecx
mov edi, eax
shr ecx, 2
mov dword [esi + 0x22c], edi
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi + 0x22c]
mov edi, dword [esp + 0x14]
add esp, 4
test eax, eax
je 0x405d59
push 0
lea ecx, [esp + 0x1c]
push ecx
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405d59
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jbe 0x405d4f
mov edx, dword [esi + 0x22c]
mov eax, dword [esp + 0x1c]
test eax, eax
mov byte [ebx + edx], 0
mov dword [esi + 0x228], ebx
jne 0x405d4f
mov eax, dword [esi + 0x22c]
push 0x18
push esi
push ebp
push eax
push eax
push 0
push 1
lea ecx, [esi + 0x230]
mov dword [esp + 0x34], ebp
call fcn.004021d0
test al, al
je 0x405d64
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
pop ecx
ret 8
test edi, edi
je 0x405d64
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x22c]
test eax, eax
je 0x405d85
push eax
call fcn.0040fe3c
add esp, 4
xor eax, eax
mov dword [esi + 0x22c], eax
mov dword [esi + 0x228], eax
pop ebx
pop edi
pop esi
or eax, 0xffffffff
pop ebp
pop ecx
ret 8