joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405fe4
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffec0
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
push eax
mov edx, dword [ebp + 0xc]
push edx
push ebx
call fcn.00405e94
add esp, 0xc
push ebx
call fcn.004e0ef8
pop ecx
mov esi, eax
push 0x50ffec
call fcn.004e0ef8
pop ecx
add esi, eax
add esi, 2
push esi
call fcn.004e0050
pop ecx
mov esi, eax
push ebx
push str._s.
push esi
call sub.USER32.DLL_wsprintfA
add esp, 0xc
lea eax, [ebp - 0x140]
push eax
push esi
call sub.KERNEL32.DLL_FindFirstFileA
mov edi, eax
push esi
call fcn.004e0060
pop ecx
cmp edi, 0xffffffff
jne 0x406055
jmp 0x406129
lea eax, [ebp - 0x114]
mov edx, 0x50fff8
mov cl, byte [eax]
cmp cl, byte [edx]
jne 0x406080
test cl, cl
je 0x40610e
mov cl, byte [eax + 1]
cmp cl, byte [edx + 1]
jne 0x406080
add eax, 2
add edx, 2
test cl, cl
jne 0x406060
je 0x40610e
lea eax, [ebp - 0x114]
mov edx, 0x50fffa
mov cl, byte [eax]
cmp cl, byte [edx]
jne 0x4060ad
test cl, cl
je 0x40610e
mov cl, byte [eax + 1]
cmp cl, byte [edx + 1]
jne 0x4060ad
add eax, 2
add edx, 2
test cl, cl
jne 0x406091
je 0x40610e
push ebx
call fcn.004e0ef8
pop ecx
mov esi, eax
push 0x50fffd
call fcn.004e0ef8
pop ecx
add esi, eax
lea eax, [ebp - 0x114]
push eax
call fcn.004e0ef8
pop ecx
add esi, eax
add esi, 3
push esi
call fcn.004e0050
mov esi, eax
lea eax, [ebp - 0x114]
pop ecx
push eax
push ebx
push 0x50ffff
push esi
call sub.USER32.DLL_wsprintfA
add esp, 0x10
mov edx, dword [ebp + 0x10]
push edx
mov ecx, dword [ebp + 0xc]
push ecx
push esi
call fcn.00405fe4
add esp, 0xc
push esi
call fcn.004e0060
pop ecx
lea ecx, [ebp - 0x140]
push ecx
push edi
call sub.KERNEL32.DLL_FindNextFileA
test eax, eax
jne 0x406055
push edi
call sub.KERNEL32.DLL_FindClose
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x406130
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
mov ebx, dword [ebp + 8]
movsx eax, byte [ebx + 0x30]
add eax, 0x41
push eax
push 0x510005
lea edx, [ebp - 0x10]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0xc
lea ecx, [ebp - 0x120]
push 0x100
push ecx
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x10]
push 0
push ecx
call sub.KERNEL32.DLL_GetVolumeInformationA
test eax, eax
je 0x4061bb
push 0x51000a
lea eax, [ebp - 0x120]
push eax
call fcn.004e116c
add esp, 8
test eax, eax
jne 0x4061bb
movsx edx, byte [ebx + 0x30]
add edx, 0x41
lea ecx, [ebp - 0x20]
push edx
push 0x51000f
push ecx
call sub.USER32.DLL_wsprintfA
add esp, 0xc
push ebx
add ebx, 0x18
push ebx
lea eax, [ebp - 0x20]
push eax
call fcn.00405fe4
add esp, 0xc
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4061c0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
call sub.KERNEL32.DLL_GetLogicalDrives
mov esi, eax
mov ebx, 2
lea eax, [ebx + 0x41]
lea edx, [ebp - 0x10]
push eax
push 0x510013
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0xc
lea ecx, [ebp - 0x120]
push 0x100
push ecx
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x10]
push 0
push ecx
call sub.KERNEL32.DLL_GetVolumeInformationA
mov ecx, ebx
mov eax, 1
shl eax, cl
test eax, esi
je 0x406268
lea edx, [ebp - 0x10]
push edx
call sub.KERNEL32.DLL_GetDriveTypeA
cmp eax, 3
jne 0x406268
push 0x510018
lea ecx, [ebp - 0x120]
push ecx
call fcn.004e116c
add esp, 8
test eax, eax
jne 0x406268
lea eax, [ebx + 0x41]
lea edx, [ebp - 0x20]
push eax
push 0x51001d
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0xc
push edi
lea ecx, [edi + 0x18]
push ecx
lea eax, [ebp - 0x20]
push eax
call fcn.00405fe4
add esp, 0xc
inc ebx
cmp ebx, 0x1a
jb 0x4061db
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x406708
Capabilities:
Unmount volume via ioctl

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
mov eax, dword [ebp + 8]
add eax, 0x41
push eax
push 0x5102f4
lea edx, [ebp - 0x10]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0xc
push 0
lea ecx, [ebp - 4]
push ecx
lea eax, [ebp - 0x10]
push eax
call fcn.004f0830
add esp, 0xc
test eax, eax
je 0x4067d8
push 0
lea edx, [ebp - 8]
push edx
push 0
push 0
push 0
push 0
push 0x90018
mov ecx, dword [ebp - 4]
push ecx
call sub.KERNEL32.DLL_DeviceIoControl
mov ebx, eax
test ebx, ebx
jne 0x406765
jmp 0x4067c7
push 0
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0
push 0
push 0x90020
mov edx, dword [ebp - 4]
push edx
call sub.KERNEL32.DLL_DeviceIoControl
mov ebx, eax
test ebx, ebx
jne 0x406789
jmp 0x4067ab
push 0
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0
push 0
push 0x74808
mov edx, dword [ebp - 4]
push edx
call sub.KERNEL32.DLL_DeviceIoControl
mov ebx, eax
test ebx, ebx
jne 0x4067ab
push 0
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0
push 0
push 0x9001c
mov edx, dword [ebp - 4]
push edx
call sub.KERNEL32.DLL_DeviceIoControl
mov ecx, dword [ebp - 4]
push ecx
call sub.KERNEL32.DLL_CloseHandle
test ebx, ebx
je 0x4067d8
mov al, 1
jmp 0x4067da
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4067e0
Capabilities:
Get disk information

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffe0
mov ebp, 0x5102ec
mov esi, esp
mov ebx, 2
lea eax, [ebx + 0x41]
lea edx, [ebp + 0xc]
push eax
push edx
push esi
call sub.USER32.DLL_wsprintfA
add esp, 0xc
push esi
call sub.KERNEL32.DLL_GetDriveTypeA
cmp eax, 2
jne 0x40687f
mov byte [esi + 2], 0
push 0
lea ecx, [esp + 0xc]
push ecx
push esi
call fcn.004f0830
add esp, 0xc
test eax, eax
je 0x40687f
push 0
lea ecx, [esp + 0x10]
push ecx
push 0x10
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push 0x90001008
mov edx, dword [esp + 0x24]
push edx
call sub.KERNEL32.DLL_DeviceIoControl
mov edi, eax
mov eax, dword [esp + 8]
push eax
call sub.KERNEL32.DLL_CloseHandle
test edi, edi
je 0x40687f
lea eax, [esp + 0x10]
lea edx, [ebp + 0x11]
mov cl, byte [eax]
cmp cl, byte [edx]
jne 0x40687f
test cl, cl
je 0x40687b
mov cl, byte [eax + 1]
cmp cl, byte [edx + 1]
jne 0x40687f
add eax, 2
add edx, 2
test cl, cl
jne 0x40685f
jne 0x40687f
jmp 0x406896
mov ecx, dword [0x51f894]
mov eax, dword [ecx]
call fcn.004a2208
inc ebx
cmp ebx, 0x1a
jl 0x4067f3
cmp ebx, 0x1a
jl 0x4068a7
push 0x64
call sub.KERNEL32.DLL_Sleep
jmp 0x4067ee
mov eax, ebx
add esp, 0x20
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4080bc
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
xor eax, eax
xor edx, edx
xor ecx, ecx
push ebx
push esi
push edi
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x24], 0x800000
mov dword [ebp - 0x20], 2
mov dword [ebp - 0x1c], 3
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 2
mov dword [ebp - 0x10], 0x80
mov dword [ebp - 0xc], 0x510468
mov dword [ebp - 8], edx
mov dword [ebp - 4], ecx
push str.temp.pak
lea edx, [ebp - 0x24]
mov ecx, dword [ebx + 8]
push ecx
mov eax, dword [ebp + 0xc]
push eax
push edx
call fcn.004f7aac
add esp, 0x10
test eax, eax
je 0x408125
xor eax, eax
jmp 0x4081c9
push 0x8000
push 0x510479
call fcn.004e3f4c
add esp, 8
mov edi, eax
cmp edi, 0xffffffff
jne 0x408145
xor eax, eax
jmp 0x4081c9
push edi
call fcn.004e2e7c
pop ecx
mov esi, eax
mov dword [ebx + 0x10], esi
mov eax, esi
add eax, 0xf
shr eax, 4
shl eax, 4
mov dword [ebx + 4], eax
push eax
call fcn.004e0050
pop ecx
mov esi, eax
mov eax, dword [ebx + 0x10]
push eax
push esi
push edi
call fcn.004e3f5c
add esp, 0xc
push edi
call fcn.004e2d24
pop ecx
push str.Temp.pak
call sub.KERNEL32.DLL_DeleteFileA
push esi
mov edx, dword [ebx + 4]
push edx
push esi
push 0x20
mov ecx, dword [ebp + 8]
add ecx, 0x28
push ecx
push 1
call fcn.0050a33c
test eax, eax
je 0x4081a3
jmp 0x4081bb
mov eax, dword [ebx + 4]
push eax
push esi
mov edx, dword [ebp + 0x10]
push edx
call fcn.004e4e40
add esp, 0xc
mov dword [ebp - 4], 1
test esi, esi
je 0x4081c6
push esi
call fcn.004e0060
pop ecx
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408290
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffed4
xor eax, eax
push ebx
push esi
push edi
xor ebx, ebx
mov edi, dword [ebp + 8]
mov dword [ebp - 4], eax
mov dword [ebp - 0x8c], 0xbffbfbbf
lea eax, [ebp - 0x64]
push 0x20
push eax
push 0
call fcn.0050dc00
mov dword [ebp - 0x88], 1
push 0x800
call fcn.004e0050
pop ecx
mov esi, eax
test esi, esi
jne 0x4082dd
jmp 0x40848c
push 0x800
call fcn.004e0050
pop ecx
mov ebx, eax
test ebx, ebx
jne 0x4082f3
jmp 0x40848c
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
push esi
mov esi, eax
push edi
xor eax, eax
or ecx, 0xffffffff
mov edi, 0x51fbb8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
push 0x510494
push ebx
call fcn.004e0e48
add esp, 8
push edi
push ebx
call fcn.004e0e48
add esp, 8
push 0x510496
push ebx
call fcn.004e0e48
add esp, 8
mov dword [ebp - 0xc], esi
mov ecx, dword [ebp - 0xc]
xor eax, eax
push esi
push edi
mov esi, ecx
or ecx, 0xffffffff
mov edi, 0x51fbb8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
push 0x51049b
push esi
call fcn.004e0e48
add esp, 8
push edi
push esi
call fcn.004e0e48
add esp, 8
push 0
push ebx
push esi
call sub.KERNEL32.DLL_CopyFileA
push 0x80
push 0x8302
push edi
call fcn.004e3f4c
add esp, 0xc
mov edi, eax
cmp edi, 0xffffffff
jne 0x4083b5
jmp 0x40848c
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0xa4], ecx
push edi
call fcn.004e42cc
pop ecx
mov dword [ebp - 0xac], eax
lea eax, [ebp - 0xac]
push eax
push edi
mov edx, dword [ebp + 0xc]
push edx
lea ecx, [ebp - 0x8c]
push ecx
call fcn.004080bc
add esp, 0x10
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4083f4
jmp 0x408485
mov dword [ebp - 0x7c], 0x20
push edi
call fcn.004e42cc
pop ecx
mov dword [ebp - 0x84], eax
lea eax, [ebp - 0x84]
lea edx, [ebp - 0xac]
push eax
push edi
push edx
lea ecx, [ebp - 0x8c]
push ecx
call fcn.004080bc
add esp, 0x10
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x408431
jmp 0x408485
mov eax, 0xff
test eax, eax
je 0x408469
push 0x80
lea edx, [ebp - 0x8c]
push edx
lea ecx, [ebp - 0x12c]
push ecx
call fcn.004e0b90
mov dword [ebp - 0x12c], 0x12345678
mov dword [ebp - 0xb0], 0x12345678
add esp, 0xc
push 0x80
lea eax, [ebp - 0x12c]
push eax
push edi
call fcn.004e4e40
add esp, 0xc
mov dword [ebp - 4], 1
push edi
call fcn.004e2d24
pop ecx
cmp dword [ebp - 4], 0
jne 0x40849b
push 0
push esi
push ebx
call sub.KERNEL32.DLL_CopyFileA
test ebx, ebx
je 0x4084a6
push ebx
call fcn.004e0060
pop ecx
test esi, esi
je 0x4084b1
push esi
call fcn.004e0060
pop ecx
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40b6bc
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff94
mov eax, 0x510b70
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
call fcn.004e1410
xor edx, edx
mov dword [ebp - 0x28], edx
mov byte [ebp - 0x29], 0
push 0x54f990
call sub.KERNEL32.DLL_EnterCriticalSection
mov word [ebp - 0x14], 0xc
push 0x440
push 1
call fcn.004dffb4
add esp, 8
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x40b708
jmp 0x40b7f7
xor ecx, ecx
mov cl, byte [edi + 8]
cmp ecx, 0x7f
jne 0x40b71c
mov esi, dword [ebp - 0x28]
or byte [esi + 0x428], 4
cmp dword [0x54f9ec], 0
je 0x40b73e
mov eax, dword [ebp - 0x28]
mov dl, byte [eax + 0x428]
shr edx, 2
and edx, 1
cmp edx, 1
je 0x40b73e
jmp 0x40b7f7
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0x43c], edi
xor esi, esi
mov eax, dword [ebp - 0x28]
lea ebx, [eax + 4]
call fcn.004e8220
mov byte [ebx], al
inc esi
inc ebx
cmp esi, 0x20
jl 0x40b74f
mov dword [ebp - 0x44], 1
mov dword [ebp - 0x40], 0x28
xor eax, eax
mov dword [ebp - 0x3c], eax
push 0x20
mov edx, dword [ebp - 0x28]
add edx, 4
push edx
lea ecx, [ebp - 0x6c]
push ecx
call fcn.004e0b90
mov byte [ebp - 0x4c], 0
mov esi, dword [0x54f9e4]
add esp, 0xc
mov dword [ebp - 0x48], esi
mov byte [ebp - 0x4b], 2
mov word [ebp - 0x4a], 0x8002
mov dword [ebp - 0x30], 1
mov word [ebp - 0x14], 0xc
push 4
lea eax, [ebp - 0x30]
push eax
push 1
push 6
mov edx, dword [edi + 0x14]
push edx
call sub.WS2_32.DLL_setsockopt
lea ecx, [ebp - 0x44]
push ecx
mov eax, dword [ebp - 0x28]
push eax
call fcn.0040ab28
add esp, 8
test al, al
je 0x40b7f7
push 0x28
lea edx, [ebp - 0x6c]
push edx
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.0040aad8
add esp, 0xc
test al, al
je 0x40b7f7
mov edx, dword [ebp - 0x28]
mov eax, dword [0x54f9b4]
call fcn.00424350
mov byte [ebp - 0x29], 1
mov word [ebp - 0x14], 0
jmp 0x40b80a
cmp byte [ebp - 0x29], 0
jne 0x40b81f
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.004e0060
pop ecx
xor eax, eax
mov dword [ebp - 0x28], eax
push 0x54f990
call sub.KERNEL32.DLL_LeaveCriticalSection
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40b9b0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffcc
mov eax, 0x510bac
push ebx
call fcn.004e1410
mov bx, 0xfa3
mov dword [0x54f9d8], 1
mov dword [0x54f9dc], 0x7a120
mov dword [0x54f9d4], 0x40b934
lea eax, [ebp - 0x28]
push eax
push 1
push 0
push 0x510a80
push reloc.WS2_32.DLL_bind
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x40ba37
mov dword [ebp - 0x30], 4
xor edx, edx
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x2c], edx
push ecx
lea ecx, [ebp - 0x2c]
lea eax, [ebp - 0x34]
push ecx
push eax
push 0
push str.Management_Port
mov edx, dword [ebp - 0x28]
push edx
call sub.ADVAPI32.DLL_RegQueryValueExA
test eax, eax
jne 0x40ba2e
mov bx, word [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
push eax
call sub.ADVAPI32.DLL_RegCloseKey
push ebx
push 0x54f9c0
call fcn.0040fc0c
add esp, 8
push 0xa
push 0x54f9b8
call fcn.004123d4
add esp, 8
mov dl, 1
mov eax, dword [0x419298]
call fcn.00404754
mov dword [0x54f9b4], eax
push 0x54f990
call sub.KERNEL32.DLL_InitializeCriticalSection
mov dword [0x54f98c], 1
mov edx, dword [ebp - 0x24]
mov dword fs:[0], edx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40d520
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
xor ecx, ecx
push ebx
push esi
push edi
xor esi, esi
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0xc]
xor ebx, ebx
mov cl, byte [eax + 0x26]
add ecx, 9
mov edi, dword [edx + 0x1c]
shl edi, cl
mov eax, dword [ebp + 0xc]
add eax, 0x27
cmp dword [eax], 0
je 0x40d556
add esi, edi
inc ebx
add eax, 8
cmp ebx, 0x3b
jl 0x40d546
push esi
call fcn.004e0050
pop ecx
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40d56a
xor eax, eax
jmp 0x40d5c9
mov eax, esi
mov edx, dword [ebp + 0x10]
shr eax, 1
xor ebx, ebx
mov dword [edx], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 8], ecx
mov eax, dword [ebp + 0xc]
lea esi, [eax + 0x27]
mov eax, dword [esi]
test eax, eax
je 0x40d5c6
push 0
push 0
mov edx, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [edx + 0x26]
add ecx, 9
shl eax, cl
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.KERNEL32.DLL_SetFilePointer
push 0
lea eax, [ebp - 0xc]
push eax
push edi
mov edx, dword [ebp - 8]
push edx
mov ecx, dword [ebp + 8]
push ecx
call sub.KERNEL32.DLL_ReadFile
test eax, eax
je 0x40d5c6
add dword [ebp - 8], edi
inc ebx
add esi, 8
cmp ebx, 0x3b
jl 0x40d581
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40fb3c
Capabilities:
Initialize winsock library

Disassembly:
add esp, 0xfffffe70
mov ax, 0x202
push esp
push eax
call sub.WS2_32.DLL_WSAStartup
inc eax
jne 0x40fb54
xor eax, eax
jmp 0x40fb59
mov eax, 1
add esp, 0x190
ret

Function at 0x40fc30
Capabilities:
Create tcp socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push 6
push 1
push 2
call sub.WS2_32.DLL_socket
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40fc4b
mov eax, ebx
pop ebx
pop ebp
ret
push 0x10
mov edx, dword [ebp + 8]
push edx
push ebx
call sub.WS2_32.DLL_bind
inc eax
jne 0x40fc63
push ebx
call sub.WS2_32.DLL_closesocket
or ebx, 0xffffffff
mov eax, ebx
pop ebx
pop ebp
ret

Function at 0x40fc68
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push 0x11
push 2
push 2
call sub.WS2_32.DLL_socket
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40fc83
mov eax, ebx
jmp 0x40fcbf
cmp dword [ebp + 0xc], 0
je 0x40fca5
mov dword [ebp - 4], 1
push 4
lea edx, [ebp - 4]
push edx
push 4
push 0xffff
push ebx
call sub.WS2_32.DLL_setsockopt
test eax, eax
push 0x10
mov ecx, dword [ebp + 8]
push ecx
push ebx
call sub.WS2_32.DLL_bind
inc eax
jne 0x40fcbd
push ebx
call sub.WS2_32.DLL_closesocket
or ebx, 0xffffffff
mov eax, ebx
pop ebx
pop ecx
pop ebp
ret

Function at 0x411024
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
xor ebx, ebx
mov esi, dword [ebp + 8]
mov dword [esi], 1
jmp 0x41108a
lea edi, [ebx + ebx*4]
lea edi, [ebx + edi*2]
mov eax, dword [esi + 0xc]
cmp byte [eax + edi*4 + 0x18], 0
je 0x411089
mov edx, dword [esi + 0xc]
test byte [edx + edi*4], 2
je 0x411074
push 8
lea ecx, [ebx + ebx*4]
lea ecx, [ebx + ecx*2]
shl ecx, 2
add ecx, eax
add ecx, 0x20
push ecx
push 0xd
push 0
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx + edi*4 + 0x14]
push eax
call sub.WS2_32.DLL_setsockopt
test eax, eax
mov edx, dword [esi + 0xc]
mov ecx, dword [edx + edi*4 + 0x14]
push ecx
call sub.WS2_32.DLL_closesocket
mov eax, dword [esi + 0xc]
mov byte [eax + edi*4 + 0x18], 0
inc ebx
cmp ebx, dword [esi + 8]
jl 0x411037
cmp dword [ebp + 0xc], 0
je 0x4110b6
xor ebx, ebx
cmp dword [esi + 4], 0
jne 0x4110ad
push 0x7d0
call sub.KERNEL32.DLL_Sleep
inc ebx
cmp ebx, 3
jl 0x411097
cmp ebx, 3
jl 0x4110b6
xor eax, eax
jmp 0x4110bb
mov eax, 1
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x411298
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 4], eax
xor ebx, ebx
jmp 0x411359
push 1
lea eax, [ebx + ebx*4]
lea eax, [ebx + eax*2]
shl eax, 2
add eax, dword [esi + 0xc]
add eax, 4
push eax
call fcn.0040fc68
add esp, 8
lea edi, [ebx + ebx*4]
lea edi, [ebx + edi*2]
mov edx, dword [esi + 0xc]
mov dword [edx + edi*4 + 0x14], eax
lea eax, [ebx + ebx*4]
lea eax, [ebx + eax*2]
mov ecx, dword [esi + 0xc]
cmp dword [ecx + eax*4 + 0x14], 0xffffffff
jne 0x4112f3
call sub.WS2_32.DLL_WSAGetLastError
mov edx, dword [esi + 0xc]
mov dword [edx + edi*4 + 0x1c], eax
jmp 0x411358
push 0x500000
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + edi*4 + 0x14]
push ecx
call fcn.0040fce0
add esp, 8
mov ecx, dword [esi + 0xc]
mov byte [ecx + edi*4 + 0x18], 1
mov eax, dword [esi + 0xc]
test byte [eax + edi*4], 1
je 0x41132b
push 1
mov edx, dword [esi + 0xc]
mov ecx, dword [edx + edi*4 + 0x14]
push ecx
call fcn.0040fcc4
add esp, 8
mov eax, dword [esi + 0xc]
test byte [eax + edi*4], 2
je 0x411358
push 8
lea edx, [ebx + ebx*4]
lea edx, [ebx + edx*2]
shl edx, 2
add edx, eax
add edx, 0x20
push edx
push 0xc
push 0
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx + edi*4 + 0x14]
push eax
call sub.WS2_32.DLL_setsockopt
test eax, eax
inc ebx
cmp ebx, dword [esi + 8]
jl 0x4112ae
push esi
push 0
push 0x4110c0
call fcn.004ebbcc
add esp, 0xc
cmp eax, 0xffffffff
jne 0x411384
push 0
push esi
call fcn.00411024
add esp, 8
jmp 0x41138b
mov dword [ebp - 4], 1
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret

Function at 0x4120f4
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef4
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
cmp dword [eax], 0
je 0x412114
or eax, 0xffffffff
jmp 0x4121d5
mov edx, dword [eax + 0x20]
mov dword [ebp - 8], edx
mov ecx, dword [eax + 0x24]
mov dword [ebp - 4], ecx
xor ecx, ecx
mov dword [ebp - 0x10c], ecx
xor eax, eax
lea edx, [ebp - 0x108]
jmp 0x41213f
mov ecx, dword [ebx + 0x14]
cmp ecx, dword [edx]
jne 0x41213b
jmp 0x412147
inc eax
add edx, 4
cmp eax, dword [ebp - 0x10c]
jb 0x412132
mov edx, dword [ebp - 0x10c]
cmp eax, edx
jne 0x412166
cmp edx, 0x40
jae 0x412166
mov edx, dword [ebx + 0x14]
mov dword [ebp + eax*4 - 0x108], edx
inc dword [ebp - 0x10c]
lea eax, [ebp - 8]
lea ecx, [ebp - 0x10c]
push eax
push 0
push 0
push ecx
push 0
call sub.WS2_32.DLL_select
cmp eax, 0xffffffff
je 0x4121c5
dec eax
jl 0x4121ad
push 0
push esi
mov ecx, dword [ebp + 0xc]
push ecx
mov eax, dword [ebx + 0x14]
push eax
call sub.WS2_32.DLL_recv
cmp eax, 0xffffffff
je 0x4121d5
test eax, eax
jne 0x4121a2
or eax, 0xffffffff
jmp 0x4121d5
cmp esi, eax
je 0x4121d5
add dword [ebp + 0xc], eax
sub esi, eax
jmp 0x4121c5
mov edx, dword [ebx]
cmp dword [edx + 0x28], 0
je 0x412105
push ebx
mov ecx, dword [ebx]
call dword [ecx + 0x28]
pop ecx
jmp 0x412105
cmp eax, 0xffffffff
jne 0x412105
jmp 0x4121d5
inc eax
jne 0x4121dc
xor eax, eax
jmp 0x4121e1
mov eax, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4121e8
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov eax, dword [esi]
cmp dword [eax], 0
je 0x412203
or eax, 0xffffffff
jmp 0x412228
push 0
push ebx
push edi
mov edx, dword [esi + 0x14]
push edx
call sub.WS2_32.DLL_send
cmp eax, 0xffffffff
je 0x412228
test eax, eax
jne 0x41221e
or eax, 0xffffffff
jmp 0x412228
cmp ebx, eax
je 0x412228
add edi, eax
sub ebx, eax
jmp 0x4121f7
inc eax
jne 0x41222f
xor eax, eax
jmp 0x412234
mov eax, 1
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x413204
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
mov esi, 0x54fa6c
push 0xa
push 0x413298
mov eax, dword [0x51fb94]
push eax
call sub.KERNEL32.DLL_FindResourceW
mov ebx, eax
test ebx, ebx
jne 0x413228
call fcn.004460e4
push ebx
mov eax, dword [0x51fb94]
push eax
call sub.KERNEL32.DLL_LoadResource
mov ebx, eax
test ebx, ebx
jne 0x41323f
call fcn.004460e4
push ebx
call sub.KERNEL32.DLL_LockResource
mov dword [esi], eax
cmp dword [esi], 0
jne 0x413251
call fcn.004460e4
mov eax, dword [esi]
mov edx, dword [esi]
mov ecx, edx
add ecx, dword [eax]
mov dword [0x54fa70], ecx
mov ecx, edx
add ecx, dword [eax + 4]
mov dword [0x54fa74], ecx
mov ecx, edx
add ecx, dword [eax + 8]
mov dword [0x54fa78], ecx
mov ecx, edx
add ecx, dword [eax + 0xc]
mov dword [0x54fa7c], ecx
mov ecx, edx
add ecx, dword [eax + 0x10]
mov dword [0x54fa80], ecx
add edx, dword [eax + 0x14]
mov dword [0x54fa84], edx
pop esi
pop ebx
ret

Function at 0x42f60c
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push ebx
mov ebx, eax
xor eax, eax
push ebp
push 0x42f6aa
push dword fs:[eax]
mov dword fs:[eax], esp
or dl, byte [ebx + 0xc]
je 0x42f66e
cmp byte [ebx + 0x10], 0
jne 0x42f66e
cmp byte [ebx + 0x3c], 0
jne 0x42f66e
mov byte [ebx + 0xe], 0
mov byte [ebx + 0xc], 0
mov eax, dword [ebx + 4]
push eax
call sub.KERNEL32.DLL_ResumeThread
cmp eax, 1
je 0x42f68f
lea edx, [ebp - 4]
mov eax, dword [0x51f670]
call fcn.0045bac8
mov ecx, dword [ebp - 4]
mov dl, 1
mov eax, dword [0x41fed8]
call fcn.00443af4
call fcn.004579a0
jmp 0x42f68f
lea edx, [ebp - 8]
mov eax, dword [0x51f670]
call fcn.0045bac8
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [0x41fed8]
call fcn.00443af4
call fcn.004579a0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x42f6b1
lea eax, [ebp - 8]
mov edx, 2
call fcn.00458888
ret

Function at 0x42ff28
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0xe]
mov byte [ebp - 5], al
xor eax, eax
push ebp
push 0x42ff76
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov byte [eax + 0xe], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
push eax
call sub.KERNEL32.DLL_SuspendThread
test eax, eax
setge dl
mov eax, dword [ebp - 4]
call fcn.0042f590
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x42ff8f
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret