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

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push edi
cmp dword [ebx + 0x14], 0
jne 0x4edad2
push ebx
call fcn.00480350
mov dword [ebx + 0x14], 1
mov dword [ebx + 0xc], 0
mov ebp, dword [ebx + 0xc]
mov ecx, dword [ebx + 4]
mov esi, dword [esp + 0x1c]
sub ecx, ebp
add ecx, dword [ebx + 0x10]
cmp ebp, esi
jl 0x4edb4e
mov eax, esi
sub eax, 1
je 0x4edb3a
sub eax, 1
je 0x4edb24
sub eax, 2
je 0x4edb10
push esi
push ecx
push dword [esp + 0x20]
call fcn.004abb90
add esp, 0xc
mov eax, esi
sub dword [ebx + 0xc], esi
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [ecx]
pop edi
mov dword [eax], ecx
mov eax, esi
sub dword [ebx + 0xc], esi
pop esi
pop ebp
pop ebx
ret 0xc
mov eax, dword [esp + 0x18]
mov cx, word [ecx]
pop edi
mov word [eax], cx
mov eax, esi
sub dword [ebx + 0xc], esi
pop esi
pop ebp
pop ebx
ret 0xc
mov dl, byte [ecx]
mov eax, esi
mov ecx, dword [esp + 0x18]
pop edi
mov byte [ecx], dl
sub dword [ebx + 0xc], esi
pop esi
pop ebp
pop ebx
ret 0xc
mov eax, dword [esp + 0x18]
push ebp
push ecx
push eax
call fcn.004abb90
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [ebx + 8]
add eax, ebp
mov ecx, dword [ebx]
sub esi, ebp
mov dword [esp + 0x18], eax
push 0
cmp esi, edx
jl 0x4edb96
lea edx, [esp + 0x18]
push edx
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop edi
pop esi
add eax, ebp
mov dword [ebx + 0xc], 0
pop ebp
pop ebx
ret 0xc
lea eax, [esp + 0x18]
push eax
push edx
push dword [ebx + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], eax
cmp esi, eax
jle 0x4edbb6
mov esi, eax
mov eax, dword [esp + 0x18]
push esi
push dword [ebx + 4]
push eax
call fcn.004abb90
sub dword [ebx + 0xc], esi
lea eax, [esi + ebp]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
Function at 0x4edbe0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x18]
push 0x1000
push 0
push dword [0xd8fb84]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x4edd70
mov cl, byte [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x24]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x4edc2e
test ebp, ebp
je 0x4edcd6
dec ebp
cmp dword [ebx + 4], 0
lea edi, [ebx + 4]
je 0x4edc4a
push 1
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.004edab0
mov dword [esp + 0x10], eax
jmp 0x4edc64
push 0
lea eax, [esp + 0x14]
push eax
push 1
lea eax, [esp + 0x30]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
mov cl, byte [esp + 0x24]
cmp eax, 1
jne 0x4edcd9
test cl, cl
je 0x4edc78
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x24]
mov eax, dword [esp + 0x14]
mov edi, esi
mov edx, dword [esp + 0x1c]
dec eax
sub edi, edx
cmp edi, eax
jle 0x4edcb3
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0xd8fb84]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x24]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [edi + edx]
test cl, cl
je 0x4edcd6
cmp dword [esp + 0x28], 0
jne 0x4edc20
cmp cl, 0xd
je 0x4edce2
cmp cl, 0xa
jne 0x4edc20
dec esi
jmp 0x4edd53
lea edi, [ebx + 4]
cmp dword [esp + 0x28], 0
jne 0x4edd53
jmp 0x4edce5
lea edi, [ebx + 4]
cmp cl, 0xa
jne 0x4edced
dec esi
jmp 0x4edd53
cmp cl, 0xd
jne 0x4edd53
dec esi
cmp dword [edi], 0
je 0x4edd0b
push 1
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.004edab0
mov dword [esp + 0x10], eax
jmp 0x4edd21
push 0
lea eax, [esp + 0x14]
push eax
push 1
lea eax, [esp + 0x30]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x24], 0xa
je 0x4edd53
cmp dword [edi], 0
je 0x4edd32
inc dword [ebx + 0xc]
jmp 0x4edd53
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x30]
mov ecx, esi
sub ecx, dword [esp + 0x1c]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x10
xor eax, eax
pop ebx
add esp, 0x10
ret 0x10
Function at 0x4edd80
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x1c]
push 0x1000
push 0
push dword [0xd8fb84]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 8], edx
test edx, edx
je 0x4edf3f
mov ax, word [esp + 0x1c]
push ebp
push esi
push edi
mov edi, edx
mov dword [esp + 0x1c], 0x1000
mov dword [esp + 0x18], 0x7ff
mov ecx, dword [esp + 0x30]
cmp ecx, 0xffffffff
je 0x4eddd9
test ecx, ecx
je 0x4ede9c
dec ecx
mov dword [esp + 0x30], ecx
cmp dword [ebx + 4], 0
lea ebp, [ebx + 4]
je 0x4eddf5
push 2
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.004edab0
mov dword [esp + 0x10], eax
jmp 0x4ede0f
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea eax, [esp + 0x34]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
cmp eax, 2
mov ax, word [esp + 0x28]
jne 0x4ede9f
test ax, ax
je 0x4ede2d
mov word [edi], ax
add edi, 2
mov ax, word [esp + 0x28]
mov edx, dword [esp + 0x14]
mov esi, edi
mov ecx, dword [esp + 0x18]
sub esi, edx
sar esi, 1
cmp esi, ecx
jle 0x4ede74
mov eax, dword [esp + 0x1c]
add ecx, 0x800
add eax, 0x1000
mov dword [esp + 0x18], ecx
push eax
push edx
push 8
push dword [0xd8fb84]
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, eax
mov ax, word [esp + 0x28]
mov dword [esp + 0x14], edx
lea edi, [edx + esi*2]
test ax, ax
je 0x4ede9f
cmp dword [esp + 0x2c], 0
jne 0x4eddc3
cmp ax, 0xd
je 0x4edea6
cmp ax, 0xa
jne 0x4eddc3
sub edi, 2
jmp 0x4edf1e
lea ebp, [ebx + 4]
cmp dword [esp + 0x2c], 0
jne 0x4edf1e
cmp ax, 0xa
jne 0x4edeb1
sub edi, 2
jmp 0x4edf1e
cmp ax, 0xd
jne 0x4edf1e
sub edi, 2
cmp dword [ebp], 0
je 0x4eded3
push 2
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.004edab0
mov dword [esp + 0x10], eax
jmp 0x4edee9
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea eax, [esp + 0x34]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x28], 0xa
je 0x4edf1e
cmp dword [ebp], 0
je 0x4edefd
add dword [ebx + 0xc], 2
jmp 0x4edf1e
push 1
lea eax, [esp + 0x24]
mov dword [esp + 0x20], 0xfffffffe
push eax
push 0xfffffffffffffffe
push dword [ebx]
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, edi
sub ecx, dword [esp + 0x14]
sar ecx, 1
mov dword [eax], ecx
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
pop ebx
add esp, 0x14
ret 0x10
Function at 0x4edf50
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0xd8fb84]
mov dword [esp + 0x10], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0xc], edx
test edx, edx
je 0x4ee0a0
mov eax, dword [esp + 0x1c]
mov cl, byte [esp + 3]
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, edx
cmp edi, 0xffffffff
je 0x4edf9c
test edi, edi
je 0x4ee00d
dec edi
push esi
push ebp
call fcn.005230e0
mov dword [esp + 0x20], eax
test eax, eax
jne 0x4edfaf
xor cl, cl
jmp 0x4edfb1
mov cl, byte [esi]
mov edx, dword [esp + 0x1c]
add esi, eax
mov eax, dword [esp + 0x14]
mov ebx, esi
sub ebx, edx
mov byte [esp + 0x13], cl
add eax, 0xfffffffb
cmp ebx, eax
jle 0x4edff4
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0xd8fb84]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [ebx + edx]
mov eax, dword [esp + 0x2c]
test cl, cl
je 0x4ee00d
test eax, eax
jne 0x4edf92
cmp cl, 0xd
je 0x4ee011
cmp cl, 0xa
jne 0x4edf92
dec esi
jmp 0x4ee083
test eax, eax
jne 0x4ee083
cmp cl, 0xa
jne 0x4ee019
dec esi
jmp 0x4ee083
cmp cl, 0xd
jne 0x4ee083
dec esi
cmp dword [ebp + 4], 0
je 0x4ee038
push 1
lea eax, [esp + 0x17]
push eax
push ebp
call fcn.004edab0
mov dword [esp + 0x20], eax
jmp 0x4ee04f
push 0
lea eax, [esp + 0x24]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x4ee083
cmp dword [ebp + 4], 0
je 0x4ee061
inc dword [ebp + 0xc]
jmp 0x4ee083
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebp]
mov dword [esp + 0x28], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x1c]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x4ee0b0
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x10], 0
cmp dword [edi + 0x1c], 0
jne 0x4ee1c7
cmp dword [edi + 0x14], 1
push ebx
push ebp
jne 0x4ee0fd
mov eax, dword [edi + 0xc]
lea ecx, [esp + 0x10]
push 1
neg eax
cdq
push ecx
push eax
push dword [edi]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [edi + 8]
mov dword [edi + 0x14], 0
mov dword [edi + 0xc], eax
mov eax, dword [edi + 0xc]
push esi
mov esi, dword [esp + 0x24]
cmp eax, esi
jle 0x4ee186
mov ecx, dword [edi + 4]
sub ecx, eax
mov eax, esi
add ecx, dword [edi + 8]
sub eax, 1
je 0x4ee16f
sub eax, 1
je 0x4ee156
sub eax, 2
je 0x4ee13f
push esi
push dword [esp + 0x24]
push ecx
call fcn.004abb90
add esp, 0xc
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov ax, word [eax]
mov word [ecx], ax
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov eax, dword [esp + 0x20]
mov al, byte [eax]
mov byte [ecx], al
mov eax, esi
sub dword [edi + 0xc], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
push edi
call fcn.00480350
mov eax, dword [edi + 8]
cmp esi, eax
jl 0x4ee1b5
push 0
lea eax, [esp + 0x20]
push eax
push esi
push dword [esp + 0x2c]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x1c]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret 0xc
mov ecx, dword [edi + 4]
sub ecx, dword [edi + 0xc]
push esi
push dword [esp + 0x24]
add ecx, eax
jmp 0x4ee127
xor eax, eax
pop edi
add esp, 8
ret 0xc

Function at 0x4eef4f
Capabilities:
Hash data using sha256

Disassembly:
mov eax, dword [esp + 4]
push 0x20
pop ecx
push ecx
and dword [eax + 0x40], 0
and dword [eax + 0x44], 0
mov dword [eax + 0x68], ecx
add eax, 0x48
push 0x554ec0
push eax
call fcn.004abb90
add esp, 0xc
ret
Function at 0x4f07e3
Capabilities:
Hash data using sha384

Disassembly:
mov eax, dword [esp + 4]
push 0x40
push 0x5551c0
and dword [eax + 0x80], 0
and dword [eax + 0x84], 0
mov dword [eax + 0xc8], 0x30
add eax, 0x88
push eax
call fcn.004abb90
add esp, 0xc
ret

Function at 0x4f0815
Capabilities:
Hash data using sha512

Disassembly:
mov eax, dword [esp + 4]
push 0x40
pop ecx
push ecx
and dword [eax + 0x80], 0
and dword [eax + 0x84], 0
mov dword [eax + 0xc8], ecx
add eax, 0x88
push 0x555180
push eax
call fcn.004abb90
add esp, 0xc
ret
Function at 0x4f3f59
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov edx, dword [esp + 4]
test edx, edx
jne 0x4f3f6a
mov eax, dword [esp + 0xc]
jmp 0x4f404c
mov ecx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
not ecx
cmp esi, 8
jb 0x4f402b
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x56fbd0]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x56fbd0]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x56fbd0]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x56fbd0]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x56fbd0]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x56fbd0]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x56fbd0]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x56fbd0]
sub edi, 1
jne 0x4f3f84
pop edi
test esi, esi
je 0x4f4047
movzx eax, byte [edx]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x56fbd0]
inc edx
sub esi, 1
jne 0x4f402f
not ecx
mov eax, ecx
pop esi
ret 0xc
Function at 0x4f40c0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0x94
test dword [esp + 0xa0], 0x10000
je 0x4f4252
push ebx
mov ebx, dword [esp + 0x9c]
test ebx, ebx
je 0x4f4251
mov eax, dword [ebx]
cdq
push ebp
mov ebp, dword [ebx + 4]
and edx, 7
push esi
add eax, edx
push edi
mov edi, dword [esp + 0xb4]
sar eax, 3
mov dword [esp + 0x10], eax
test edi, edi
jne 0x4f410c
mov edi, 0x57f684
mov eax, dword [esp + 0xb8]
cmp eax, 0x18
jne 0x4f4130
push edi
call fcn.004add60
mov edi, eax
mov esi, edi
lea eax, [esi + 1]
mov cl, byte [esi]
inc esi
test cl, cl
jne 0x4f4125
sub esi, eax
jmp 0x4f4169
cmp eax, 0x19
jne 0x4f4153
mov esi, edi
lea ecx, [esi + 2]
lea ebx, [ebx]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4f4140
sub esi, ecx
sar esi, 1
add esi, esi
jmp 0x4f4169
push edi
call fcn.004923e0
mov edi, eax
mov esi, edi
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4f4160
sub esi, ecx
push esi
push edi
cmp esi, ebp
jle 0x4f41bc
mov esi, dword [esp + 0xb4]
push ebx
mov eax, dword [esi + 0xc]
call eax
mov eax, dword [esi + 0x10]
push ebx
call eax
mov esi, dword [esp + 0x10]
lea eax, [ebx + 8]
push esi
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.004abb90
mov eax, ebp
sub eax, esi
push eax
lea eax, [esp + 0x24]
add eax, esi
push 0
push eax
call fcn.004920b0
mov eax, dword [esp + 0xc4]
add esp, 0x18
mov eax, dword [eax + 8]
push 1
push ebx
call eax
jmp 0x4f41dc
lea eax, [esp + 0x1c]
push eax
call fcn.004abb90
mov eax, ebp
sub eax, esi
push eax
lea eax, [esp + 0x24]
add eax, esi
push 0
push eax
call fcn.004920b0
add esp, 0x18
push ebp
lea eax, [esp + 0x18]
push eax
lea esi, [ebx + 0x48]
push esi
call fcn.004abb90
add esp, 0xc
test ebp, ebp
jle 0x4f4211
lea eax, [esp + 0x14]
mov ecx, ebp
jmp 0x4f4200
xor byte [eax], 0x36
lea eax, [eax + 1]
xor byte [esi], 0x5c
lea esi, [esi + 1]
sub ecx, 1
jne 0x4f4200
push ebp
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0xb4]
push ebx
mov eax, dword [eax + 0xc]
call eax
mov eax, dword [esp + 0xb8]
cmp eax, 0x18
jne 0x4f4243
push edi
call fcn.00492470
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret 0x14
cmp eax, 0x19
je 0x4f424e
push edi
call fcn.00492470
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret 0x14
Function at 0x4f5754
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00509140
mov eax, dword [0xd8f3a8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.0050a776
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4f5796
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4f58f2
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00513e40
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0xd92030]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.00523c1b
mov ecx, dword [esi*4 + 0xd92030]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x4f58eb
cmp eax, dword [ecx + edi + 0x24]
jne 0x4f58eb
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4f58eb
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00523c1b
add esp, 0x14
test edx, edx
jl 0x4f58eb
jg 0x4f5861
test eax, eax
jb 0x4f58eb
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4f58eb
jl 0x4f587b
cmp dword [ebp - 0x1008], eax
ja 0x4f58eb
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x4f5899
test ebx, ebx
je 0x4f58d2
cmp ecx, edi
jae 0x4f58d2
mov al, byte [ecx]
cmp al, 0xd
jne 0x4f58b3
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4f58bf
cmp byte [ecx + 1], 0xa
jne 0x4f58bf
inc ecx
jmp 0x4f58bf
movzx eax, al
movsx eax, byte [eax + 0xd8f3f0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x4f5899
cmp edx, ebx
jne 0x4f5899
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4f58f0
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0050a7aa
leave
ret

Function at 0x4f5d50
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0xc]
mov eax, dword [edi]
test eax, eax
je 0x4f5d88
push 0
lea ecx, [esp + 0x10]
push ecx
push esi
push dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4f5d83
xor eax, eax
cmp dword [esp + 0xc], esi
pop edi
sete al
pop esi
ret
pop edi
xor eax, eax
pop esi
ret
mov eax, dword [edi + 4]
add eax, dword [edi + 8]
push esi
push dword [esp + 0x14]
push eax
call fcn.004abb90
add dword [edi + 8], esi
add esp, 0xc
mov eax, 1
pop edi
pop esi
ret
Function at 0x4f6a40
Capabilities:
Get thread local storage value

Disassembly:
push dword [0xd8e6c8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax]
add eax, dword [esp + 4]
ret 4

Function at 0x4f6b78
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0xd91d7c], 0
push ebx
push esi
mov esi, 0xd91d84
jne 0x4f6ba4
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
mov dword [0xd91d9c], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0xd91d7c], 1
push dword [0xd91d9c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x4f6c41
push 0x14
push 8
push dword [0xd8fb84]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x4f6c6b
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0xd91d80]
test eax, eax
je 0x4f6be6
mov dword [eax], ebx
push edi
push esi
mov dword [ebx + 4], eax
mov dword [0xd91d80], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edi, [ebx + 0x10]
push 0
push 0
push 0x100000
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 8
push 0xffffffffffffffff
push ebx
push 0x4f6cee
push dword [edi]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push ebx
push dword [0xd91d9c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
push 0xc
push 0
push dword [0xd8fb84]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x4f6c6b
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 8], ecx
mov ecx, dword [ebx + 8]
mov dword [eax], ecx
mov dword [ebx + 8], eax
pop esi
pop ebx
ret 8
Function at 0x4f8fad
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x557d20
push 0x557d18
push str.FlsAlloc
push 0x1f
call fcn.004f95a5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4f8fe1
push dword [ebp + 8]
mov ecx, esi
call dword [0x582854]
call esi
jmp 0x4f8fe7
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4f902b
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x557d30
push 0x557d28
push str.FlsGetValue
push 0x21
call fcn.004f95a5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4f9062
push dword [ebp + 8]
mov ecx, esi
call dword [0x582854]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4f906a
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x557d38
push 0x557d30
push str.FlsSetValue
push 0x22
call fcn.004f95a5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4f90a4
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x582854]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x515a69
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0xd92030]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x515aa9
cmp byte [ebx], 0xa
jne 0x515aa9
or byte [edi + eax + 0x28], 4
jmp 0x515aae
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x515bad
mov dl, byte [eax]
cmp dl, 0x1a
je 0x515b90
inc eax
cmp dl, 0xd
je 0x515ada
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x515b00
cmp eax, ecx
jae 0x515b0e
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x515ac2
jmp 0x515bad
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x515b8b
cmp dword [ebp - 0x10], 0
je 0x515b8b
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0xd92030]
test byte [eax + edi + 0x28], 0x48
je 0x515b65
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x515b50
mov byte [esi], dl
jmp 0x515b61
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0xd92030]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x515bad
cmp byte [ebp - 1], 0xa
jne 0x515b74
cmp esi, ebx
jne 0x515b74
mov byte [esi], 0xa
jmp 0x515bac
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00523bbd
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x515bad
mov byte [esi], 0xd
jmp 0x515bac
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0xd92030]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x515baa
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x515bad
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret