joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40769c
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea eax, [ebp - 0x38]
lea edi, [ebp - 0x2c]
sub esp, 0x3c
mov esi, dword [ebp + 8]
mov byte [ebp - 0x2c], 1
mov byte [ebp - 0x2b], 0
mov word [ebp - 0x2a], 4
mov dword [ebp - 0x28], 0x40b650
mov dword [ebp - 0x24], 0x40b650
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0x40b640
mov dword [ebp - 0x38], 0xc
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x30], 0
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
push edx
push edx
je 0x407700
xor eax, eax
jmp 0x40772d
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0xb7
jne 0x40772d
mov dword [esp + 8], edi
mov dword [esp + 4], 0x80000007
mov dword [esp], esi
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
sub esp, 0xc
test eax, eax
jne 0x4076fc
call ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 4

Function at 0x407765
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [0x42b740], 0x44
lea eax, [ebp - 0x18]
mov dword [esp + 0x20], 0x42b740
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
xor edx, edx
sub esp, 0x28
test eax, eax
je 0x4077e1
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x18]
push eax
mov eax, edx
leave
ret 4

Function at 0x407a32
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
push edx
je 0x407a5d
and eax, 0xfffffffe
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push eax
push eax
mov ebx, dword [ebp - 4]
leave
ret 4

Function at 0x407a64
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x24
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
push edx
mov edx, 0
cmove eax, edx
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
mov ebx, dword [ebp - 4]
leave
ret 0xc
Function at 0x407ac0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea edi, [ebp - 0x1c]
mov esi, 0x65
sub esp, 0x2c
mov ebx, dword [ebp + 8]
dec esi
je 0x407b17
mov dword [ebp - 0x1c], 0x61736e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x1a
xor edx, edx
mov dword [esp + 0xc], ebx
div ecx
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], 0
mov dword [esp + 4], edi
add byte [ebp - 0x1a], dl
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
sub esp, 0x10
test eax, eax
je 0x407ad4
mov eax, ebx
jmp 0x407b1c
mov byte [ebx], 0
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8

Function at 0x407b26
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea edx, [ebp - 0x14]
sub esp, 0x34
cmp dword [ebp + 0x18], 1
mov ebx, dword [ebp + 0x14]
mov byte [ebx], 0
mov dword [esp + 0x10], edx
sbb eax, eax
mov dword [esp + 8], 0
xor al, al
add eax, 0x20119
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
sub esp, 0x14
test eax, eax
jne 0x407bc8
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x400
mov dword [esp + 0x10], ebx
mov dword [esp + 8], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
sub esp, 0x18
test eax, eax
jne 0x407bb1
mov eax, dword [ebp - 0xc]
dec eax
cmp eax, 1
jbe 0x407bb4
mov byte [ebx], 0
mov eax, dword [ebp - 0x14]
mov byte [ebx + 0x3ff], 0
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
mov ebx, dword [ebp - 4]
leave
ret 0x14
Function at 0x408147
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov eax, dword [ebp + 8]
mov dword [esp], 0x42af40
mov dword [esp + 4], eax
call fcn.00407ca2
push ebx
push ebx
mov dword [esp], 0x42af40
call fcn.00407921
test eax, eax
push esi
jne 0x408179
xor eax, eax
jmp 0x4081f1
mov dword [esp], eax
mov ebx, eax
call fcn.00407d23
test byte [0x42bc84], 0x80
push ecx
je 0x408197
mov al, byte [ebx]
test al, al
je 0x408175
cmp al, 0x5c
je 0x408175
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
sub ebx, 0x42af40
mov dword [esp], 0x42af40
call esi
push ecx
cmp ebx, eax
mov dword [esp], 0x42af40
jge 0x4081d6
call fcn.0040810f
test eax, eax
push edx
je 0x4081c7
test byte [eax], 0x10
je 0x408175
mov dword [esp], 0x42af40
call fcn.004078ba
push eax
jmp 0x4081a3
call fcn.00407cde
push eax
mov dword [esp], 0x42af40
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
inc eax
push edx
setne al
movzx eax, al
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret 4

Function at 0x4081fa
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
lea ebx, [ebp - 0x126]
sub esp, 0x134
mov dword [esp + 4], 0x104
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edx, [eax - 1]
push ecx
push ecx
cmp edx, 0x103
ja 0x408237
xor edx, edx
cmp byte [ebp + eax - 0x127], 0x5c
sete dl
jmp 0x40823e
xor eax, eax
mov edx, 1
mov ecx, dword [ebp + 8]
add edx, 0x40b440
add eax, ebx
mov dword [esp + 8], edx
mov dword [esp + 4], str._s_s.dll
mov dword [esp], eax
mov dword [esp + 0xc], ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push edx
mov ebx, dword [ebp - 4]
leave
ret 4
Function at 0x408874
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x42b7a4], 0
push ebp
mov ebp, esp
push esi
push ebx
mov edx, dword [ebp + 0xc]
je 0x408891
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
not eax
add ebx, edx
jmp 0x4088bf
xor ecx, ecx
mov eax, ecx
mov ebx, 8
mov esi, eax
and eax, 1
neg eax
shr esi, 1
and eax, 0xedb88320
xor eax, esi
dec ebx
jne 0x40889a
mov dword [ecx*4 + 0x42b7a0], eax
inc ecx
cmp ecx, 0x100
jne 0x408893
jmp 0x408885
cmp edx, ebx
je 0x4088d8
inc edx
mov cl, al
shr eax, 8
xor cl, byte [edx - 1]
movzx ecx, cl
xor eax, dword [ecx*4 + 0x42b7a0]
jmp 0x4088bf
pop ebx
not eax
pop esi
pop ebp
ret 0xc

Function at 0x461f20
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, 0x455015
lea edi, [esi - 0x54015]
push edi
or ebp, 0xffffffff
jmp 0x461f42
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x461f49
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x461f38
mov eax, 1
add ebx, ebx
jne 0x461f5b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x461f50
jne 0x461f6c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x461f50
xor ecx, ecx
sub eax, 3
jb 0x461f80
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x461ff2
mov ebp, eax
add ebx, ebx
jne 0x461f8b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x461f98
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x461fbc
inc ecx
add ebx, ebx
jne 0x461fa8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x461f9d
jne 0x461fb9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x461f9d
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x461fdc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x461fcd
jmp 0x461f3e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x461fdc
add edi, ecx
jmp 0x461f3e
pop esi
mov edi, esi
mov ecx, 0x32d
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x461ffa
cmp byte [edi], 0
jne 0x461ffa
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 eax, ebx
loop 0x461fff
lea edi, [esi + 0x5f000]
mov eax, dword [edi]
or eax, eax
je 0x46206e
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x621f0]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x62254]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x46202c
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x62258]
or eax, eax
je 0x462068
mov dword [ebx], eax
add ebx, 4
jmp 0x462049
call dword [esi + 0x6225c]
popal
jmp 0x4095a4
Function at 0x401d49
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x420170
cmp edx, dword [eax]
je 0x401d6b
add eax, 8
inc ecx
cmp eax, 0x420200
jl 0x401d5c
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x420170]
jne 0x401e99
mov eax, dword [0x421fc8]
cmp eax, 1
je 0x401e73
test eax, eax
jne 0x401d9c
cmp dword [0x4200a4], 1
je 0x401e73
cmp edx, 0xfc
je 0x401e99
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x401dd3
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.004023c0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00402540
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x401e16
lea eax, [ebp - 0x1a4]
push eax
call fcn.00402540
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x41d5f0
push edi
call fcn.00403550
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.004023c0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004023d0
lea eax, [ebp - 0xa0]
push 0x41d5d0
push eax
call fcn.004023d0
push dword [esi + 0x420174]
lea eax, [ebp - 0xa0]
push eax
call fcn.004023d0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.004034c1
add esp, 0x2c
pop edi
jmp 0x401e99
lea eax, [ebp + 8]
lea esi, [esi + 0x420174]
push 0
push eax
push dword [esi]
call fcn.00402540
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x404850
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov esi, dword [ebx + 8]
lea ecx, [ebp + 8]
call fcn.0040ef30
push esi
lea ecx, [ebp + 8]
call fcn.0040f170
lea ecx, [ebp - 0x10]
call fcn.0040ef30
push 0x42063c
lea eax, [ebp - 0x10]
push 0
push eax
lea ecx, [ebp + 8]
call fcn.0040fdf0
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 4]
call fcn.00404a50
lea ecx, [ebp - 0x10]
call fcn.00404a20
mov edi, 0x420640
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x20]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x20]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 4]
mov dl, byte [ecx]
mov byte [ebp - 0x20], dl
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 3
jne 0x4049db
lea ecx, [ebp - 0x14]
call fcn.0040ef30
push 0x42063c
push 0xffffffffffffffff
lea ecx, [ebp - 0x14]
push 1
push ecx
lea ecx, [ebp + 8]
call fcn.0040fef0
lea edx, [ebp - 0x14]
lea ecx, [ebp - 0x10]
push edx
call fcn.00404a50
lea ecx, [ebp - 0x14]
call fcn.00404a20
lea ecx, [ebp - 8]
call fcn.0040ef30
lea eax, [ebp - 0x20]
lea ecx, [ebp - 8]
push eax
call fcn.0040f170
lea ecx, [ebp - 0x18]
call fcn.0040ef30
lea ecx, [ebp - 0x10]
lea edx, [ebp - 8]
push ecx
lea eax, [ebp - 0x18]
push edx
push eax
call fcn.0040f440
add esp, 0xc
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0xc]
call fcn.00404a50
lea ecx, [ebp - 0x18]
call fcn.00404a20
lea edx, [ebp - 0xc]
mov ecx, ebx
push edx
call fcn.0040d1d0
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x40496e
lea ecx, [ebp - 0xc]
call fcn.00403f50
lea ecx, [ebp - 0xc]
call fcn.00404040
mov eax, dword [ebp - 8]
test eax, eax
je 0x404985
lea ecx, [ebp - 8]
call fcn.00403f50
lea ecx, [ebp - 8]
call fcn.00404040
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40499c
lea ecx, [ebp - 0x10]
call fcn.00403f50
lea ecx, [ebp - 0x10]
call fcn.00404040
mov eax, dword [ebp - 4]
test eax, eax
je 0x4049b3
lea ecx, [ebp - 4]
call fcn.00403f50
lea ecx, [ebp - 4]
call fcn.00404040
mov eax, dword [ebp + 8]
test eax, eax
je 0x4049ca
lea ecx, [ebp + 8]
call fcn.00403f50
lea ecx, [ebp + 8]
call fcn.00404040
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
test eax, eax
je 0x4049ea
lea ecx, [ebp - 4]
call fcn.00403f50
lea ecx, [ebp - 4]
call fcn.00404040
mov eax, dword [ebp + 8]
test eax, eax
je 0x404a01
lea ecx, [ebp + 8]
call fcn.00403f50
lea ecx, [ebp + 8]
call fcn.00404040
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404b50
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
test eax, eax
je 0x404c86
push ebx
push esi
push edi
mov edi, 0x420640
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x18]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor ebx, ebx
rep movsb byte es:[edi], byte [esi]
mov cl, bl
lea edx, [ebp - 0x18]
add cl, 0x41
push edx
mov byte [ebp - 0x18], cl
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 3
jne 0x404c73
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x7c]
push 0x64
lea ecx, [ebp - 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
je 0x404c73
mov al, byte [ebp - 0x7c]
test al, al
jne 0x404bfa
mov edi, str.no_label
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x7c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movsx edx, byte [ebp - 0x18]
lea ecx, [ebp - 0x7c]
lea eax, [ebp - 0x100]
push ecx
push edx
push str.__c___s_
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea ecx, [ebp - 0x100]
push ecx
lea ecx, [ebp - 0xc]
call fcn.0040cfc0
push 0x420644
lea ecx, [ebp - 0xc]
call fcn.0040d220
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0xc]
push edx
call fcn.0040e280
mov eax, dword [ebp - 4]
test eax, eax
je 0x404c6c
cmp byte [eax], 0
jne 0x404c55
mov dword [ebp - 4], 0
jmp 0x404c6c
lea ecx, [ebp - 4]
call fcn.00410680
mov eax, dword [ebp - 4]
test eax, eax
je 0x404c6c
lea ecx, [ebp - 4]
call fcn.00410680
mov dword [ebp - 0xc], 0x41d6b0
inc ebx
cmp ebx, 0x1a
jb 0x404b91
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
xor al, al
mov esp, ebp
pop ebp
ret

Function at 0x404f20
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, eax
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
mov edx, eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp - 4], 0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 4]
push ecx
push edx
call fcn.00413b30
mov edx, dword [ebp - 4]
push eax
push edx
call fcn.00404d50
add esp, 0x14
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10

Function at 0x40c4d0
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
je 0x40c505
mov ecx, dword [ebp + 8]
mov word [ecx], 2
add ecx, 4
movsx edx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push edx
mov edx, dword [eax]
push edx
push ecx
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
mov al, 1
pop ebp
ret
xor al, al
pop ebp
ret
Function at 0x40c710
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push esi
mov esi, ecx
push eax
lea ecx, [ebp - 0x10]
push ecx
call fcn.0040c460
mov eax, dword [esi + 8]
add esp, 8
lea edx, [ebp - 0x10]
mov dword [ebp - 0xc], 0
push 0x10
push edx
push eax
call dword [sym.imp.WSOCK32.dll_bind]
test eax, eax
je 0x40c74d
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 8]
lea ecx, [ebp + 8]
lea edx, [ebp - 0x10]
push ecx
push edx
push eax
mov dword [ebp + 8], 0x10
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
je 0x40c773
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0xe]
push ecx
call dword [sym.imp.WSOCK32.dll_ntohs]
and eax, 0xffff
mov dword [esi + 4], eax
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x40c8e0
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
push 1
call fcn.0040c790
test al, al
je 0x40c913
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 8]
push 0x10
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
jne 0x40c90c
mov al, 1
pop esi
pop ebp
ret 0xc
mov ecx, esi
call fcn.0040c810
xor al, al
pop esi
pop ebp
ret 0xc

Function at 0x40cbe0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x190
mov al, byte [0x422224]
test al, al
jne 0x40cc26
lea eax, [ebp - 0x190]
push eax
push 0x101
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
je 0x40cc1f
push 0x31b
push str.s:_advappsTK_2_basictk_baselib_srcnet_btksocket.cxx
push str.WSAStartup_error
call fcn.004125f0
add esp, 0xc
mov byte [0x422224], 1
mov esp, ebp
pop ebp
ret

Function at 0x40d460
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40d47e
call fcn.0040d270
mov dword [esi + 4], eax
xor al, al
pop esi
ret
mov al, 1
pop esi
ret
Function at 0x40d490
Capabilities:
Check if file exists
Delete file
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40d4bb
call fcn.0040d270
mov dword [esi + 4], eax
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0xc]
call fcn.0040cf70
test bl, 0x10
je 0x40d4d8
push str.wtest
push esi
lea ecx, [ebp - 0xc]
call fcn.0040d6f0
jmp 0x40d52c
test bl, 1
je 0x40d4fc
mov eax, dword [ebp - 4]
test eax, eax
je 0x40d4ec
lea ecx, [ebp - 4]
call fcn.00403f50
lea ecx, [ebp - 4]
call fcn.00404040
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x18]
push str.wtest
push eax
mov ecx, esi
call fcn.0040d760
push eax
lea ecx, [ebp - 0xc]
call fcn.0040d6f0
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40d524
lea ecx, [ebp - 0x10]
call fcn.00403f50
lea ecx, [ebp - 0x10]
call fcn.00404040
mov ecx, dword [ebp - 4]
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x40d573
mov eax, dword [ebp - 4]
test eax, eax
je 0x40d56b
lea ecx, [ebp - 4]
call fcn.00403f50
mov eax, dword [ebp - 4]
test eax, eax
je 0x40d56b
lea ecx, [ebp - 4]
call fcn.00410680
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 4]
test eax, eax
je 0x40d5a7
cmp byte [eax], 0
je 0x40d5a7
lea ecx, [ebp - 4]
call fcn.00410680
mov eax, dword [ebp - 4]
test eax, eax
je 0x40d5a7
lea ecx, [ebp - 4]
call fcn.00410680
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40d5b0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, ecx
mov eax, dword [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40d5d7
call fcn.0040d270
mov dword [esi + 4], eax
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 4]
mov ecx, esi
push eax
call fcn.0040d9a0
mov eax, dword [ebp - 4]
mov ecx, dword [eax - 8]
dec ecx
jne 0x40d600
test eax, eax
je 0x40d6bc
lea ecx, [ebp - 4]
call fcn.00403f50
jmp 0x40d6ad
lea ecx, [ebp - 0xc]
call fcn.0040ef30
lea edx, [ebp - 0xc]
lea ecx, [ebp - 4]
push edx
call fcn.0040fcc0
lea ecx, [ebp - 8]
call fcn.0040ef30
lea eax, [ebp - 0xc]
lea ecx, [ebp - 8]
push eax
call fcn.0040f340
lea ecx, [ebp - 0xc]
call fcn.00404a20
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 4]
call fcn.0040f340
mov eax, dword [ebp - 8]
test eax, eax
je 0x40d65a
lea ecx, [ebp - 8]
call fcn.00403f50
mov eax, dword [ebp - 8]
test eax, eax
je 0x40d65a
lea ecx, [ebp - 8]
call fcn.00410680
lea edx, [ebp - 4]
push 0x4208bc
push edx
call fcn.0040f050
add esp, 8
test al, al
jne 0x40d6c3
lea eax, [ebp - 4]
push 0x4208b8
push eax
call fcn.0040f050
add esp, 8
test al, al
jne 0x40d6c3
lea ecx, [ebp - 4]
push 0x4208b4
push ecx
call fcn.0040f050
add esp, 8
test al, al
jne 0x40d6c3
mov eax, dword [ebp - 4]
test eax, eax
je 0x40d6bc
cmp byte [eax], 0
je 0x40d6bc
lea ecx, [ebp - 4]
call fcn.00410680
mov eax, dword [ebp - 4]
test eax, eax
je 0x40d6bc
lea ecx, [ebp - 4]
call fcn.00410680
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
test eax, eax
je 0x40d6e6
cmp byte [eax], 0
je 0x40d6e6
lea ecx, [ebp - 4]
call fcn.00410680
mov eax, dword [ebp - 4]
test eax, eax
je 0x40d6e6
lea ecx, [ebp - 4]
call fcn.00410680
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40db90
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov ecx, dword [ecx + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
setne al
ret