joyce8/EMBER2024-capa huggingface dataset:
Function at 0x412510
Capabilities:
Move file
Set file attributes

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
mov edi, edx
cmp dword [esi + 0x14], 8
jb 0x412521
mov eax, dword [esi]
jmp 0x412523
mov eax, esi
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [edi + 0x14], 8
jb 0x412537
mov edi, dword [edi]
cmp dword [esi + 0x14], 8
jb 0x41253f
mov esi, dword [esi]
push 1
push edi
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ebx, eax
push ebx
push edi
push esi
push str.MoveFile_lpExistingFileName_s_lpNewFileName_s_bResult_d
push 0xb4
push str.FileHandler.cpp
call fcn.0040a560
add esp, 0x18
test ebx, ebx
jne 0x412577
push 5
push edi
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
pop edi
pop esi
pop ebx
ret
pop edi
pop esi
mov eax, ebx
pop ebx
ret

Function at 0x4129f0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x47f5dc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x4821a4]
mov dword [ebp - 0x22c], 0
push esi
mov esi, ecx
push edi
test al, 1
jne 0x412a4b
or eax, 1
mov dword [0x4821bc], 7
mov dword [0x4821a4], eax
xor eax, eax
push 0x466430
mov dword [0x4821b8], 0
mov word [0x4821a8], ax
call fcn.0044af37
add esp, 4
cmp dword [0x4821b8], 0
jne 0x412b30
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.0044e8d0
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp word [ebp - 0x210], 0
jne 0x412a96
xor ecx, ecx
jmp 0x412aaf
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412aa0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x210]
mov ecx, 0x4821a8
push eax
call fcn.00409960
mov edx, 0x4821a8
lea ecx, [ebp - 0x228]
call fcn.00412580
mov edi, eax
cmp edi, 0x4821a8
je 0x412b19
cmp dword [0x4821bc], 8
jb 0x412af2
push dword [0x4821a8]
call fcn.0044a77c
add esp, 4
xor eax, eax
mov dword [0x4821bc], 7
push edi
mov ecx, 0x4821a8
mov dword [0x4821b8], 0
mov word [0x4821a8], ax
call fcn.00409860
cmp dword [ebp - 0x214], 8
jb 0x412b30
push dword [ebp - 0x228]
call fcn.0044a77c
add esp, 4
xor eax, eax
mov dword [esi + 0x14], 7
push 0xffffffffffffffff
push eax
mov dword [esi + 0x10], 0
mov ecx, esi
push 0x4821a8
mov word [esi], ax
call fcn.00409dd0
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.0044a781
mov esp, ebp
pop ebp
ret
Function at 0x412b70
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x47f5dc]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor eax, eax
mov esi, edx
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.0044e8d0
add esp, 0xc
lea eax, [ebp - 0x20c]
push 1
push 0x23
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x412c12
cmp word [ebp - 0x20c], 0
jne 0x412bc9
xor ecx, ecx
jmp 0x412be1
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412bd2
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x20c]
mov ecx, esi
push eax
call fcn.00409960
push 1
push 0x46f0d0
mov ecx, esi
call fcn.00405980
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044a781
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.0044a781
mov esp, ebp
pop ebp
ret

Function at 0x413830
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x466108
mov eax, dword fs:[0]
push eax
sub esp, 0x114
mov eax, dword [0x47f5dc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
test ecx, ecx
je 0x413988
cmp byte [ecx], 0
je 0x413988
test esi, esi
je 0x413988
mov dword [ebp - 0x120], 0x67452301
mov dword [ebp - 0x11c], 0xefcdab89
mov dword [ebp - 0x118], 0x98badcfe
mov dword [ebp - 0x114], 0x10325476
mov dword [ebp - 0x110], 0
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0x108], 0
test edx, edx
jle 0x4138d3
push edx
mov edx, ecx
lea ecx, [ebp - 0x120]
call fcn.004157a0
add esp, 4
xorps xmm0, xmm0
mov byte [ebp - 0x60], 0
lea edx, [ebp - 0x60]
movq qword [ebp - 0x5f], xmm0
lea ecx, [ebp - 0x120]
mov dword [ebp - 0x57], 0
mov word [ebp - 0x53], 0
mov byte [ebp - 0x51], 0
call fcn.00415880
push 0x3f
lea eax, [ebp - 0x4f]
mov byte [ebp - 0x50], 0
push 0
push eax
call fcn.0044e8d0
add esp, 8
lea edx, [ebp - 0x50]
lea ecx, [ebp - 0x60]
call fcn.00415930
add esp, 4
lea eax, [ebp - 0x50]
lea ecx, [ebp - 0x68]
push eax
call fcn.00401700
push ecx
lea edx, [ebp - 0x68]
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x80]
call fcn.00413690
add esp, 4
cmp dword [ebp - 0x54], 0x10
jb 0x413953
push dword [ebp - 0x68]
call fcn.0044a77c
add esp, 4
cmp dword [ebp - 0x6c], 8
lea eax, [ebp - 0x80]
push dword [ebp - 0x70]
cmovae eax, dword [ebp - 0x80]
push eax
push pe_nt_image_headers32
push esi
call fcn.0044b6fa
add esp, 0x10
cmp dword [ebp - 0x6c], 8
jb 0x413981
push dword [ebp - 0x80]
call fcn.0044a77c
add esp, 4
mov eax, 1
jmp 0x41398a
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0044a781
mov esp, ebp
pop ebp
ret
Function at 0x4139b0
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x466138
mov eax, dword fs:[0]
push eax
sub esp, 0x60
push ebx
push esi
push edi
mov eax, dword [0x47f5dc]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
push 0x40
lea eax, [ebp - 0x68]
push 0
push eax
call fcn.0044e8d0
add esp, 0xc
mov dword [ebp - 0x6c], 0x44
xorps xmm0, xmm0
mov dword [ebp - 0x40], 0x181
movdqu xmmword [ebp - 0x24], xmm0
call fcn.004012b0
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x413a1e
push 0x80004005
call fcn.00409ef0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
push esi
push edi
lea eax, [ebp - 0x14]
mov dword [ebp - 4], 0
push str.__s___s
push eax
call fcn.00413200
mov edi, dword [ebp - 0x14]
push edi
push str.RunApp_strExePath_s
push 0xb4
push str.ProcessCommon.cpp
call fcn.0040a560
add esp, 0x20
mov eax, 0xa
mov word [ebp - 0x3c], ax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x6c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push edi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov esi, eax
push esi
push str.RunApp_bRetCode_d
push 0xb4
push str.ProcessCommon.cpp
call fcn.0040a560
add esp, 0x10
test esi, esi
jne 0x413aa5
xor ebx, ebx
jmp 0x413ac8
mov ecx, dword [ebp - 0x20]
mov ebx, 1
mov esi, dword [ebp - 0x24]
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
test ecx, ecx
je 0x413ac1
push ecx
call eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x413ac8
push esi
call eax
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x413ae9
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
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
Function at 0x413b00
Capabilities:
Check if file exists
Get common file path
Get file attributes
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x466181
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x47f5dc]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov edi, ecx
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x21a]
push eax
call fcn.0044e8d0
xor eax, eax
mov dword [ebp - 0x250], 7
add esp, 0xc
mov dword [ebp - 0x254], 0
mov word [ebp - 0x264], ax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp word [ebp - 0x21c], 0
jne 0x413b8f
xor ecx, ecx
jmp 0x413baf
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
jmp 0x413ba0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x413ba0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x264]
call fcn.00409960
xor eax, eax
mov dword [ebp - 0x238], 7
mov dword [ebp - 0x23c], 0
mov word [ebp - 0x24c], ax
cmp word [edi], ax
jne 0x413be8
xor ecx, ecx
jmp 0x413bff
mov ecx, edi
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x413bf0
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x24c]
call fcn.00409960
lea edx, [ebp - 0x24c]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x234]
call fcn.004126d0
mov byte [ebp - 4], 3
cmp dword [ebp - 0x238], 8
jb 0x413c3c
push dword [ebp - 0x24c]
call fcn.0044a77c
add esp, 4
xor eax, eax
mov dword [ebp - 0x238], 7
cmp dword [ebp - 0x220], 8
mov word [ebp - 0x24c], ax
lea eax, [ebp - 0x234]
cmovae eax, dword [ebp - 0x234]
push eax
mov dword [ebp - 0x23c], 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x413cc6
test al, 0x10
je 0x413cc6
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
cmovae eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
sub esp, 0xc
mov edx, ebx
mov ecx, edi
call fcn.004139b0
add esp, 0xc
mov edi, eax
cmp dword [ebp - 0x250], 8
lea eax, [ebp - 0x264]
cmovae eax, dword [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
jmp 0x413cf4
cmp dword [ebp - 0x220], 8
lea eax, [ebp - 0x234]
cmovae eax, dword [ebp - 0x234]
push eax
push str.RunAppEx_FAILED_strDir_s_is_not_Exist
push 0xb4
push str.ProcessCommon.cpp
call fcn.0040a560
add esp, 0x10
xor edi, edi
cmp dword [ebp - 0x220], 8
jb 0x413d0b
push dword [ebp - 0x234]
call fcn.0044a77c
add esp, 4
xor eax, eax
mov dword [ebp - 0x220], 7
cmp dword [ebp - 0x250], 8
mov dword [ebp - 0x224], 0
mov word [ebp - 0x234], ax
jb 0x413d3f
push dword [ebp - 0x264]
call fcn.0044a77c
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0044a781
mov esp, ebp
pop ebp
ret
Function at 0x413f40
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
xor esi, esi
mov dword [ebp - 4], edx
push esi
push 0x80
push 3
push esi
push 3
push connect
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x413fbf
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp - 4]
mov ebx, eax
mov dword [ecx], ebx
cmp ebx, 0xffffffff
je 0x413fb7
lea eax, [ebx + 1]
push eax
call fcn.0044bd08
mov esi, eax
add esp, 4
test esi, esi
je 0x413fb7
push 0
push dword [ebp - 4]
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop ebx
pop edi
mov eax, dword [ecx]
mov byte [esi + eax], 0
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x413fd0
Capabilities:
Clear file content
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [edx + 0x14], 0x10
push ebx
push esi
push edi
jb 0x413fe1
mov esi, dword [edx]
jmp 0x413fe3
mov esi, edx
xor edi, edi
cmp dword [edx + 0x10], 0xffffffff
cmovbe edi, dword [edx + 0x10]
cmp dword [ecx + 0x14], 8
jb 0x413ff5
mov ecx, dword [ecx]
push 0
push 0x80
push 4
push 0
push 2
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x414050
push 0
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x414050
cmp dword [ebp - 4], edi
jne 0x414050
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x414be0
Capabilities:
Create thread
Resume thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 4]
test eax, eax
je 0x414c04
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x414c04
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 4
push ebx
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
push 4
push esi
push 0x414c50
push 0
push 0
call fcn.0044cbba
xor ebx, ebx
mov dword [esi + 4], eax
add esp, 0x18
test eax, eax
setne bl
test ebx, ebx
je 0x414c39
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, ebx
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x417780
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
test edx, edx
jne 0x41778b
xor eax, eax
pop ebp
ret
push esi
mov esi, dword [ebp + 8]
not ecx
cmp esi, 8
jb 0x417855
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x46f150]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x46f150]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x46f150]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x46f150]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x46f150]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x46f150]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x46f150]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x46f150]
dec edi
jne 0x4177a0
pop edi
test esi, esi
je 0x41787a
lea esp, [esp]
movzx eax, byte [edx]
lea edx, [edx + 1]
xor eax, ecx
shr ecx, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x46f150]
dec esi
jne 0x417860
not ecx
mov eax, ecx
pop esi
pop ebp
ret

Function at 0x417890
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push esi
push edi
mov edi, ecx
movsx eax, dl
mov esi, dword [edi]
xor eax, esi
and eax, 0xff
shr esi, 8
mov eax, dword [eax*4 + 0x46f150]
xor eax, esi
mov dword [edi], eax
movzx eax, al
add eax, dword [edi + 4]
imul ecx, eax, 0x8088405
mov eax, dword [edi + 8]
inc ecx
mov dword [edi + 4], ecx
shr ecx, 0x18
xor ecx, eax
shr eax, 8
and ecx, 0xff
xor eax, dword [ecx*4 + 0x46f150]
mov dword [edi + 8], eax
pop edi
pop esi
ret

Function at 0x4178e0
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push ebx
push esi
mov bl, dl
mov edx, ecx
push edi
mov edi, dword [edx + 8]
mov esi, edi
mov ecx, dword [edx]
and esi, 0xfffd
or esi, 2
mov eax, esi
xor eax, 1
imul eax, esi
shr eax, 8
xor bl, al
movsx eax, bl
xor eax, ecx
shr ecx, 8
and eax, 0xff
mov eax, dword [eax*4 + 0x46f150]
xor eax, ecx
mov dword [edx], eax
movzx eax, al
add eax, dword [edx + 4]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, edi
shr edi, 8
and eax, 0xff
xor edi, dword [eax*4 + 0x46f150]
mov al, bl
mov dword [edx + 8], edi
pop edi
pop esi
pop ebx
ret
Function at 0x418060
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, edx
push edi
mov edi, ebx
mov edx, ecx
imul edi, dword [ebp + 8]
cmp byte [esi], 0
je 0x41809d
push 0
lea eax, [ebp + 8]
push eax
push edi
push edx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x418091
mov byte [esi + 8], 1
mov eax, dword [ebp + 8]
xor edx, edx
pop edi
pop esi
div ebx
pop ebx
pop ebp
ret
xor eax, eax
mov ecx, edi
add ecx, dword [esi + 0x28]
adc eax, dword [esi + 0x2c]
cmp eax, dword [esi + 0x24]
jl 0x4180b9
jg 0x4180b3
cmp ecx, dword [esi + 0x20]
jbe 0x4180b9
mov edi, dword [esi + 0x20]
sub edi, dword [esi + 0x28]
mov ecx, dword [esi + 0x1c]
add ecx, dword [esi + 0x28]
push edi
push ecx
push edx
call fcn.0044e960
add esp, 0xc
mov eax, edi
add dword [esi + 0x28], edi
adc dword [esi + 0x2c], 0
xor edx, edx
pop edi
pop esi
div ebx
pop ebx
pop ebp
ret
Function at 0x418280
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [edi], 0
je 0x4182c3
cmp byte [edi + 1], 0
je 0x4182b9
push 2
lea eax, [ebp - 0x24]
xorps xmm0, xmm0
push eax
push 0
push dword [edi + 4]
movlpd qword [ebp - 0x28], xmm0
call ecx
mov ecx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4182cf
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x20]
mov dword [edi + 0x28], eax
mov eax, dword [edi + 0x24]
mov dword [edi + 0x2c], eax
cmp byte [edi], 0
je 0x4182f3
cmp byte [edi + 1], 0
je 0x4182ec
push 1
push 0
push 0
push dword [edi + 4]
call ecx
mov ebx, eax
sub ebx, dword [edi + 0x10]
jmp 0x4182f6
xor ebx, ebx
mov dword [ebp - 0xc], ebx
jmp 0x418305
mov ebx, dword [edi + 0x28]
mov eax, 0xffff
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], eax
cmp ebx, eax
jae 0x418308
mov dword [ebp - 8], ebx
push 0x404
call fcn.0044bd08
mov esi, eax
add esp, 4
test esi, esi
je 0x4182b9
mov ecx, dword [ebp - 8]
mov eax, 4
mov dword [ebp - 4], 0xffffffff
cmp ecx, eax
jbe 0x41843e
add eax, 0x400
cmp eax, ecx
mov edx, eax
mov eax, ebx
cmova edx, ecx
mov ecx, 0x404
sub eax, edx
mov dword [ebp - 0x1c], edx
sub ebx, eax
mov dword [ebp - 0x18], eax
cmp ebx, 0x404
cmova ebx, ecx
cmp byte [edi], 0
je 0x41838a
cmp byte [edi + 1], 0
je 0x41843e
mov ecx, dword [edi + 0x10]
add ecx, eax
mov eax, dword [edi + 0x14]
push 0
adc eax, 0
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push ecx
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x418394
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], 0
cmp byte [edi], 0
mov ecx, ebx
mov dword [ebp - 0x10], ecx
je 0x4183bc
push 0
lea eax, [ebp - 0x14]
push eax
push ebx
push esi
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4183b7
mov byte [edi + 8], 1
mov eax, dword [ebp - 0x14]
jmp 0x4183f6
xor eax, eax
mov edx, ebx
add edx, dword [edi + 0x28]
adc eax, dword [edi + 0x2c]
cmp eax, dword [edi + 0x24]
jl 0x4183db
jg 0x4183d2
cmp edx, dword [edi + 0x20]
jbe 0x4183db
mov ecx, dword [edi + 0x20]
sub ecx, dword [edi + 0x28]
mov dword [ebp - 0x10], ecx
push ecx
mov ecx, dword [edi + 0x1c]
add ecx, dword [edi + 0x28]
push ecx
push esi
call fcn.0044e960
mov eax, dword [ebp - 0x10]
add esp, 0xc
add dword [edi + 0x28], eax
adc dword [edi + 0x2c], 0
xor edx, edx
div ebx
cmp eax, 1
jne 0x41843e
lea eax, [ebx - 3]
test eax, eax
js 0x418426
dec eax
cmp byte [eax + esi], 0x50
jne 0x418422
cmp byte [eax + esi + 1], 0x4b
jne 0x418422
cmp byte [eax + esi + 2], 5
jne 0x418422
cmp byte [eax + esi + 3], 6
je 0x418451
test eax, eax
jns 0x418406
mov eax, dword [ebp - 4]
test eax, eax
jne 0x41843e
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0xc]
cmp eax, ecx
jb 0x418332
push esi
call fcn.0044add4
mov eax, dword [ebp - 4]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
add eax, dword [ebp - 0x18]
mov dword [ebp - 4], eax
jmp 0x418429
Function at 0x418f10
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, ecx
push edi
cmp dword [esi], 0
jne 0x418fd5
cmp dword [esi + 4], 0xffffffff
jne 0x418fd5
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x418f44
sub ecx, edx
sar ecx, 1
movzx eax, word [esi + ecx*2 + 0x242]
cmp eax, 0x5c
je 0x418f97
cmp eax, 0x2f
je 0x418f97
mov ecx, edi
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x418f70
sub ecx, edx
mov eax, 0x104
push 1
sar ecx, 1
push 0x46f0d0
sub eax, ecx
push eax
push edi
call fcn.0044b7b8
add esp, 0x10
lea eax, [ebp - 4]
push eax
push ecx
mov ecx, dword [ebp + 8]
call fcn.00417fb0
add esp, 8
test eax, eax
jne 0x418fb6
mov eax, dword [ebp - 4]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
mov ecx, eax
call fcn.00418460
xor ecx, ecx
mov dword [esi], eax
test eax, eax
mov edx, 0x200
cmove ecx, edx
mov eax, ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
pop edi
mov eax, 0x1000000
pop esi
mov esp, ebp
pop ebp
ret 0x10

Function at 0x4197a0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x47f5dc]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, ecx
mov ebx, edx
test edi, edi
je 0x4197d2
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4197d2
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
movzx eax, word [ebx]
test ax, ax
je 0x4198ca
push esi
mov esi, ebx
mov ecx, ebx
cmp ax, 0x2f
je 0x4197ef
cmp ax, 0x5c
jne 0x4197f1
mov esi, ecx
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x4197e3
cmp esi, ebx
je 0x41983a
sub esi, ebx
lea eax, [ebp - 0x414]
and esi, 0xfffffffe
push esi
push ebx
push eax
call fcn.0044e960
add esp, 0xc
cmp esi, 0x208
jae 0x4198da
xor eax, eax
lea edx, [ebp - 0x414]
mov ecx, edi
mov word [ebp + esi - 0x414], ax
call fcn.004197a0
xor eax, eax
mov word [ebp - 0x20c], ax
test edi, edi
je 0x419861
push 0x103
push edi
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0044b6fa
add esp, 0x10
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x419866
sub ecx, edx
lea edx, [ebp - 0x20c]
sar ecx, 1
lea esi, [edx + 2]
mov edi, edi
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x419880
sub edx, esi
mov eax, 0x104
push ecx
sar edx, 1
sub eax, edx
push ebx
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.0044b7b8
add esp, 0x10
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
pop esi
cmp eax, 0xffffffff
jne 0x4198ca
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.0044a781
mov esp, ebp
pop ebp
ret
call fcn.0044c5c0
int3
Function at 0x419dc0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
mov eax, dword [0x47f5dc]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x198]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x419e10
mov eax, dword [ebp - 0x198]
cmp al, 2
jne 0x419e0a
shr eax, 8
cmp al, 2
jne 0x419e0a
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044a781
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 4]
mov eax, 2
xor ecx, ebp
call fcn.0044a781
mov esp, ebp
pop ebp
ret

Function at 0x422060
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x47f5dc]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
xor eax, eax
push edi
push 4
mov edi, edx
cmp byte [esi + 0x3dc], al
setne al
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4220bb
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.00424c00
add esp, 0xc
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0044a781
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x3e0]
mov dword [ebp - 0x14], 1
call fcn.0042e2e0
mov ecx, dword [esi + 0x3e4]
imul eax, eax, 0x3e8
mov dword [ebp - 0x10], eax
call fcn.0042e2e0
imul eax, eax, 0x3e8
push 0
push 0
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x14]
push eax
push 0x98000004
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x422125
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.00424c00
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0044a781
mov esp, ebp
pop ebp
ret