joyce8/EMBER2024-capa huggingface dataset:
Function at 0x506b20
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x506b2b
xor eax, eax
ret
mov eax, dword [esp + 4]
push ebx
push esi
mov esi, dword [esp + 0x14]
cmp esi, 8
not eax
jb 0x506c2e
push edi
mov edi, esi
shr edi, 3
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [edx*4 + 0x1212fcc]
sub esi, 8
xor eax, ebx
inc ecx
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x1212fcc]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x1212fcc]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x1212fcc]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x1212fcc]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [edx*4 + 0x1212fcc]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [eax*4 + 0x1212fcc]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x1212fcc]
xor eax, edx
inc ecx
dec edi
jne 0x506b46
pop edi
test esi, esi
je 0x506c50
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [edx*4 + 0x1212fcc]
xor eax, edx
inc ecx
dec esi
jne 0x506c32
pop esi
pop ebx
not eax
ret

Function at 0x5075d0
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 0x14]
push ebp
mov ebp, dword [esp + 0x10]
mov cl, byte [ebx]
mov eax, ebp
imul eax, dword [esp + 0x14]
test cl, cl
je 0x507611
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0xc]
push 0
push ecx
push eax
mov eax, dword [ebx + 4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x507606
mov byte [ebx + 8], 1
mov eax, dword [esp + 0xc]
xor edx, edx
div ebp
pop ebp
pop ebx
ret
mov edx, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x14]
push esi
push edi
lea esi, [edx + eax]
cmp esi, ecx
jbe 0x507624
sub ecx, edx
mov eax, ecx
mov esi, dword [ebx + 0x10]
mov edi, dword [esp + 0x14]
mov ecx, eax
add esi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
xor edx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x18]
pop edi
add ecx, eax
pop esi
div ebp
mov dword [ebx + 0x18], ecx
pop ebp
pop ebx
ret
Function at 0x50b440
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0xa0
push ebx
push ebp
mov ebp, dword [esp + 0xac]
push esi
push edi
push ebp
call sub.RASAPI32.dll_RasHangUpA
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x28
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], 0xa0
call esi
mov edi, eax
call esi
sub eax, edi
cmp eax, 0xbb8
jae 0x50b4a6
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x10]
push eax
push ebp
call sub.RASAPI32.dll_RasGetConnectStatusA
cmp eax, 6
je 0x50b4a6
push 0
call ebx
call esi
sub eax, edi
cmp eax, 0xbb8
jb 0x50b487
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret

Function at 0x50bc30
Capabilities:
Create http request

Disassembly:
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x50bc68
mov edx, dword [esi + 4]
xor eax, eax
push 0
push 0
mov ecx, dword [edx - 8]
test ecx, ecx
setne al
mov ecx, eax
neg ecx
sbb ecx, ecx
and ecx, edx
neg eax
sbb eax, eax
push ecx
and eax, 2
inc eax
push eax
push str.Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.0_
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esi], eax
mov ecx, dword [esi]
xor eax, eax
test ecx, ecx
setne al
pop esi
ret
Function at 0x50c880
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, ecx
call fcn.0050c9d0
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [esi], eax
cmp eax, 0xffffffff
pop esi
jne 0x50c8a0
xor eax, eax
pop ecx
ret
lea ecx, [esp]
push 4
push ecx
push 0x1001
push 0xffff
push eax
mov dword [esp + 0x14], 0
call sub.WS2_32.dll_setsockopt
mov eax, 1
pop ecx
ret

Function at 0x50c881
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, ecx
call fcn.0050c9d0
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [esi], eax
cmp eax, 0xffffffff
pop esi
jne 0x50c8a0
xor eax, eax
pop ecx
ret
lea ecx, [esp]
push 4
push ecx
push 0x1001
push 0xffff
push eax
mov dword [esp + 0x14], 0
call sub.WS2_32.dll_setsockopt
mov eax, 1
pop ecx
ret

Function at 0x50c8d0
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x10
xor eax, eax
push esi
push edi
mov dword [esp + 8], eax
mov edi, ecx
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x10], eax
push ecx
mov dword [esp + 0x18], eax
mov word [esp + 0xc], 2
call sub.WS2_32.dll_htons
mov esi, dword [esp + 0x1c]
mov word [esp + 0xa], ax
push esi
call sub.WS2_32.dll_inet_addr
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
jne 0x50c927
push esi
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x50c93d
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [esp + 0xc], ecx
lea edx, [esp + 8]
push 0x10
push edx
mov ecx, edi
call fcn.0050c960
pop edi
pop esi
add esp, 0x10
ret 8
push 0x2726
call sub.WS2_32.dll_WSASetLastError
pop edi
xor eax, eax
pop esi
add esp, 0x10
ret 8

Function at 0x50c960
Capabilities:
Connect socket

Disassembly:
mov eax, dword [esp + 8]
mov edx, dword [esp + 4]
push eax
mov eax, dword [ecx]
push edx
push eax
call sub.WS2_32.dll_connect
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
ret 8

Function at 0x50c9f0
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [ecx]
lea ecx, [esp]
push ecx
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x50ca39
xor eax, eax
add esp, 0x10c
ret 4
mov edx, dword [esp + 0x110]
xor ecx, ecx
test eax, eax
setne cl
mov dword [edx], ecx
mov eax, 1
add esp, 0x10c
ret 4
Function at 0x50ceb0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x56c4f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.0050ca60
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.0050cae0
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.0050cae0
lea ecx, [esi + 0xc]
call fcn.00558644
lea ecx, [esi + 0x10]
call fcn.00558644
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.0050f310
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.0050f310
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.0050f310
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.005586b9
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.005586b9
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret

Function at 0x50db58
Capabilities:
Get hostname

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x56c718
push eax
mov dword fs:[0], esp
sub esp, 0x64
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
je 0x50db68
call fcn.0050e080
mov edi, dword [esp + 0x7c]
test edi, edi
je 0x50dc4b
cmp byte [edi], 0
je 0x50dc4b
mov eax, dword [esp + 0x8c]
test eax, eax
jg 0x50db8d
mov eax, 0x7d0
mov ecx, esi
mov dword [esi + 8], eax
call fcn.0050c880
test eax, eax
jne 0x50dbad
push 0x1319b4c
lea ecx, [esi + 0x38]
call fcn.005587f6
jmp 0x50dc4b
mov eax, dword [esp + 0x80]
mov ecx, esi
push eax
push edi
call fcn.0050c8d0
test eax, eax
jne 0x50dbdc
mov ecx, esi
call fcn.0050c9d0
push edi
add esi, 0x38
push 0x1319b28
push esi
call fcn.005558b1
add esp, 0xc
jmp 0x50dc4b
push 0xdc
mov ecx, esi
mov dword [esi + 4], 1
call fcn.0050e900
test eax, eax
je 0x50dc44
lea ecx, [esp + 8]
push 0x64
push ecx
call sub.WS2_32.dll_gethostname
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x84]
lea edx, [esp + 0x8c]
mov dword [esp + 0x8c], 1
push edx
push eax
lea edx, [esp + 0x10]
push ecx
push edx
mov ecx, esi
call fcn.0050dd20
test eax, eax
jne 0x50dc60
push edi
lea eax, [esi + 0x38]
push 0x1319b04
push eax
call fcn.005558b1
add esp, 0xc
mov ecx, esi
call fcn.0050e080
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
add esp, 0x70
ret 0x14
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x50dd08
mov ecx, dword [0x131f7f8]
mov dword [esp + 0x7c], ecx
lea edx, [esp + 8]
lea eax, [esp + 0x7c]
push edx
push str.HELO__s_r_n
push eax
mov dword [esp + 0x80], 0
call fcn.005558b1
mov edx, dword [esp + 0x88]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
mov ecx, esi
call fcn.0050c980
test eax, eax
jne 0x50dcca
push 0x1319ae8
lea ecx, [esi + 0x38]
call fcn.005587f6
jmp 0x50dcda
push 0xfa
mov ecx, esi
call fcn.0050e900
test eax, eax
jne 0x50dcf7
mov ecx, esi
call fcn.0050e080
lea ecx, [esp + 0x7c]
mov dword [esp + 0x74], 0xffffffff
call fcn.005586b9
jmp 0x50dc4b
lea ecx, [esp + 0x7c]
mov dword [esp + 0x74], 0xffffffff
call fcn.005586b9
mov ecx, dword [esp + 0x6c]
pop edi
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x70
ret 0x14
Function at 0x5123a0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
mov eax, dword [0x1399618]
xor edx, edx
cmp eax, edx
jne 0x5123c6
xor eax, eax
mov byte [eax + 0x1399518], al
inc eax
cmp eax, 0x100
jl 0x5123ae
mov dword [0x1399618], 1
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
mov ecx, 0x40
mov esi, 0x1399518
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
cmp eax, edx
mov byte [ebx + 0x100], dl
mov byte [ebx + 0x101], dl
jle 0x512457
xor esi, esi
push ebp
mov byte [esp + 0x20], dl
xor ecx, ecx
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov al, byte [esi + ebx]
and edi, 0xff
xor edx, edx
mov dl, byte [edi + ebp]
mov ebp, eax
and ebp, 0xff
add ecx, edx
add ecx, ebp
and ecx, 0x800000ff
jns 0x51242a
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov dl, byte [ecx + ebx]
mov byte [esi + ebx], dl
mov byte [ecx + ebx], al
lea eax, [edi + 1]
cdq
idiv dword [esp + 0x1c]
inc esi
cmp esi, 0x100
mov byte [esp + 0x20], dl
jl 0x5123f8
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret

Function at 0x512460
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov cl, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
mov dword [ebp - 8], eax
mov byte [ebp - 1], cl
mov byte [ebp - 2], dl
xor ebx, ebx
mov bl, byte [ebp - 1]
xor edx, edx
mov dl, byte [ebp - 2]
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
xor eax, eax
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x5124b3
inc bl
mov al, byte [esi + ebx]
add dl, al
xchg byte [esi + edx], al
mov byte [esi + ebx], al
add al, byte [esi + edx]
mov al, byte [esi + eax]
xor byte [edi], al
inc edi
dec ecx
jne 0x51249a
mov byte [ebp - 1], bl
mov byte [ebp - 2], dl
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp - 1]
mov dl, byte [ebp - 2]
pop edi
pop esi
mov byte [eax + 0x100], cl
mov byte [eax + 0x101], dl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x518e30
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x56ca8e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x18]
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x10], edi
call fcn.00519750
push 0x10
mov dword [esp + 0x18], 0
mov dword [edi], 0x121432c
call fcn.005583fa
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
mov al, 1
test esi, esi
mov byte [esp + 0x14], al
je 0x518ec3
push 4
mov byte [esi + 8], al
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.005583fa
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov byte [esp + 0x14], 2
je 0x518ebc
push 0
mov ecx, eax
call fcn.0050ffd0
mov dword [esi + 0xc], eax
jmp 0x518ec5
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x518ec5
xor esi, esi
mov ecx, dword [esp + 0xc]
mov dword [edi + 0x30], esi
mov dword [edi + 0x34], 0
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 8
Function at 0x52a1fd
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x52a21d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00528b2a
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x52a240
test byte [esp + 8], 2
je 0x52a240
call fcn.00528b9d
mov dword [eax], 0xd
call fcn.00528ba6
mov dword [eax], 5
jmp 0x52a219
xor eax, eax
ret

Function at 0x539fe3
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x18]
imul eax, edi
add eax, edx
cmp edx, eax
mov dword [ebp - 0x14], eax
jae 0x53a104
mov eax, dword [ebp + 0x10]
lea eax, [edx + eax*4]
push ebx
push esi
mov dword [ebp + 0x14], eax
mov esi, 0xffc03fc0
mov eax, 0xff00ff
cmp edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ecx
jae 0x53a0e8
mov ebx, dword [ebp + 0x14]
sub ebx, edx
dec ebx
shr ebx, 3
lea ecx, [edx + 4]
inc ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], ebx
mov edx, dword [ecx + edi]
mov edi, dword [edi + ecx - 4]
mov dword [ebp - 8], edi
shr edi, 2
and edi, esi
mov dword [ebp + 0x10], edx
mov edx, dword [ecx]
mov ecx, dword [ecx - 4]
mov ebx, ecx
shr ebx, 2
and ebx, esi
add ebx, edi
mov edi, dword [ebp + 0x10]
shr edi, 2
and edi, esi
add ebx, edi
mov edi, edx
shr edi, 2
and edi, esi
lea ebx, [ebx + edi - 0x7fff80]
mov edi, dword [ebp - 8]
and edi, eax
mov esi, ecx
and esi, eax
add esi, edi
mov edi, dword [ebp + 0x10]
and edi, eax
add esi, edi
mov edi, edx
and edi, eax
lea esi, [esi + edi + 0x20002]
mov edi, dword [ebp - 8]
shr ecx, 2
shr esi, 2
xor ebx, esi
shr edi, 2
mov esi, 0x3fc03fc0
and ecx, esi
and edi, esi
add ecx, edi
mov edi, dword [ebp + 0x10]
shr edi, 2
and edi, esi
add ecx, edi
mov edi, dword [ebp + 0x18]
shr edx, 2
and edx, esi
lea ecx, [ecx + edx + 0x800080]
and ebx, eax
xor ebx, ecx
mov ecx, dword [ebp - 4]
add dword [ebp - 4], 4
mov dword [ecx], ebx
mov ecx, dword [ebp - 0xc]
add ecx, 8
dec dword [ebp - 0x10]
mov dword [ebp - 0xc], ecx
mov esi, 0xffc03fc0
jne 0x53a03a
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x1c]
add dword [ebp + 8], ecx
lea ecx, [edi + edi]
add dword [ebp + 0x14], ecx
add edx, ecx
cmp edx, dword [ebp - 0x14]
mov dword [ebp + 0xc], edx
jb 0x53a018
pop esi
pop ebx
xor eax, eax
pop edi
leave
ret 0x18

Function at 0x53ab4c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push 0x121ab54
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x53aba3
push esi
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
pop esi
jne 0x53aba3
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp + 8]
jne 0x53aba3
xor eax, eax
inc eax
jmp 0x53aba5
xor eax, eax
leave
ret 0x10
Function at 0x53abce
Capabilities:
Get system information on windows
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push edi
lea eax, [ebp - 4]
push eax
push 0x121ab54
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
xor edi, edi
test eax, eax
jne 0x53ac3c
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push edi
push 0x121b37c
push dword [ebp - 4]
mov dword [ebp - 8], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x53ac33
cmp dword [ebp - 0xc], 4
jne 0x53ac33
cmp dword [ebp - 0x10], edi
je 0x53ac33
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [0x1324f28], edi
xor eax, eax
jmp 0x53ac7b
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x1324f28], edi
jge 0x53ac76
lea eax, [ebp - 0x34]
push eax
mov dword [0x1324f28], edi
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp word [ebp - 0x34], di
jne 0x53ac76
cmp word [ebp - 0x14], 5
jb 0x53ac76
call fcn.0053aba9
test eax, eax
je 0x53ac76
emms
mov dword [0x1324f28], 1
mov eax, dword [0x1324f28]
pop edi
leave
ret

Function at 0x55aac4
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x55aafc
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00558b14
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00558aec
jmp 0x55ab08
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x55c2c4
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x55c306
call fcn.00562b6a
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x55c306
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x55c2fd
xor eax, eax
jmp 0x55c30e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0055c314
pop edi
pop esi
pop ebx
ret 4

Function at 0x56309a
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x5630c8
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x5630e6
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00563000
jmp 0x5630e6
mov eax, dword [esi + 0x14]
test eax, eax
je 0x5630e6
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00563000
test edi, edi
mov eax, edi
jne 0x5630d0
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x405780
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x18
push ebx
push esi
push edi
test eax, eax
jne 0x4057cd
sub esp, 0x10
lea eax, [ebp - 8]
mov dword [ebp - 0x10], eax
mov eax, esp
push str.got_NULL_filename
xorps xmm0, xmm0
movq qword [ebp - 8], xmm0
movlpd qword [ebp - 0x18], xmm0
movups xmm0, xmmword [ebp - 0x18]
push str.pvpgn::d2cs::file_read
push 0x10
movups xmmword [eax], xmm0
call fcn.00415770
add esp, 0x1c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], 0
jne 0x4057e5
sub esp, 0x10
lea eax, [ebp - 8]
mov dword [ebp - 0x10], eax
mov eax, esp
push str.got_NULL_data
jmp 0x4057a0
mov ebx, dword [ebp + 0x10]
test ebx, ebx
jne 0x4057fe
sub esp, 0x10
lea eax, [ebp - 8]
mov dword [ebp - 0x10], eax
mov eax, esp
push str.got_NULL_size
jmp 0x4057a0
push 0x4481e0
push eax
call fcn.0042ba70
mov esi, eax
add esp, 8
test esi, esi
jne 0x405847
call fcn.0042b896
push dword [eax]
call fcn.0042ca0c
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 8]
push eax
push str.could_not_open_file____for_reading__std::fopen:__
push str.pvpgn::d2cs::file_read
push 0x10
call fcn.004035d0
add esp, 0x18
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 2
push 0
push esi
call fcn.0042bfc4
push esi
call fcn.0042c5dc
mov edi, dword [ebx]
cmp eax, edi
push esi
cmovb edi, eax
call fcn.0042c8aa
push esi
push edi
push 1
push dword [ebp + 0xc]
call fcn.0042bc60
add esp, 0x24
cmp eax, edi
je 0x4058b2
call fcn.0042b896
push dword [eax]
call fcn.0042ca0c
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 8]
push eax
push str.error_reading_file_____std::fread:__
push str.pvpgn::d2cs::file_read
push 0x10
call fcn.004035d0
push esi
call fcn.0042b91f
add esp, 0x1c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.0042b91f
add esp, 4
test eax, eax
jns 0x4058f4
call fcn.0042b896
push dword [eax]
call fcn.0042ca0c
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 8]
push eax
push str.could_not_close_file____after_reading__std::fclose:__
push str.pvpgn::d2cs::file_read
push 0x10
call fcn.004035d0
add esp, 0x18
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebx], edi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405900
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x18
push esi
push edi
test eax, eax
jne 0x40594b
sub esp, 0x10
lea eax, [ebp - 8]
mov dword [ebp - 0x10], eax
mov eax, esp
push str.got_NULL_filename
xorps xmm0, xmm0
movq qword [ebp - 8], xmm0
movlpd qword [ebp - 0x18], xmm0
movups xmm0, xmmword [ebp - 0x18]
push str.pvpgn::d2cs::file_write
push 0x10
movups xmmword [eax], xmm0
call fcn.00415770
add esp, 0x1c
or eax, 0xffffffff
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], 0
jne 0x405963
sub esp, 0x10
lea eax, [ebp - 8]
mov dword [ebp - 0x10], eax
mov eax, esp
push str.got_NULL_data
jmp 0x40591f
mov edi, dword [ebp + 0x10]
test edi, edi
jne 0x40597c
sub esp, 0x10
lea eax, [ebp - 8]
mov dword [ebp - 0x10], eax
mov eax, esp
push str.got_NULL_size
jmp 0x40591f
push 0x448720
push eax
call fcn.0042ba70
mov esi, eax
add esp, 8
test esi, esi
jne 0x4059c4
call fcn.0042b896
push dword [eax]
call fcn.0042ca0c
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 8]
push eax
push str.could_not_open_file____for_writing__std::fopen:__
push str.pvpgn::d2cs::file_write
push 0x10
call fcn.004035d0
add esp, 0x18
or eax, 0xffffffff
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push esi
push edi
push 1
push dword [ebp + 0xc]
call fcn.0042c7f8
add esp, 0x10
cmp eax, edi
je 0x405a11
call fcn.0042b896
push dword [eax]
call fcn.0042ca0c
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 8]
push eax
push str.error_writing_file_____std::fwrite:__
push str.pvpgn::d2cs::file_write
push 0x10
call fcn.004035d0
push esi
call fcn.0042b91f
add esp, 0x1c
or eax, 0xffffffff
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push esi
call fcn.0042b91f
add esp, 4
test eax, eax
jns 0x405a52
call fcn.0042b896
push dword [eax]
call fcn.0042ca0c
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 8]
push eax
push str.could_not_close_file____after_writing__std::fclose:__
push str.pvpgn::d2cs::file_write
push 0x10
call fcn.004035d0
add esp, 0x18
or eax, 0xffffffff
pop edi
pop esi
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret