joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402f45
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor edi, edi
cmp eax, edi
jl 0x402f72
mov ecx, dword [0x4247b8]
push edi
add eax, ecx
push edi
push eax
mov dword [0x41710c], eax
push dword [0x409024]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.00403070
cmp eax, edi
jl 0x403069
lea eax, [ebp - 4]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
push eax
lea eax, [ebp + 8]
push esi
push eax
push dword [0x409024]
call ebx
test eax, eax
je 0x403066
cmp dword [ebp - 4], esi
jne 0x403066
push dword [ebp + 8]
add dword [0x41710c], esi
call fcn.00403070
cmp eax, edi
mov dword [ebp - 8], eax
jl 0x403069
cmp dword [ebp + 0x10], edi
jne 0x403035
cmp dword [ebp + 8], edi
jle 0x403061
mov esi, 0x4130c8
mov edi, 0x4000
cmp dword [ebp + 8], edi
jge 0x402fe5
mov edi, dword [ebp + 8]
lea eax, [ebp - 4]
push 0
push eax
push edi
push esi
push dword [0x409024]
call ebx
test eax, eax
je 0x403066
cmp edi, dword [ebp - 4]
jne 0x403066
lea eax, [ebp + 0x14]
push 0
push eax
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403031
cmp dword [ebp + 0x14], edi
jne 0x403031
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x41710c], eax
cmp dword [ebp + 8], 0
jg 0x402fd8
jmp 0x403061
push 0xfffffffffffffffe
jmp 0x403068
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x403040
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 4]
push edi
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x409024]
call ebx
test eax, eax
je 0x403066
mov eax, dword [ebp - 4]
add dword [0x41710c], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x403069
push 0xfffffffffffffffd
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x403070
Capabilities:
Check for time delay via gettickcount
Write file on windows

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
xor ebp, ebp
push edi
mov dword [esp + 0x10], ebp
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [0x41710c]
mov edi, eax
sub esi, dword [0x40b03c]
add edi, 0x1f4
add esi, dword [esp + 0x1c]
cmp esi, ebp
jle 0x403246
push dword [0x41f11c]
call fcn.00403283
push ebp
push ebp
push dword [0x40b03c]
push dword [0x409024]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x41f118], esi
mov dword [0x417108], ebp
mov eax, dword [0x417110]
mov ebx, 0x4000
sub eax, dword [0x41f11c]
cmp eax, ebx
jg 0x4030e3
mov ebx, eax
mov esi, 0x4130c8
push ebx
push esi
call fcn.00403251
test eax, eax
je 0x403211
add dword [0x41f11c], ebx
mov dword [0x40b058], esi
mov dword [0x40b05c], ebx
cmp dword [0x424768], ebp
je 0x403174
cmp dword [0x424800], ebp
jne 0x403174
cmp dword [esp + 0x10], ebp
je 0x403141
mov eax, dword [0x41f118]
push ebp
sub eax, dword [0x41710c]
sub eax, dword [esp + 0x20]
add eax, dword [0x40b03c]
mov dword [0x417108], eax
call fcn.00405e92
jmp 0x403174
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, edi
jbe 0x403174
mov eax, dword [0x424764]
neg eax
sbb eax, eax
not eax
and eax, str.unpacking_data:__d__
push eax
push 0x402ba5
push ebp
push 0x6f
push dword [0x424760]
call dword [sym.imp.USER32.dll_CreateDialogParamA]
mov dword [esp + 0x10], eax
mov ecx, 0x40b040
mov dword [0x40b060], 0x40b0c8
mov dword [0x40b064], 0x8000
call fcn.00405f53
test eax, eax
jl 0x40321a
mov esi, dword [0x40b060]
mov eax, 0x40b0c8
sub esi, eax
je 0x4031db
lea ecx, [esp + 0x14]
push ebp
push ecx
push esi
push eax
push dword [0x409024]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403216
cmp esi, dword [esp + 0x14]
jne 0x403216
add dword [0x40b03c], esi
cmp dword [0x40b05c], ebp
jne 0x403109
jmp 0x4031e7
cmp dword [0x40b05c], ebp
jne 0x40321a
cmp ebx, ebp
je 0x40321a
mov eax, dword [0x41710c]
mov ecx, eax
sub ecx, dword [0x40b03c]
add ecx, dword [esp + 0x1c]
test ecx, ecx
jg 0x4030cd
push ebp
push ebp
push eax
push dword [0x409024]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x40321f
or eax, 0xffffffff
jmp 0x403248
push 0xfffffffffffffffe
jmp 0x40321c
push 0xfffffffffffffffd
pop eax
jmp 0x403248
mov esi, dword [esp + 0x10]
cmp esi, ebp
je 0x403246
mov eax, dword [0x41f118]
push ebp
push ebp
push 0x113
push esi
mov dword [0x417108], eax
call dword [sym.imp.USER32.dll_SendMessageA]
push esi
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret 4
Function at 0x4053e6
Capabilities:
Check if file exists
Create process on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push dword [ebp + 0xc]
mov dword [0x422d70], 0x44
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
je 0x40540a
test al, 0x10
jne 0x40540d
mov dword [ebp + 0xc], ecx
lea eax, [ebp - 0x10]
push eax
push 0x422d70
push dword [ebp + 0xc]
push ecx
push ecx
push ecx
push ecx
push ecx
push dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x405438
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 8
Function at 0x4054a0
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push ebx
mov ebx, dword [ebp + 8]
push esi
push ebx
call fcn.00405741
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], eax
test cl, 8
je 0x4054d6
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x4247e8], eax
jmp 0x40565b
mov dword [ebp + 8], ecx
push edi
and dword [ebp + 8], 1
je 0x4054f1
test eax, eax
je 0x405606
test cl, 2
je 0x405606
mov esi, 0x421d70
push ebx
push esi
call fcn.00405b6e
cmp dword [ebp + 8], 0
je 0x405510
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x405516
push ebx
call fcn.004056a8
push 0x409010
push ebx
call sub.KERNEL32.dll_lstrcatA
push ebx
call sub.KERNEL32.dll_lstrlenA
mov edi, eax
lea eax, [ebp - 0x148]
push eax
push esi
add edi, ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x4055fc
lea eax, [ebp - 0x11c]
push 0x3f
push eax
lea esi, [ebp - 0x11c]
call fcn.0040568c
cmp byte [eax], 0
je 0x405567
cmp byte [ebp - 0x18], 0
je 0x405567
lea esi, [ebp - 0x18]
cmp byte [esi], 0x2e
jne 0x40557d
mov al, byte [esi + 1]
test al, al
je 0x4055db
cmp al, 0x2e
jne 0x40557d
cmp byte [esi + 2], 0
je 0x4055db
push esi
push edi
call fcn.00405b6e
test byte [ebp - 0x148], 0x10
je 0x4055a2
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x4055db
push dword [ebp + 0xc]
push ebx
call fcn.004054a0
jmp 0x4055db
push ebx
call fcn.00405825
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4055d3
test byte [ebp + 0xc], 4
je 0x4055cb
push ebx
push 0xfffffffffffffff1
call fcn.00404f02
push 0
push ebx
call fcn.004058bb
jmp 0x4055db
inc dword [0x4247e8]
jmp 0x4055db
push ebx
push 0xfffffffffffffff2
call fcn.00404f02
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405545
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x405606
and byte [edi - 1], 0
xor esi, esi
pop edi
cmp dword [ebp + 8], esi
je 0x40565b
cmp dword [ebp - 8], esi
jne 0x40561b
inc dword [0x4247e8]
jmp 0x40565b
push ebx
call fcn.00405e2a
test eax, eax
je 0x40565b
push ebx
call fcn.00405661
push ebx
call fcn.00405825
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x405653
test byte [ebp + 0xc], 4
je 0x405613
push ebx
push 0xfffffffffffffff1
call fcn.00404f02
push esi
push ebx
call fcn.004058bb
jmp 0x40565b
push ebx
push 0xffffffffffffffe5
call fcn.00404f02
pop esi
pop ebx
leave
ret 8
Function at 0x405741
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x422170
push esi
call fcn.00405b6e
push esi
call fcn.004056f4
mov edi, eax
test edi, edi
jne 0x405762
xor eax, eax
jmp 0x4057b4
push edi
call fcn.00405d91
test byte [0x424770], 0x80
je 0x40577b
mov al, byte [edi]
test al, al
je 0x40575e
cmp al, 0x5c
je 0x40575e
sub edi, esi
jmp 0x405793
call fcn.00405e2a
test eax, eax
je 0x40578d
test byte [eax], 0x10
je 0x40575e
push esi
call fcn.004056a8
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x40577f
call fcn.00405661
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405841
and al, 0xfe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x405844
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
push 0
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
ret 0xc

Function at 0x405873
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp + 8], 0x61736e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
xor edx, edx
pop ecx
div ecx
push esi
lea eax, [ebp + 8]
push 0
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x4058b7
test edi, edi
jne 0x40587e
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x4058b1
Function at 0x4058bb
Capabilities:
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push str.MoveFileExA
push str.KERNEL32.dll
call fcn.00405e68
test eax, eax
mov esi, dword [esp + 0x18]
je 0x4058e7
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x405a26
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x422ef8], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x422ef8
je 0x40592b
push 1
push 0
push esi
call fcn.00405844
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x405a2c
cmp eax, edi
jg 0x405a2c
mov esi, 0x422970
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x405a2c
cmp eax, edi
jg 0x405a2c
push esi
push ebp
push str._s_s_r_n
push 0x422570
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ebx, eax
push 0x3f0
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.wininit.ini
push esi
call sub.KERNEL32.dll_lstrcatA
push 4
push 0xc0000000
push esi
call fcn.00405844
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x405a26
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x405a1f
lea eax, [esp + 0x18]
push 0
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405a1f
cmp edi, dword [esp + 0x18]
jne 0x405a1f
push str._Rename__r_n
push esi
call fcn.004057b9
test eax, eax
jne 0x405a33
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call fcn.00405b6e
add edi, 0xa
mov eax, edi
push ebx
add eax, esi
push 0x422570
push eax
call fcn.00405805
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x18]
push 0
add edi, ebx
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [0x4247f0]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x409320
push eax
call fcn.004057b9
test eax, eax
je 0x4059ea
inc eax
lea ecx, [esi + edi]
cmp eax, ecx
mov ebp, eax
jae 0x405a5a
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x405a4f
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x4059ec
Function at 0x405a62
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x14]
xor ebx, ebx
push eax
push 0x20019
push ebx
push dword [ebp + 0xc]
mov byte [esi], bl
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405ac6
lea eax, [ebp + 8]
mov dword [ebp + 8], 0x400
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405ab5
cmp dword [ebp + 0x14], 1
je 0x405ab7
cmp dword [ebp + 0x14], 2
je 0x405ab7
mov byte [esi], bl
push dword [ebp + 0xc]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x10
Function at 0x405b90
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
test ebx, ebx
jge 0x405bb1
mov ecx, dword [0x423f3c]
lea eax, [ebx*4 + 4]
sub ecx, eax
mov ebx, dword [ecx]
mov eax, dword [0x424798]
mov ecx, dword [ebp + 8]
add ebx, eax
mov eax, 0x423700
sub ecx, eax
mov edi, eax
cmp ecx, 0x800
jae 0x405d6b
mov edi, dword [ebp + 8]
and dword [ebp + 8], 0
jmp 0x405d6b
mov edx, edi
sub edx, eax
cmp edx, 0x400
jge 0x405d78
inc ebx
cmp cl, 0xfc
jbe 0x405d5e
movsx eax, byte [ebx + 1]
movsx ecx, byte [ebx]
mov esi, eax
mov edx, ecx
and esi, 0x7f
and edx, 0x7f
shl esi, 7
or esi, edx
mov edx, RegDeleteKeyA
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0xc], eax
or ecx, edx
or eax, edx
inc ebx
mov dword [ebp - 0x10], ecx
inc ebx
cmp byte [ebp + 0xf], 0xfe
mov dword [ebp - 8], eax
jne 0x405d09
cmp dword [0x4247e4], 0
push 2
pop esi
je 0x405c3c
push 4
pop esi
lea eax, [ebp - 4]
dec esi
push eax
push dword [ebp + esi*4 - 0x14]
push dword [0x424764]
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x405c70
push edi
push dword [ebp - 4]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
push dword [ebp - 4]
mov dword [ebp + 0xc], eax
call fcn.004053bb
cmp dword [ebp + 0xc], 0
jne 0x405c77
and byte [edi], 0
test esi, esi
jne 0x405c3c
cmp byte [edi], 0
jne 0x405cf0
mov eax, dword [ebp - 0x14]
cmp eax, 0x2b
jne 0x405c9b
push edi
push str.CommonFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00405a62
jmp 0x405ceb
cmp eax, 0x26
jne 0x405cc7
push edi
push str.ProgramFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00405a62
cmp byte [edi], 0
jne 0x405cf0
push str.C:Program_Files
push edi
call fcn.00405b6e
jmp 0x405ceb
cmp eax, 0x25
jne 0x405cda
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x405ceb
cmp eax, 0x24
jne 0x405ceb
push 0x400
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp byte [edi], 0
je 0x405d01
cmp dword [ebp - 0xc], 0x1a
jne 0x405d01
push str.MicrosoftInternet_ExplorerQuick_Launch
push edi
call sub.KERNEL32.dll_lstrcatA
push edi
call fcn.00405d91
jmp 0x405d4f
cmp byte [ebp + 0xf], 0xfd
jne 0x405d3d
cmp esi, 0x1b
jne 0x405d22
push dword [0x424764]
push edi
call fcn.00405acc
jmp 0x405d33
mov eax, esi
shl eax, 0xa
add eax, section..ndata
push eax
push edi
call fcn.00405b6e
add esi, 0xffffffeb
cmp esi, 6
jae 0x405d4f
jmp 0x405d01
cmp byte [ebp + 0xf], 0xff
jne 0x405d4f
or eax, 0xffffffff
sub eax, esi
push eax
push edi
call fcn.00405b90
push edi
call sub.KERNEL32.dll_lstrlenA
add edi, eax
mov eax, 0x423700
jmp 0x405d6b
jne 0x405d68
mov cl, byte [ebx]
mov byte [edi], cl
inc edi
inc ebx
jmp 0x405d6b
mov byte [edi], cl
inc edi
mov cl, byte [ebx]
test cl, cl
mov byte [ebp + 0xf], cl
jne 0x405bdc
and byte [edi], 0
cmp dword [ebp + 8], 0
pop edi
pop esi
pop ebx
je 0x405d8d
push eax
push dword [ebp + 8]
call fcn.00405b6e
leave
ret 8
Function at 0x405ec5
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x4232fc], 0
push esi
jne 0x405efc
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x405ed6
mov dword [ecx*4 + 0x4232f8], eax
inc ecx
cmp ecx, 0x100
jl 0x405ed1
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405f2d
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x4232f8]
xor eax, esi
inc ecx
dec edx
jne 0x405f0f
pop edi
not eax
pop esi
ret 0xc
Function at 0x10001010
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
cmp byte [edi + 0x44], 0
mov dword [edi], vtable.CAudio.0
je 0x10001069
push dword [edi + 0x18]
call dword [sym.imp.WINMM.dll_waveInStop]
push dword [edi + 0x18]
call dword [sym.imp.WINMM.dll_waveInReset]
lea esi, [edi + 0x30]
mov ebx, 2
nop
push 0x20
push dword [esi]
push dword [edi + 0x18]
call dword [sym.imp.WINMM.dll_waveInUnprepareHeader]
lea esi, [esi + 4]
sub ebx, 1
jne 0x10001040
push dword [edi + 0x18]
call dword [sym.imp.WINMM.dll_waveInClose]
push 0xffffffffffffffff
push dword [edi + 0x2c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
cmp byte [edi + 0x45], 0
je 0x1000109e
push dword [edi + 0x40]
call dword [sym.imp.WINMM.dll_waveOutReset]
lea esi, [edi + 0x30]
mov ebx, 2
push 0x20
push dword [esi]
push dword [edi + 0x40]
call dword [sym.imp.WINMM.dll_waveOutUnprepareHeader]
lea esi, [esi + 4]
sub ebx, 1
jne 0x10001080
push dword [edi + 0x40]
call dword [sym.imp.WINMM.dll_waveOutClose]
lea esi, [edi + 0x30]
mov ebx, 2
push dword [esi - 0x28]
call fcn.1001273d
push 0x20
push dword [esi]
call fcn.1001272f
push dword [esi - 0x20]
call fcn.1001273d
push 0x20
push dword [esi + 8]
call fcn.1001272f
add esp, 0x18
lea esi, [esi + 4]
sub ebx, 1
jne 0x100010a6
push dword [edi + 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [edi + 0x28]
call esi
push dword [edi + 0x2c]
call esi
test byte [ebp + 8], 1
je 0x100010fa
push 0x5c
push edi
call fcn.1001272f
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret 4

Function at 0x100011c0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x198
mov eax, dword [0x10032014]
xor eax, esp
mov dword [esp + 0x194], eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push edi
mov edi, ecx
lea eax, [edi + 0x14]
mov dword [edi], vtable.CClientSocket.0
push eax
mov dword [edi + 4], vtable.CBuffer.0
mov dword [edi + 0x10], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
call esi
lea eax, [edi + 0x3c]
mov dword [edi + 0x2c], vtable.CBuffer.0
push eax
mov dword [edi + 0x38], 0
mov dword [edi + 0x30], 0
mov dword [edi + 0x34], 0
call esi
lea eax, [edi + 0x64]
mov dword [edi + 0x54], vtable.CBuffer.0
push eax
mov dword [edi + 0x60], 0
mov dword [edi + 0x58], 0
mov dword [edi + 0x5c], 0
call esi
lea eax, [edi + 0x8c]
mov dword [edi + 0x7c], vtable.CBuffer.0
push eax
mov dword [edi + 0x88], 0
mov dword [edi + 0x80], 0
mov dword [edi + 0x84], 0
call esi
lea eax, [esp + 8]
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 dword [edi + 0xac], eax
mov eax, edi
mov byte [edi + 0xb6], 0
mov dword [edi + 0xa8], 0xffffffff
mov ecx, dword [str.Trimps]
mov dword [edi + 0xb0], ecx
mov cx, word [0x1002e368]
mov word [edi + 0xb4], cx
mov ecx, dword [esp + 0x19c]
pop edi
pop esi
xor ecx, esp
call fcn.100126e5
mov esp, ebp
pop ebp
ret
Function at 0x10001320
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
push 0xffffffffffffffff
lea esi, [edi + 0xb6]
mov byte [esi], 0
push dword [edi + 0xa4]
mov dword [edi], vtable.CClientSocket.0
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [edi + 0xa8]
cmp eax, 0xffffffff
je 0x100013ac
push 4
lea ecx, [ebp - 4]
mov dword [ebp - 4], 1
push ecx
push 0x80
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
push dword [edi + 0xa8]
call dword [sym.imp.KERNEL32.dll_CancelIo]
xor eax, eax
xchg dword [esi], eax
push dword [edi + 0xa8]
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [edi + 0xac]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov dword [edi + 0xa8], 0xffffffff
push dword [edi + 0xa4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [edi + 0xac]
call esi
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [edi + 0x80]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [edi + 0x7c], vtable.CBuffer.0
test eax, eax
je 0x100013e9
push 0x8000
push 0
push eax
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea eax, [edi + 0x8c]
push eax
call ebx
mov eax, dword [edi + 0x58]
mov dword [edi + 0x54], vtable.CBuffer.0
test eax, eax
je 0x10001410
push 0x8000
push 0
push eax
call esi
lea eax, [edi + 0x64]
push eax
call ebx
mov eax, dword [edi + 0x30]
mov dword [edi + 0x2c], vtable.CBuffer.0
test eax, eax
je 0x1000142e
push 0x8000
push 0
push eax
call esi
lea eax, [edi + 0x3c]
push eax
call ebx
mov eax, dword [edi + 8]
mov dword [edi + 4], vtable.CBuffer.0
test eax, eax
je 0x1000144c
push 0x8000
push 0
push eax
call esi
lea eax, [edi + 0x14]
push eax
call ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret