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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
test ebx, ebx
je 0x5739cc
cmp byte [ebx + 0x5c], 0x77
je 0x5739e0
lea esp, [ebp - 0xc]
mov eax, 0xfffffffe
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebx], edi
mov ecx, esi
mov dword [ebx + 4], esi
test esi, esi
je 0x573a5d
mov edx, dword [ebx + 0x10]
mov esi, esi
test edx, edx
jne 0x573a24
mov eax, dword [ebx + 0x48]
mov edx, dword [ebx + 0x40]
mov dword [ebx + 0xc], eax
push edx
push 0x4000
push 1
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
cmp eax, 0x4000
jne 0x573a7b
mov dword [ebx + 0x10], 0x4000
mov ecx, dword [ebx + 4]
mov edx, 0x4000
mov eax, dword [ebx + 0x64]
add eax, ecx
mov dword [ebx + 0x64], eax
mov eax, dword [ebx + 0x68]
add eax, edx
mov dword [ebx + 0x68], eax
push ecx
push ecx
push 0
push ebx
call fcn.005745a0
mov edx, dword [ebx + 0x64]
mov ecx, dword [ebx + 4]
sub edx, ecx
add esp, 0x10
mov dword [ebx + 0x64], edx
mov edx, dword [ebx + 0x10]
sub dword [ebx + 0x68], edx
mov dword [ebx + 0x38], eax
test eax, eax
jne 0x573a5d
test ecx, ecx
jne 0x5739f0
push eax
push esi
push edi
mov edi, dword [ebx + 0x4c]
push edi
call fcn.00576690
mov ecx, dword [ebx + 4]
mov dword [ebx + 0x4c], eax
mov eax, esi
lea esp, [ebp - 0xc]
sub eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebx + 0x38], 0xffffffff
jmp 0x573a5d

Function at 0x573b60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
xor edi, edi
mov ebx, eax
mov dword [ebp - 0x10], edx
test eax, eax
je 0x573b7a
cmp byte [eax + 0x5c], 0x77
je 0x573b87
mov eax, 0xfffffffe
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [eax + 4], 0
mov edx, dword [eax + 0x10]
mov eax, 0x4000
mov esi, eax
sub esi, edx
jne 0x573c10
test edi, edi
jne 0x573c39
mov eax, dword [ebx + 0x10]
mov edx, dword [ebx + 0x68]
add edx, eax
mov edi, dword [ebp - 0x10]
mov dword [ebx + 0x68], edx
push eax
push eax
push edi
push ebx
call fcn.005745a0
mov ecx, dword [ebx + 0x68]
mov edx, dword [ebx + 0x10]
add esp, 0x10
sub ecx, edx
test esi, esi
mov dword [ebx + 0x68], ecx
jne 0x573bd2
cmp eax, 0xfffffffb
je 0x573bf1
xor edi, edi
mov dword [ebx + 0x38], eax
test edx, edx
jne 0x573c00
mov eax, dword [ebx + 0x38]
cmp eax, 1
je 0x573c03
cmp eax, 1
jbe 0x573b91
cmp eax, 1
jne 0x573b7f
xor eax, eax
jmp 0x573b7f
xor edi, edi
mov dword [ebx + 0x38], 0
test edx, edx
je 0x573bdb
mov esi, esi
mov eax, dword [ebx + 0x38]
mov edi, 1
jmp 0x573be3
mov eax, dword [ebx + 0x40]
mov ecx, dword [ebx + 0x48]
push eax
push esi
push 1
push ecx
call sub.msvcrt.dll_fwrite
add esp, 0x10
cmp eax, esi
jne 0x573c3e
mov eax, dword [ebx + 0x48]
mov dword [ebx + 0x10], 0x4000
mov dword [ebx + 0xc], eax
jmp 0x573b9c
mov eax, dword [ebx + 0x38]
jmp 0x573be8
or eax, 0xffffffff
mov dword [ebx + 0x38], 0xffffffff
jmp 0x573b7f
Function at 0x57e4e0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
test esi, esi
jne 0x57e4f9
mov esi, dword [edi + 0x18]
push eax
push eax
push esi
push edi
call fcn.0057e2b0
mov edx, dword [edi + 0x14]
xor ecx, ecx
add esp, 0x10
jmp 0x57e536
movsx eax, word [edx + 2]
sub eax, 0xffffff80
test eax, 0xffffff00
je 0x57e529
sar eax, 0x1f
xor eax, 0xffffffff
and eax, 0xff
mov byte [ebx], al
inc ecx
mov dword [edx], 0
inc ebx
add edx, 4
cmp ecx, esi
jl 0x57e510
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x57f7f0
Capabilities:
Set global application hook

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0xa8
lea ebx, [ebp - 0xa8]
push 0x94
push 0x6a9bf0
push ebx
call fcn.0058e948
mov eax, dword [0x78e670]
add esp, 0x10
test eax, eax
je 0x57f821
mov ebx, dword [ebp - 4]
leave
ret
sub esp, 0xc
push ebx
call sub.kernel32.dll_GetVersionExA
add esp, 0xc
test eax, eax
je 0x57f83a
cmp dword [ebp - 0x98], 2
je 0x57f885
mov dword [0x78e6a0], 1
call sub.kernel32.dll_GetCurrentThreadId
mov dword [0x78e650], eax
push eax
push 0
push 0x57f3e0
push 3
call sub.USER32.dll_SetWindowsHookExA
sub esp, 0xc
mov dword [0x78e640], eax
push 1
call sub.WINMM.DLL_timeBeginPeriod
push 0x57f1c0
call fcn.00401335
mov dword [0x78e670], 1
mov ebx, dword [ebp - 4]
leave
ret
mov dword [0x78e630], 1
jmp 0x57f83a
Function at 0x57f8a0
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x20
lea esi, [ebp - 0x28]
sub esp, 0xc
push 1
push 0
push 0
push 0
push esi
call sub.USER32.dll_PeekMessageA
add esp, 0xc
test eax, eax
je 0x57f9de
mov eax, dword [ebp - 0x24]
cmp eax, 0x100
jb 0x57f980
cmp eax, 0x101
jbe 0x57f8ea
sub eax, 0x104
cmp eax, 1
ja 0x57f980
mov eax, dword [ebp - 0x20]
cmp eax, 0x10
jb 0x57f980
cmp eax, 0x12
jbe 0x57f903
sub eax, 0x5b
cmp eax, 1
ja 0x57f980
sub esp, 0xc
mov dword [0x78e660], 0
push 0x10
call sub.USER32.dll_GetKeyState
add esp, 0xc
test ax, ax
js 0x57fa1e
sub esp, 0xc
push 0x11
call sub.USER32.dll_GetKeyState
add esp, 0xc
test ax, ax
js 0x57fa41
sub esp, 0xc
push 0x12
call sub.USER32.dll_GetKeyState
add esp, 0xc
test ax, ax
js 0x57fa64
sub esp, 0xc
push 0x5b
call sub.USER32.dll_GetKeyState
add esp, 0xc
test ax, ax
js 0x57fa0c
sub esp, 0xc
push 0x5c
call sub.USER32.dll_GetKeyState
add esp, 0xc
test ax, ax
js 0x57fa0c
nop
lea esi, [esi]
mov eax, dword [ebp - 0x28]
call fcn.0057f1f0
test eax, eax
je 0x57f9b0
sub esp, 0xc
mov eax, dword [ebp - 0x28]
push eax
jmp 0x57f9a2
call fcn.0057f1f0
test eax, eax
je 0x57f9e5
sub esp, 0xc
push ebx
call sub.USER32.dll_GetParent
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x57f995
sub esp, 0xc
push esi
call sub.USER32.dll_TranslateMessage
push esi
call sub.USER32.dll_DispatchMessageA
add esp, 0xc
sub esp, 0xc
push 1
push 0
push 0
push 0
push esi
call sub.USER32.dll_PeekMessageA
add esp, 0xc
test eax, eax
jne 0x57f8c7
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
push eax
push eax
push esi
push ebx
call sub.USER32.dll_IsDialogMessage
pop edx
test eax, eax
pop ecx
jne 0x57f8ab
sub esp, 0xc
push esi
call sub.USER32.dll_TranslateMessage
push esi
call sub.USER32.dll_DispatchMessageA
add esp, 0xc
jmp 0x57f9c2
mov eax, dword [0x78e660]
or eax, 8
mov dword [0x78e660], eax
jmp 0x57f980
mov eax, dword [0x78e660]
sub esp, 0xc
or eax, 1
mov dword [0x78e660], eax
push 0x11
call sub.USER32.dll_GetKeyState
add esp, 0xc
test ax, ax
jns 0x57f939
mov eax, dword [0x78e660]
sub esp, 0xc
or eax, 2
mov dword [0x78e660], eax
push 0x12
call sub.USER32.dll_GetKeyState
add esp, 0xc
test ax, ax
jns 0x57f94f
mov eax, dword [0x78e660]
or eax, 4
mov dword [0x78e660], eax
jmp 0x57f94f

Function at 0x57fa80
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push 0xff
push 0xffffffffffffffff
push 0
push 0
push 0
call sub.USER32.dll_MsgWaitForMultipleObjects
add esp, 0xc
leave
jmp fcn.0057f8a0

Function at 0x5800e0
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov edx, dword [0x78e630]
mov eax, dword [ebp + 8]
test edx, edx
je 0x580120
push ecx
push ecx
push 0xa
push 0
push 0
push edx
push edx
push eax
call fcn.00584770
add esp, 0xc
push eax
push 0
push 0
call sub.SHELL32.dll_ShellExecuteW
cmp eax, 0x20
pop edx
setg al
and eax, 0xff
pop ecx
leave
ret
push ecx
push ecx
push 0xa
push 0
push 0
push edx
push edx
push eax
call fcn.00584750
add esp, 0xc
push eax
push 0
push 0
call sub.SHELL32.dll_ShellExecuteA
cmp eax, 0x20
pop edx
setg al
and eax, 0xff
pop ecx
leave
ret
Function at 0x580570
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov edx, dword [0x79929c]
mov eax, dword [ebp + 8]
test edx, edx
je 0x5805a0
sub esp, 0xc
push eax
call fcn.00584770
mov dword [esp], eax
call sub.msvcrt.dll__wgetenv
add esp, 0x10
mov dword [ebp + 8], eax
leave
jmp fcn.00583660
sub esp, 0xc
push eax
call fcn.00584750
mov dword [esp], eax
call sub.msvcrt.dll_getenv
add esp, 0x10
mov dword [ebp + 8], eax
leave
jmp fcn.005835d0

Function at 0x580760
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov edx, dword [0x79929c]
mov eax, dword [ebp + 8]
test edx, edx
je 0x580787
sub esp, 0xc
push eax
call fcn.00584770
add esp, 0x10
mov dword [ebp + 8], eax
leave
jmp 0x58ec50
sub esp, 0xc
push eax
call fcn.00584750
add esp, 0x10
mov dword [ebp + 8], eax
leave
jmp 0x58ec48
jmp dword [sym.imp.msvcrt.dll__mkdir]
jmp dword [sym.imp.msvcrt.dll__wmkdir]

Function at 0x5807a0
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov edx, dword [0x79929c]
mov eax, dword [ebp + 8]
test edx, edx
je 0x5807c7
sub esp, 0xc
push eax
call fcn.00584770
add esp, 0x10
mov dword [ebp + 8], eax
leave
jmp 0x58ec40
sub esp, 0xc
push eax
call fcn.00584750
add esp, 0x10
mov dword [ebp + 8], eax
leave
jmp 0x58ec38
jmp dword [sym.imp.msvcrt.dll__rmdir]
jmp dword [sym.imp.msvcrt.dll__wrmdir]

Function at 0x5807e0
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
push ebx
push ecx
mov edx, dword [0x79929c]
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
test edx, edx
je 0x580818
sub esp, 0xc
push eax
call fcn.00584770
mov dword [ebp + 0xc], eax
mov dword [esp], ebx
call fcn.00584770
add esp, 0x10
mov ebx, dword [ebp - 4]
mov dword [ebp + 8], eax
leave
jmp 0x58ec30
sub esp, 0xc
push eax
call fcn.00584750
mov dword [ebp + 0xc], eax
mov dword [esp], ebx
call fcn.00584750
add esp, 0x10
mov ebx, dword [ebp - 4]
mov dword [ebp + 8], eax
leave
jmp sub.msvcrt.dll_rename
jmp dword [sym.imp.msvcrt.dll__wrename]

Function at 0x580840
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0xc
mov ebx, dword [ebp + 8]
push 0x1b6
push ebx
call fcn.00580710
mov eax, dword [0x79929c]
add esp, 0x10
test eax, eax
je 0x580880
sub esp, 0xc
push ebx
call fcn.00584770
add esp, 0x10
mov ebx, dword [ebp - 4]
mov dword [ebp + 8], eax
leave
jmp 0x58ec28
sub esp, 0xc
push ebx
call fcn.00584750
add esp, 0x10
mov ebx, dword [ebp - 4]
mov dword [ebp + 8], eax
leave
jmp sub.msvcrt.dll_remove
jmp dword [sym.imp.msvcrt.dll__wremove]
Function at 0x5808a0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov edx, dword [0x79929c]
mov eax, dword [ebp + 8]
test edx, edx
je 0x5808c7
sub esp, 0xc
push eax
call fcn.00584770
add esp, 0x10
mov dword [ebp + 8], eax
leave
jmp 0x58dd8c
sub esp, 0xc
push eax
call fcn.00584750
add esp, 0x10
mov dword [ebp + 8], eax
leave
jmp fcn.0058d9c8
push edi
push esi
push ebx
sub esp, 0x330
mov ebx, dword [esp + 0x340]
call sub.msvcrt.dll__errno
test ebx, ebx
mov dword [eax], 0
jne 0x58ddbb
call sub.msvcrt.dll__errno
mov dword [eax], 0xe
jmp 0x58df7e
cmp word [ebx], 0
je 0x58de45
mov eax, dword [sym.imp.msvcrt.dll__osver]
mov eax, dword [eax]
test ah, 0x80
je 0x58de21
lea esi, [esp + 0x22c]
mov dword [esp + 0x10], esi
mov dword [esp + 8], ebx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x104
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.kernel32.dll_WideCharToMultiByte
sub esp, 0x20
mov dword [esp], esi
call sub.kernel32.dll_GetFileAttributesA
jmp 0x58de29
mov dword [esp], ebx
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
push edx
jne 0x58de41
call sub.msvcrt.dll__errno
mov dword [eax], 2
xor ebx, ebx
jmp 0x58df7e
test al, 0x10
jne 0x58de52
call sub.msvcrt.dll__errno
mov dword [eax], 0x14
jmp 0x58de3a
lea edi, [esp + 0x24]
mov dword [esp + 4], ebx
mov dword [esp + 8], 0x104
mov dword [esp], edi
call sub.msvcrt.dll__wfullpath
mov dword [esp], edi
call sub.msvcrt.dll_wcslen
mov dword [esp], 0x788280
mov esi, eax
call sub.msvcrt.dll_wcslen
mov dword [esp], 0x788284
mov ebx, eax
call sub.msvcrt.dll_wcslen
lea edx, [esi + ebx + 0x21d]
add eax, edx
add eax, eax
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov ebx, eax
jne 0x58deb7
call sub.msvcrt.dll__errno
mov dword [eax], 0xc
jmp 0x58df7e
lea esi, [eax + 0x434]
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.msvcrt.dll_wcscpy
cmp word [ebx + 0x434], 0
je 0x58df2d
mov dword [esp + 4], 0x2f
mov dword [esp], esi
call sub.msvcrt.dll_wcsrchr
mov dword [esp], esi
mov edi, eax
call sub.msvcrt.dll_wcslen
lea eax, [ebx + eax*2 + 0x432]
cmp edi, eax
je 0x58df2d
mov dword [esp + 4], 0x5c
mov dword [esp], esi
call sub.msvcrt.dll_wcsrchr
mov dword [esp], esi
mov edi, eax
call sub.msvcrt.dll_wcslen
lea eax, [ebx + eax*2 + 0x432]
cmp edi, eax
je 0x58df2d
mov dword [esp + 4], 0x788280
mov dword [esp], esi
call sub.msvcrt.dll_wcscat
mov dword [esp + 4], 0x788284
mov dword [esp], esi
call sub.msvcrt.dll_wcscat
lea edx, [ebx + 0x224]
mov ecx, 0x41
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [ebx + 0x42c], 0xffffffff
mov dword [ebx + 0x430], 0
mov dword [ebx + 0x21c], 0
mov word [ebx + 0x220], 0
mov word [ebx + 0x222], 0
add esp, 0x330
mov eax, ebx
pop ebx
pop esi
pop edi
ret
Function at 0x580c80
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
push eax
call fcn.00584750
mov dword [esp], eax
call sub.ws2_32.dll_gethostbyname
mov ecx, eax
add esp, 0xc
xor eax, eax
test ecx, ecx
je 0x580cb7
movsx edx, word [ecx + 8]
mov eax, dword [ebp + 0xc]
mov dword [eax], edx
mov eax, dword [ebp + 0x10]
movsx edx, word [ecx + 0xa]
mov dword [eax], edx
mov eax, dword [ecx + 0xc]
leave
ret

Function at 0x580cc0
Capabilities:
Connect socket

Disassembly:
push ebp
or eax, 0xffffffff
mov ebp, esp
push edi
sub esp, 0x14
cmp dword [ebp + 0x10], 2
jne 0x580d1d
cld
xor eax, eax
lea edi, [ebp - 0x18]
mov ecx, 4
sub esp, 0xc
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x18]
mov word [ebp - 0x18], 2
and eax, 0xffff
push eax
call sub.ws2_32.dll_htons
mov ecx, dword [ebp + 0x14]
pop edi
mov word [ebp - 0x16], ax
pop edx
lea eax, [ebp - 0x14]
mov edx, dword [ebp + 0xc]
push ecx
push edx
push eax
call fcn.0058e948
add esp, 0xc
lea eax, [ebp - 0x18]
push 0x10
push eax
mov eax, dword [ebp + 8]
push eax
call sub.ws2_32.dll_connect
mov edi, dword [ebp - 4]
leave
ret
Function at 0x581260
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a0
lea eax, [ebp - 0x198]
push eax
push 0x101
call sub.ws2_32.dll_WSAStartup
push eax
push 0x581250
call fcn.00401335
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [0x79925c], eax
lea edx, [eax + 0x20]
add eax, 0x40
mov dword [0x79927c], edx
mov dword [0x79926c], eax
leave
ret
Function at 0x585ed0
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x10
push 0x7992ac
call sub.kernel32.dll_InitializeCriticalSection
add esp, 0xc
call sub.kernel32.dll_TlsAlloc
sub esp, 0xc
mov dword [0x798a70], eax
push 0xb8
call sub.msvcrt.dll_malloc
add esp, 0xc
mov ebx, eax
mov dword [eax + 4], 0
lea eax, [eax + 8]
push 0x80
push 0
push eax
call sub.msvcrt.dll_memset
mov eax, dword [0x79928c]
mov dword [ebx + 0x88], 0
mov dword [ebx + 0x8c], eax
call sub.kernel32.dll_GetCurrentThreadId
add esp, 0xc
mov dword [ebx + 0xb4], eax
lea eax, [ebx + 0xb0]
push 2
push 0
push 0
push eax
sub esp, 0xc
call sub.kernel32.dll_GetCurrentProcess
add esp, 0xc
push eax
push eax
push eax
call sub.kernel32.dll_GetCurrentThread
pop edx
pop ecx
push eax
push ecx
call sub.kernel32.dll_GetCurrentProcess
mov dword [esp], eax
call sub.kernel32.dll_DuplicateHandle
pop edx
test eax, eax
je 0x585f96
push eax
push eax
mov eax, dword [0x798a70]
push ebx
push eax
call sub.kernel32.dll_TlsSetValue
mov eax, dword [0x798a40]
mov dword [ebx], eax
mov dword [0x798a40], ebx
mov dword [0x798a60], ebx
mov ebx, dword [ebp - 4]
leave
ret
sub esp, 0xc
push 0xffffffffffffffff
call sub.msvcrt.dll_exit
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2e8
lea ebx, [ebp - 0x2e8]
push 0xb8
call sub.msvcrt.dll_malloc
mov edi, eax
add esp, 0xc
mov eax, dword [ebp + 8]
mov dword [edi + 4], eax
lea eax, [edi + 8]
push 0x80
push 0
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x88], 0
mov dword [edi + 8], eax
pop eax
lea eax, [edi + 0xb4]
pop edx
push eax
push 4
push edi
push 0x585e00
push 0
push 0
call sub.kernel32.dll_CreateThread
mov dword [edi + 0xb0], eax
mov dword [esp], 0x2cc
push 0x6abfb0
push ebx
call fcn.0058e948
pop esi
pop eax
push ebx
mov ecx, dword [edi + 0xb0]
push ecx
call sub.kernel32.dll_GetThreadContext
mov eax, dword [ebp - 0x224]
mov dword [edi + 0x8c], eax
pop eax
mov eax, dword [0x7992cc]
pop edx
test eax, eax
jne 0x5860b0
mov ebx, dword [0x798a50]
mov esi, 0x798a50
test ebx, ebx
je 0x586062
mov esi, esi
mov eax, dword [ebx + 0x88]
test eax, eax
jne 0x586090
mov esi, ebx
mov ebx, dword [esi]
test ebx, ebx
jne 0x586050
mov eax, dword [0x798a40]
mov dword [edi], eax
mov eax, dword [0x7992cc]
mov dword [0x798a40], edi
test eax, eax
jne 0x5860c5
mov dword [0x7992cc], 1
mov eax, edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx]
sub esp, 0xc
mov dword [esi], eax
mov eax, dword [ebx + 0xb0]
push eax
call sub.kernel32.dll_CloseHandle
push ebx
call fcn.0058e9d0
add esp, 0x10
mov ebx, dword [esi]
jmp 0x58605e
sub esp, 0xc
push 0x7992ac
call sub.kernel32.dll_EnterCriticalSection
add esp, 0xc
jmp 0x58603f
sub esp, 0xc
push 0x7992ac
call sub.kernel32.dll_LeaveCriticalSection
mov dword [0x7992cc], 1
mov eax, edi
add esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x585fa0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x10
push 0x7992ac
call sub.kernel32.dll_InitializeCriticalSection
add esp, 0xc
call sub.kernel32.dll_TlsAlloc
sub esp, 0xc
mov dword [0x798a70], eax
push 0xb8
call sub.msvcrt.dll_malloc
add esp, 0xc
mov ebx, eax
mov dword [eax + 4], 0
lea eax, [eax + 8]
push 0x80
push 0
push eax
call sub.msvcrt.dll_memset
mov eax, dword [0x79928c]
mov dword [ebx + 0x88], 0
mov dword [ebx + 0x8c], eax
call sub.kernel32.dll_GetCurrentThreadId
add esp, 0xc
mov dword [ebx + 0xb4], eax
lea eax, [ebx + 0xb0]
push 2
push 0
push 0
push eax
sub esp, 0xc
call sub.kernel32.dll_GetCurrentProcess
add esp, 0xc
push eax
push eax
push eax
call sub.kernel32.dll_GetCurrentThread
pop edx
pop ecx
push eax
push ecx
call sub.kernel32.dll_GetCurrentProcess
mov dword [esp], eax
call sub.kernel32.dll_DuplicateHandle
pop edx
test eax, eax
je 0x585f96
push eax
push eax
mov eax, dword [0x798a70]
push ebx
push eax
call sub.kernel32.dll_TlsSetValue
mov eax, dword [0x798a40]
mov dword [ebx], eax
mov dword [0x798a40], ebx
mov dword [0x798a60], ebx
mov ebx, dword [ebp - 4]
leave
ret
sub esp, 0xc
push 0xffffffffffffffff
call sub.msvcrt.dll_exit
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2e8
lea ebx, [ebp - 0x2e8]
push 0xb8
call sub.msvcrt.dll_malloc
mov edi, eax
add esp, 0xc
mov eax, dword [ebp + 8]
mov dword [edi + 4], eax
lea eax, [edi + 8]
push 0x80
push 0
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x88], 0
mov dword [edi + 8], eax
pop eax
lea eax, [edi + 0xb4]
pop edx
push eax
push 4
push edi
push 0x585e00
push 0
push 0
call sub.kernel32.dll_CreateThread
mov dword [edi + 0xb0], eax
mov dword [esp], 0x2cc
push 0x6abfb0
push ebx
call fcn.0058e948
pop esi
pop eax
push ebx
mov ecx, dword [edi + 0xb0]
push ecx
call sub.kernel32.dll_GetThreadContext
mov eax, dword [ebp - 0x224]
mov dword [edi + 0x8c], eax
pop eax
mov eax, dword [0x7992cc]
pop edx
test eax, eax
jne 0x5860b0
mov ebx, dword [0x798a50]
mov esi, 0x798a50
test ebx, ebx
je 0x586062
mov esi, esi
mov eax, dword [ebx + 0x88]
test eax, eax
jne 0x586090
mov esi, ebx
mov ebx, dword [esi]
test ebx, ebx
jne 0x586050
mov eax, dword [0x798a40]
mov dword [edi], eax
mov eax, dword [0x7992cc]
mov dword [0x798a40], edi
test eax, eax
jne 0x5860c5
mov dword [0x7992cc], 1
mov eax, edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx]
sub esp, 0xc
mov dword [esi], eax
mov eax, dword [ebx + 0xb0]
push eax
call sub.kernel32.dll_CloseHandle
push ebx
call fcn.0058e9d0
add esp, 0x10
mov ebx, dword [esi]
jmp 0x58605e
sub esp, 0xc
push 0x7992ac
call sub.kernel32.dll_EnterCriticalSection
add esp, 0xc
jmp 0x58603f
sub esp, 0xc
push 0x7992ac
call sub.kernel32.dll_LeaveCriticalSection
mov dword [0x7992cc], 1
mov eax, edi
add esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x58700c
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 8]
add eax, dword [edx + 0x3c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
add eax, 0x78
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
add eax, dword [edx]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
add eax, dword [edx + 0x24]
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
add eax, dword [edx + 0x20]
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
add eax, dword [edx + 0x1c]
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x18]
cmp eax, dword [ebp - 4]
jbe 0x5870c2
sub esp, 8
push dword [ebp + 0xc]
mov eax, dword [ebp - 4]
lea ecx, [eax*4]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
add eax, dword [ecx + edx]
push eax
call sub.kernel32.dll_lstrcmp
add esp, 8
test eax, eax
jne 0x5870bb
mov eax, dword [ebp - 4]
lea edx, [eax + eax]
mov eax, dword [ebp - 0x18]
mov ax, word [edx + eax]
and eax, 0xffff
lea ecx, [eax*4]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp + 8]
add eax, dword [ecx + edx]
mov dword [ebp - 0x24], eax
jmp 0x5870c9
lea eax, [ebp - 4]
inc dword [eax]
jmp 0x587063
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x24]
leave
ret
Function at 0x58e45b
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, ecx
push edi
push esi
mov esi, edx
push ebx
mov ebx, eax
sub esp, 0x3c
lea eax, [esp + 0x10]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.kernel32.dll_VirtualQuery
sub esp, 0xc
test eax, eax
jne 0x58e49f
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.0058e420
mov eax, dword [esp + 0x24]
cmp eax, 4
je 0x58e4d4
cmp eax, 0x40
je 0x58e4d4
lea eax, [esp + 0x2c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x10]
mov dword [esp], eax
call sub.kernel32.dll_VirtualProtect
sub esp, 0x10
mov edi, ebx
mov ecx, ebp
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x24]
cmp eax, 4
je 0x58e50f
cmp eax, 0x40
je 0x58e50f
lea eax, [esp + 0x2c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x10]
mov dword [esp], eax
call sub.kernel32.dll_VirtualProtect
sub esp, 0x10
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x58e6f0
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x798b9c
call sub.kernel32.dll_EnterCriticalSection
mov ebx, dword [0x798bb4]
push ecx
jmp 0x58e72f
mov eax, dword [ebx]
mov dword [esp], eax
call sub.kernel32.dll_TlsGetValue
push edx
mov esi, eax
call sub.kernel32.dll_GetLastError
test eax, eax
jne 0x58e72c
test esi, esi
je 0x58e72c
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x58e70a
mov dword [esp], 0x798b9c
call sub.kernel32.dll_LeaveCriticalSection
push eax
add esp, 0x14
pop ebx
pop esi
ret