joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4b6350
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x18]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x1c]
and dword [edi], 0
push dword [ebp + 8]
mov byte [eax], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x4b63ca
cmp word [ebx + 8], 2
jne 0x4b63a6
cmp word [ebx + 0xa], 4
jne 0x4b63a6
mov esi, dword [ebx + 0xc]
jmp 0x4b63a0
push dword [eax]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.004b62ea
test eax, eax
mov dword [edi], eax
je 0x4b63c5
lea edi, [eax + 0x1c]
add esi, 4
mov eax, dword [esi]
test eax, eax
jne 0x4b6384
mov esi, dword [ebp + 0x18]
push 0x400
push dword [ebx]
push esi
call dword [0x4ea94c]
add esp, 0xc
mov byte [esi + 0x400], 0
xor eax, eax
jmp 0x4b63f0
push 8
pop eax
jmp 0x4b63f0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov eax, 0x2af9
sub ecx, eax
je 0x4b63f0
dec ecx
je 0x4b63eb
dec ecx
je 0x4b63e4
dec ecx
jmp 0x4b63f0
mov eax, 0x2afb
jmp 0x4b63f0
mov eax, 0x2afa
pop edi
pop esi
pop ebx
pop ebp
ret 0x18

Function at 0x4b6c14
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x52d320]
push esi
mov esi, dword [ebp + 8]
push edi
push 6
push 1
xor eax, ebp
push 2
mov dword [ebp - 4], eax
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x4b6c62
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0xc]
push esi
call fcn.004b6b6b
add esp, 0xc
test al, al
je 0x4b6c62
push 0x10
lea eax, [ebp - 0x14]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4b6c67
or eax, 0xffffffff
jmp 0x4b6c69
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004d0557
leave
ret

Function at 0x4b6c77
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 0x10], esi
jle 0x4b6ca5
mov eax, dword [ebp + 0x10]
push 0
sub eax, esi
push eax
mov eax, dword [ebp + 0xc]
add eax, esi
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4b6caa
add esi, eax
cmp esi, dword [ebp + 0x10]
jl 0x4b6c82
mov eax, esi
pop esi
pop ebp
ret
or eax, 0xffffffff
jmp 0x4b6ca7

Function at 0x4b6caf
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [eax]
push esi
push edi
xor esi, esi
jmp 0x4b6cf5
mov eax, dword [ebp + 0xc]
push 0
push ebx
add eax, esi
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
or eax, 0xffffffff
cmp edi, eax
je 0x4b6d10
push str._r_n_r_n
push dword [ebp + 0xc]
add esi, edi
sub ebx, edi
call dword [0x4ea958]
test eax, eax
pop ecx
pop ecx
jne 0x4b6cfe
test edi, edi
je 0x4b6cf9
test ebx, ebx
jne 0x4b6cbe
or eax, 0xffffffff
jmp 0x4b6d10
mov ecx, dword [ebp + 0x10]
sub eax, dword [ebp + 0xc]
mov dword [ecx], esi
mov ecx, dword [ebp + 0x14]
add eax, 4
mov dword [ecx], eax
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x4b6d15
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
lea ebp, [esp - 0x390]
sub esp, 0x410
mov eax, dword [0x52d320]
xor eax, ebp
mov dword [ebp + 0x38c], eax
mov eax, dword [ebp + 0x3a0]
push esi
mov esi, dword [ebp + 0x39c]
and dword [esi], 0
mov dword [ebp - 0x80], eax
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x74]
push eax
push dword [ebp + 0x398]
mov dword [ebp - 0x78], 0x400
call fcn.004b6caf
add esp, 0x10
test eax, eax
jge 0x4b6d70
or eax, 0xffffffff
jmp 0x4b6e16
push ebx
push edi
mov ebx, str.Content_Length:
push ebx
lea eax, [ebp - 0x74]
push eax
call dword [0x4eaaac]
mov edi, eax
test edi, edi
je 0x4b6e11
push ebx
call fcn.004d05da
pop ecx
add edi, eax
jmp 0x4b6d98
inc edi
cmp byte [edi], 0x20
je 0x4b6d97
push edi
call dword [0x4ea864]
mov ebx, eax
test ebx, ebx
pop ecx
jl 0x4b6e11
cmp ebx, 0x800000
jg 0x4b6e11
push ebx
call fcn.004d00df
test eax, eax
pop ecx
mov dword [esi], eax
je 0x4b6e11
mov ecx, dword [ebp - 0x7c]
mov edi, dword [ebp - 0x78]
sub edi, ecx
push edi
lea ecx, [ebp + ecx - 0x74]
push ecx
push eax
call fcn.004d05c2
add esp, 0xc
jmp 0x4b6dfc
push 0
mov eax, ebx
sub eax, edi
push eax
mov eax, dword [esi]
add eax, edi
push eax
push dword [ebp + 0x398]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x4b6e09
test eax, eax
je 0x4b6e00
add edi, eax
cmp edi, ebx
jl 0x4b6dd9
mov eax, dword [ebp - 0x80]
mov dword [eax], ebx
xor eax, eax
jmp 0x4b6e14
push dword [esi]
call fcn.004d05e0
pop ecx
or eax, 0xffffffff
pop edi
pop ebx
mov ecx, dword [ebp + 0x38c]
xor ecx, ebp
pop esi
call fcn.004d0557
add ebp, 0x390
leave
ret

Function at 0x4b8339
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push 0x3c
xor ebx, ebx
lea eax, [ebp - 0x3c]
push ebx
push eax
call fcn.004d05b6
add esp, 0xc
cmp byte [ebp + 0x14], bl
mov dword [ebp - 0x3c], 0x3c
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
je 0x4b8373
call fcn.004b8036
test al, al
mov dword [ebp - 0x30], str.runas
jne 0x4b837a
mov dword [ebp - 0x30], str.open
mov eax, dword [ebp + 8]
cmp dword [eax + 0x18], 8
jb 0x4b8388
mov eax, dword [eax + 4]
jmp 0x4b838b
add eax, 4
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x18], 8
jb 0x4b839c
mov eax, dword [eax + 4]
jmp 0x4b839f
add eax, 4
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x10]
cmp dword [eax + 0x18], 8
jb 0x4b83b0
mov eax, dword [eax + 4]
jmp 0x4b83b3
add eax, 4
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 0x20], 5
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x38], 0x400
call dword [0x4eaa58]
test eax, eax
pop ebx
je 0x4b83da
xor eax, eax
leave
ret
call dword [0x4ea2d8]
leave
ret
Function at 0x4b8565
Capabilities:
Get common file path

Disassembly:
mov eax, 0x4e6c5f
call fcn.004d0500
sub esp, 0x2cc
mov eax, dword [0x52d320]
xor eax, ebp
push ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
test byte [0x533ccc], 1
push edi
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x23c], ebx
mov edi, 0x533cb0
jne 0x4b85c1
or dword [0x533ccc], 1
mov ecx, edi
mov dword [ebp - 4], ebx
call dword [0x4ea6b0]
push 0x4e999d
call fcn.004d060c
or dword [ebp - 4], 0xffffffff
pop ecx
cmp dword [0x533cc4], ebx
jne 0x4b86be
lea eax, [ebp - 0x218]
push eax
push ebx
push ebx
push 0x23
push ebx
call dword [0x4eaa48]
cmp eax, ebx
jge 0x4b85f5
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [0x4ea2a0]
push esi
xor esi, esi
inc esi
push esi
push 2
lea ecx, [ebp - 0x2d8]
call dword [0x4ea6cc]
push str.Thunder_NetworkThunderLiveUD_
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x2d8]
mov dword [ebp - 4], esi
mov esi, dword [0x4ea6c8]
push eax
call esi
pop ecx
pop ecx
push eax
call esi
pop ecx
pop ecx
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x2d8]
call dword [0x4ea6c0]
cmp byte [ebp + 0xc], bl
mov byte [ebp - 4], 2
pop esi
je 0x4b8666
cmp dword [ebp - 0x21c], 8
mov eax, dword [ebp - 0x230]
jae 0x4b865f
lea eax, [ebp - 0x230]
push eax
call fcn.004b853d
pop ecx
push 0x4ff41c
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x258]
push eax
call fcn.00407770
add esp, 0xc
push eax
mov ecx, edi
mov byte [ebp - 4], 3
call dword [0x4ea4e8]
lea ecx, [ebp - 0x258]
mov byte [ebp - 4], 2
call dword [0x4ea4f8]
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 1
call dword [0x4ea4f8]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2d8]
call dword [0x4ea6b4]
mov ecx, dword [ebp - 0x238]
push 0x533cb0
call dword [0x4ea4ec]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x238]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop edi
xor ecx, ebp
pop ebx
call fcn.004d0557
leave
ret
Function at 0x4cc920
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa14
mov eax, dword [0x52d320]
push edi
mov dword [esp + 0xa14], eax
xor eax, eax
mov word [esp + 8], 0
mov ecx, 0x81
lea edi, [esp + 0xa]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea eax, [esp + 0xc]
push eax
push 0
call dword [0x4ea3cc]
lea ecx, [esp + 8]
push 0x5c
push ecx
call dword [0x4ea8e8]
push 0xd
lea edx, [esp + 0x14]
push str.TDPRepair.exe
push edx
mov word [eax + 2], 0
call dword [0x4ea898]
mov eax, dword [ebp + 8]
push eax
lea ecx, [esp + 0x228]
push str.__dir_s
push ecx
call dword [0x4eac40]
add esp, 0x20
push 2
lea edx, [esp + 0x214]
push edx
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.XLBugHandler.dll__XL_AddCrashProcess_12]
call fcn.004cc340
test eax, eax
je 0x4cc9d7
call fcn.004cc400
test eax, eax
jne 0x4cc9d7
push eax
push eax
push 0x4cc7b0
call dword [0x4ea940]
add esp, 0xc
mov ecx, dword [esp + 0xa14]
call fcn.004d0557
pop edi
mov esp, ebp
pop ebp
ret

Function at 0x4cc9f0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x414
mov eax, dword [0x52d320]
mov dword [esp + 0x410], eax
call fcn.004cc400
test eax, eax
jne 0x4cca63
call fcn.004cc690
test eax, eax
je 0x4cca7b
push 0x104
lea eax, [esp + 4]
push eax
push 0
call dword [0x4ea3cc]
lea ecx, [esp]
push ecx
call dword [0x4eaaa8]
push str..TDPRepair.exe
lea edx, [esp + 4]
push edx
lea eax, [esp + 0x210]
push eax
call dword [0x4eaad8]
push 0
push 0
push 0
lea ecx, [esp + 0x214]
push ecx
push str.open
push 0
call dword [0x4eaa3c]
mov eax, 1
mov ecx, dword [esp + 0x410]
call fcn.004d0557
add esp, 0x414
ret
mov ecx, dword [esp + 0x410]
xor eax, eax
call fcn.004d0557
add esp, 0x414
ret
Function at 0x4cdf7f
Capabilities:
Create thread

Disassembly:
push 0
push 0
call fcn.004cfd21
push eax
push 0x4cfdcc
push 0
push 0
call dword [0x4ea7f8]
add esp, 0x18
test eax, eax
je 0x4cdfa6
push eax
call dword [0x4ea2b4]
xor eax, eax
inc eax
ret

Function at 0x4d1d1f
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x460]
sub esp, 0x4e0
mov eax, dword [0x52d320]
mov ecx, dword [ebp + 0x46c]
xor eax, ebp
mov dword [ebp + 0x45c], eax
mov eax, dword [ebp + 0x468]
test eax, eax
push ebx
mov dword [ebp - 0x80], ecx
je 0x4d1dee
cmp word [eax], 0
je 0x4d1dee
push 0x4eb7f8
push eax
call dword [0x4ea814]
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
jne 0x4d1d73
inc eax
jmp 0x4d1df1
push esi
lea eax, [ebp - 0x7c]
push edi
push eax
call fcn.004d63b0
mov esi, dword [0x4ea818]
push ebx
mov edi, 0x400
push edi
lea eax, [ebp + 0x5c]
push 1
push eax
call esi
add esp, 0x14
jmp 0x4d1db3
push eax
lea eax, [ebp + 0x5c]
push eax
lea eax, [ebp - 0x7c]
push eax
call fcn.004d1a81
push ebx
push edi
lea eax, [ebp + 0x5c]
push 1
push eax
call esi
add esp, 0x1c
test eax, eax
ja 0x4d1d98
push dword [ebp - 0x80]
lea eax, [ebp - 0x7c]
push eax
call fcn.004d1b20
push 0xd8
xor esi, esi
lea eax, [ebp - 0x7c]
push esi
push eax
call fcn.004d05b6
add esp, 0x14
test byte [ebx + 0xc], 0x20
je 0x4d1de0
push 2
pop esi
push ebx
call dword [0x4ea80c]
pop ecx
pop edi
mov eax, esi
pop esi
jmp 0x4d1df1
push 3
pop eax
mov ecx, dword [ebp + 0x45c]
xor ecx, ebp
pop ebx
call fcn.004d0557
add ebp, 0x460
leave
ret
Function at 0x4d1e07
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x52d320]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
test eax, eax
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x18], eax
je 0x4d1f37
push edi
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x4d1f36
cmp edi, 0x40
jbe 0x4d1e51
lea ecx, [ebp - 0x14]
push ecx
push edi
push eax
call fcn.004d1cb6
add esp, 0xc
push 0x10
lea eax, [ebp - 0x14]
pop edi
mov dword [ebp - 0x18], eax
push ebx
push 0x40
lea eax, [esi + 0x58]
push 0x36
push eax
call fcn.004d05b6
push 0x40
lea ebx, [esi + 0x98]
push 0x5c
push ebx
call fcn.004d05b6
add esp, 0x18
test edi, edi
jbe 0x4d1e89
mov ecx, dword [ebp - 0x18]
mov eax, ebx
mov dl, byte [ecx]
xor byte [eax - 0x40], dl
mov dl, byte [ecx]
xor byte [eax], dl
inc ecx
inc eax
dec edi
jne 0x4d1e7b
push esi
call fcn.004d63b0
add esp, 4
lea eax, [esi + 0x58]
test eax, eax
push 0x40
pop ebx
mov dword [ebp - 0x18], eax
je 0x4d1f25
mov ecx, dword [esi]
mov edi, ecx
push ebx
and edi, 0x3f
pop eax
add ecx, ebx
sub eax, edi
cmp ecx, ebx
mov dword [ebp - 0x1c], eax
mov dword [esi], ecx
jae 0x4d1ebc
inc dword [esi + 4]
test edi, edi
je 0x4d1ef2
cmp eax, 0x40
ja 0x4d1ef2
push eax
push dword [ebp - 0x18]
lea eax, [edi + esi + 0x18]
push eax
call fcn.004d05c2
add esp, 0xc
lea eax, [esi + 0x18]
mov ecx, esi
call fcn.004d10f9
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x18], eax
push 0x40
pop ebx
sub ebx, eax
xor edi, edi
cmp ebx, 0x40
jb 0x4d1f10
mov eax, ebx
shr eax, 6
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
mov ecx, esi
call fcn.004d10f9
add dword [ebp - 0x18], 0x40
sub ebx, 0x40
dec dword [ebp - 0x1c]
jne 0x4d1efa
test ebx, ebx
jbe 0x4d1f25
push ebx
push dword [ebp - 0x18]
lea eax, [edi + esi + 0x18]
push eax
call fcn.004d05c2
add esp, 0xc
push 0x10
lea eax, [ebp - 0x14]
push 0
push eax
call fcn.004d05b6
add esp, 0xc
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004d0557
leave
ret
Function at 0x4d23bc
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [ebp + 0x10]
sub eax, 0x80
push edi
je 0x4d23f8
sub eax, 0x40
je 0x4d23ed
sub eax, 0x40
je 0x4d23e2
or eax, 0xffffffff
jmp 0x4d24d8
mov edi, dword [ebp + 8]
mov dword [edi], 0xe
jmp 0x4d2401
mov edi, dword [ebp + 8]
mov dword [edi], 0xc
jmp 0x4d2401
mov edi, dword [ebp + 8]
mov dword [edi], 0xa
push esi
push dword [ebp + 0x10]
lea eax, [ebp - 0x118]
push dword [ebp + 0xc]
lea esi, [edi + 8]
push eax
mov dword [edi + 4], esi
call fcn.004d2140
mov eax, dword [ebp - 0x118]
shl eax, 4
add eax, dword [ebp - 0x114]
add esp, 0xc
mov ecx, dword [eax]
mov dword [esi], ecx
push 4
pop ecx
add eax, ecx
mov edx, dword [eax]
add esi, ecx
mov dword [esi], edx
add eax, ecx
mov edx, dword [eax]
add esi, ecx
mov dword [esi], edx
add eax, ecx
mov edx, dword [eax]
add esi, ecx
mov dword [esi], edx
mov edi, dword [edi]
add esi, ecx
dec edi
sub eax, 0x1c
test edi, edi
jle 0x4d24bb
mov dword [ebp + 0x10], edi
push ebx
mov edx, ecx
movzx edi, byte [eax + 3]
movzx edi, byte [edi + str.cw]
movzx ebx, byte [eax + 2]
movzx ebx, byte [ebx + str.cw]
mov edi, dword [edi*4 + 0x504fc8]
xor edi, dword [ebx*4 + 0x504bc8]
movzx ebx, byte [eax + 1]
movzx ebx, byte [ebx + str.cw]
xor edi, dword [ebx*4 + 0x5047c8]
mov ebx, dword [eax]
and ebx, 0xff
movzx ebx, byte [ebx + str.cw]
xor edi, dword [ebx*4 + 0x5043c8]
add eax, ecx
mov dword [esi], edi
add esi, ecx
dec edx
jne 0x4d245d
sub eax, 0x20
dec dword [ebp + 0x10]
jne 0x4d245b
pop ebx
mov edx, dword [eax]
mov dword [esi], edx
add eax, ecx
mov edx, dword [eax]
add esi, ecx
mov dword [esi], edx
add esi, ecx
add eax, ecx
mov ecx, dword [eax]
mov dword [esi], ecx
mov eax, dword [eax + 4]
mov dword [esi + 4], eax
xor eax, eax
pop esi
pop edi
leave
ret
Function at 0x4d63b0
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
and dword [eax], 0
and dword [eax + 4], 0
mov dword [eax + 8], 0x67452301
mov dword [eax + 0xc], 0xefcdab89
mov dword [eax + 0x10], 0x98badcfe
mov dword [eax + 0x14], 0x10325476
ret

Function at 0x4d6e2e
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x52d320]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
test eax, eax
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x18], eax
je 0x4d6f5e
push edi
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x4d6f5d
cmp edi, 0x40
jbe 0x4d6e78
lea ecx, [ebp - 0x14]
push ecx
push edi
push eax
call fcn.004d6dc5
add esp, 0xc
push 0x10
lea eax, [ebp - 0x14]
pop edi
mov dword [ebp - 0x18], eax
push ebx
push 0x40
lea eax, [esi + 0x58]
push 0x36
push eax
call fcn.004d05b6
push 0x40
lea ebx, [esi + 0x98]
push 0x5c
push ebx
call fcn.004d05b6
add esp, 0x18
test edi, edi
jbe 0x4d6eb0
mov ecx, dword [ebp - 0x18]
mov eax, ebx
mov dl, byte [ecx]
xor byte [eax - 0x40], dl
mov dl, byte [ecx]
xor byte [eax], dl
inc ecx
inc eax
dec edi
jne 0x4d6ea2
push esi
call fcn.004d63b0
add esp, 4
lea eax, [esi + 0x58]
test eax, eax
push 0x40
pop ebx
mov dword [ebp - 0x18], eax
je 0x4d6f4c
mov ecx, dword [esi]
mov edi, ecx
push ebx
and edi, 0x3f
pop eax
add ecx, ebx
sub eax, edi
cmp ecx, ebx
mov dword [ebp - 0x1c], eax
mov dword [esi], ecx
jae 0x4d6ee3
inc dword [esi + 4]
test edi, edi
je 0x4d6f19
cmp eax, 0x40
ja 0x4d6f19
push eax
push dword [ebp - 0x18]
lea eax, [edi + esi + 0x18]
push eax
call fcn.004d05c2
add esp, 0xc
lea eax, [esi + 0x18]
mov ecx, esi
call fcn.004d63d8
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x18], eax
push 0x40
pop ebx
sub ebx, eax
xor edi, edi
cmp ebx, 0x40
jb 0x4d6f37
mov eax, ebx
shr eax, 6
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
mov ecx, esi
call fcn.004d63d8
add dword [ebp - 0x18], 0x40
sub ebx, 0x40
dec dword [ebp - 0x1c]
jne 0x4d6f21
test ebx, ebx
jbe 0x4d6f4c
push ebx
push dword [ebp - 0x18]
lea eax, [edi + esi + 0x18]
push eax
call fcn.004d05c2
add esp, 0xc
push 0x10
lea eax, [ebp - 0x14]
push 0
push eax
call fcn.004d05b6
add esp, 0xc
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004d0557
leave
ret

Function at 0x4d7167
Capabilities:
Hash data using sha1

Disassembly:
mov eax, dword [esp + 4]
and dword [eax], 0
and dword [eax + 4], 0
mov dword [eax + 8], 0x67452301
mov dword [eax + 0xc], 0xefcdab89
mov dword [eax + 0x10], 0x98badcfe
mov dword [eax + 0x14], 0x10325476
mov dword [eax + 0x18], 0xc3d2e1f0
ret
Function at 0x4d8db2
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x52d320]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
test eax, eax
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
je 0x4d8ee2
push edi
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x4d8ee1
cmp edi, 0x40
jbe 0x4d8dfc
lea ecx, [ebp - 0x18]
push ecx
push edi
push eax
call fcn.004d8d49
add esp, 0xc
push 0x14
lea eax, [ebp - 0x18]
pop edi
mov dword [ebp - 0x1c], eax
push ebx
push 0x40
lea eax, [esi + 0x5c]
push 0x36
push eax
call fcn.004d05b6
push 0x40
lea ebx, [esi + 0x9c]
push 0x5c
push ebx
call fcn.004d05b6
add esp, 0x18
test edi, edi
jbe 0x4d8e34
mov ecx, dword [ebp - 0x1c]
mov eax, ebx
mov dl, byte [ecx]
xor byte [eax - 0x40], dl
mov dl, byte [ecx]
xor byte [eax], dl
inc ecx
inc eax
dec edi
jne 0x4d8e26
push esi
call fcn.004d7167
add esp, 4
lea eax, [esi + 0x5c]
test eax, eax
push 0x40
pop ebx
mov dword [ebp - 0x1c], eax
je 0x4d8ed0
mov ecx, dword [esi]
mov edi, ecx
push ebx
and edi, 0x3f
pop eax
add ecx, ebx
sub eax, edi
cmp ecx, ebx
mov dword [ebp - 0x20], eax
mov dword [esi], ecx
jae 0x4d8e67
inc dword [esi + 4]
test edi, edi
je 0x4d8e9d
cmp eax, 0x40
ja 0x4d8e9d
push eax
push dword [ebp - 0x1c]
lea eax, [edi + esi + 0x1c]
push eax
call fcn.004d05c2
add esp, 0xc
lea eax, [esi + 0x1c]
mov ecx, esi
call fcn.004d7196
mov eax, dword [ebp - 0x20]
add dword [ebp - 0x1c], eax
push 0x40
pop ebx
sub ebx, eax
xor edi, edi
cmp ebx, 0x40
jb 0x4d8ebb
mov eax, ebx
shr eax, 6
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
mov ecx, esi
call fcn.004d7196
add dword [ebp - 0x1c], 0x40
sub ebx, 0x40
dec dword [ebp - 0x20]
jne 0x4d8ea5
test ebx, ebx
jbe 0x4d8ed0
push ebx
push dword [ebp - 0x1c]
lea eax, [edi + esi + 0x1c]
push eax
call fcn.004d05c2
add esp, 0xc
push 0x14
lea eax, [ebp - 0x18]
push 0
push eax
call fcn.004d05b6
add esp, 0xc
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004d0557
leave
ret
Function at 0x403040
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x40306c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x403094
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x40309a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x403102
jg 0x4030b1
test esi, esi
je 0x403102
test ecx, ecx
jl 0x4030fd
jg 0x4030bb
test eax, eax
je 0x4030fd
cmp edi, ecx
jg 0x4030cf
jl 0x4030c5
cmp esi, eax
jae 0x4030cf
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x403105
mov ecx, dword [ebp + 8]
jmp 0x40310f
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x403129
jg 0x40310f
test esi, esi
je 0x403129
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x403129
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x403140
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x40316c
jl 0x403160
test ecx, ecx
jne 0x40316c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x403185
push eax
push ecx
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x4031cd
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x4031d3
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push dword [ebp - 4]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
sub edi, esi
add dword [ebp - 4], esi
add esp, 0xc
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x4031d3
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x403246
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x4031fc
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x403234
nop dword [eax]
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x403246
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x403210
test edi, edi
je 0x403246
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc