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

Disassembly:
sub esp, 8
push ebx
mov ebx, dword [esp + 0x10]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
mov esi, dword [esp + 0x1c]
push edi
push 1
mov dword [esi], 0
mov edi, dword [ebx + 4]
push 0
push 0
push edi
call ebp
mov dword [esp + 0x10], eax
lea eax, [esp + 0x20]
push 0
push eax
lea ecx, [esp + 0x24]
push 4
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4dd01a
mov edx, dword [ebx + 0xc]
lea eax, [ebx + 0x10]
lea ecx, [ebx + 0x34]
push eax
push edx
mov dword [esp + 0x1c], ecx
push ecx
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x28]
push 4
push eax
push ecx
call fcn.004e1800
mov eax, dword [esp + 0x38]
add esp, 0x18
cmp eax, 4
jb 0x4dd01a
mov edx, dword [esp + 0x1c]
add edx, 8
push edx
call fcn.004d70a0
add esp, 4
mov dword [esi], eax
push 1
push 0
push 0
push edi
call ebp
mov edx, dword [esi]
mov ecx, dword [esp + 0x1c]
mov ebp, eax
lea eax, [esp + 0x20]
push 0
push eax
add edx, 8
push ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4dd009
mov eax, dword [esi]
mov dword [eax], 1
mov ecx, dword [esp + 0x20]
mov dword [eax + 4], ecx
mov edx, dword [ebx + 0xc]
mov ecx, dword [esp + 0x20]
lea eax, [ebx + 0x10]
push eax
mov eax, dword [esp + 0x18]
push edx
mov edx, dword [esi]
push eax
add edx, 8
push ecx
push edx
push ebp
call fcn.004e1800
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
add esp, 0x18
cmp eax, ecx
jne 0x4dd01a
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov ecx, dword [esi]
push ecx
call fcn.004d71b0
add esp, 4
mov dword [esi], 0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret
Function at 0x4dd960
Capabilities:
Get file size

Disassembly:
push esi
mov esi, dword [esp + 0xc]
test esi, esi
jne 0x4dd96e
or eax, 0xffffffff
pop esi
ret
push esi
call fcn.004e1e10
add esp, 4
test eax, eax
jne 0x4dd980
or eax, 0xffffffff
pop esi
ret
mov ecx, dword [esi]
or eax, 0xffffffff
cmp ecx, 1
je 0x4dd99e
cmp ecx, 3
je 0x4dd99e
cmp ecx, 2
jne 0x4dd9ad
mov ecx, dword [esi + 4]
call fcn.004e2420
pop esi
ret
mov esi, dword [esi + 4]
lea eax, [esp + 0xc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
pop esi
ret
Function at 0x4ddd30
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
test edi, edi
jne 0x4ddd45
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
push edi
call fcn.004e1e10
add esp, 4
test eax, eax
jne 0x4ddd58
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov esi, dword [esp + 0x28]
test esi, esi
jg 0x4ddd68
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov eax, dword [edi]
xor ebx, ebx
cmp eax, 1
jne 0x4dddc1
mov edi, dword [edi + 4]
push esi
call fcn.004fc4e3
add esp, 4
mov ebp, eax
lea eax, [esp + 0x1c]
push ebx
push eax
push esi
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4ddda3
push ebp
call fcn.004fc50c
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov ecx, dword [esp + 0x1c]
push ecx
push ebp
call fcn.004e1bd0
push ebp
mov ebx, eax
call fcn.004fc50c
add esp, 0xc
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
cmp eax, 2
jne 0x4dde0c
mov edi, dword [edi + 4]
lea edx, [esi + 8]
push edx
call fcn.004d70f0
mov ebx, eax
add esp, 4
lea ecx, [ebx + 8]
mov dword [ebx], 1
mov dword [ebx + 4], esi
mov eax, dword [edi]
push esi
push ecx
mov ecx, edi
call dword [eax + 0x20]
test eax, eax
jne 0x4dde01
push ebx
call fcn.004d71b0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
mov dword [ebx + 4], eax
pop esi
mov eax, ebx
pop ebp
pop ebx
pop ecx
ret
cmp eax, 3
jne 0x4dde85
mov ebx, dword [edi + 4]
push esi
call fcn.004fc4e3
add esp, 4
mov ebp, eax
push 1
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [esp + 0x1c]
push 0
push edx
push esi
push ebp
push ebx
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4dde55
push ebp
call fcn.004fc50c
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x1c]
lea ecx, [edi + 0x10]
add edi, 0x34
push ecx
push edx
push edi
mov esi, eax
push eax
mov eax, dword [esp + 0x20]
push ebp
push eax
call fcn.004e1800
push esi
push ebp
call fcn.004e1bd0
push ebp
mov ebx, eax
call fcn.004fc50c
add esp, 0x24
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
pop ecx
ret
Function at 0x4de0e0
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x10
push edi
mov edi, dword [esp + 0x1c]
test edi, edi
jne 0x4de0f6
mov eax, 1
pop edi
add esp, 0x10
ret
push edi
call fcn.004e1e10
add esp, 4
test eax, eax
jne 0x4de10d
mov eax, 1
pop edi
add esp, 0x10
ret
mov eax, dword [edi]
push ebx
push ebp
mov ebp, 1
cmp eax, ebp
push esi
mov dword [esp + 0x10], ebp
je 0x4de1b1
cmp eax, 3
je 0x4de1b1
cmp eax, 2
jne 0x4de255
mov esi, dword [edi + 4]
mov ecx, esi
call fcn.004e2420
mov ebx, eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x14]
mov edi, eax
cmp edi, ebx
jae 0x4de255
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x10], 0
test eax, eax
je 0x4de255
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4de255
mov edx, dword [esi]
lea eax, [esp + 0x28]
push ebp
push eax
mov ecx, esi
call dword [edx + 0x20]
mov edx, dword [esi]
push 0
push edi
mov ecx, esi
mov ebx, eax
call dword [edx + 0x18]
test ebx, ebx
je 0x4de255
mov al, byte [esp + 0x28]
test al, al
je 0x4de1a3
cmp al, 0x1a
jne 0x4de255
mov dword [esp + 0x10], ebp
mov eax, ebp
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x10
ret
mov esi, dword [edi + 4]
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push esi
mov dword [esp + 0x24], eax
call ebp
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4de255
cmp ebx, dword [esp + 0x14]
jae 0x4de255
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x10], 0
test eax, eax
je 0x4de255
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4de255
lea ecx, [esp + 0x1c]
push 0
push ecx
lea edx, [esp + 0x30]
push 1
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push ebx
push esi
mov dword [esp + 0x24], eax
call ebp
cmp dword [edi], 3
jne 0x4de239
mov ecx, dword [edi + 0xc]
lea eax, [edi + 0x10]
push eax
add edi, 0x34
push ecx
push edi
lea edx, [esp + 0x34]
push 1
push edx
push ebx
call fcn.004e1800
add esp, 0x18
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4de255
mov al, byte [esp + 0x28]
test al, al
je 0x4de24d
cmp al, 0x1a
jne 0x4de255
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x10
ret
Function at 0x4defa0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push esi
lea eax, [esp + 0x14]
push edi
push eax
mov dword [esp + 0x1c], 0x44
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov eax, dword [esp + 0x84]
xor edi, edi
cmp eax, edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x44], 1
je case.0x4defe1.2
mov ecx, dword [esp + 0x7c]
lea eax, [ecx - 1]
cmp eax, 5
ja case.0x4defe1.2
jmp dword [eax*4 + 0x4df06c]
mov word [esp + 0x48], di
jmp 0x4df01a
mov word [esp + 0x48], 2
jmp 0x4df01a
mov word [esp + 0x48], 3
jmp 0x4df01a
mov word [esp + 0x48], 4
jmp 0x4df01a
mov word [esp + 0x48], 7
jmp 0x4df01a
mov word [esp + 0x48], 5
lea edx, [esp + 8]
mov ecx, dword [esp + 0x64]
lea eax, [esp + 0x18]
push edx
push eax
push edi
push edi
push edi
push 1
push edi
push edi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
cmp esi, edi
je 0x4df064
cmp dword [esp + 0x70], edi
je 0x4df050
mov edx, dword [esp + 8]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
mov ecx, dword [esp + 0xc]
push ecx
call edi
mov eax, esi
pop edi
pop esi
add esp, 0x54
ret

Function at 0x4df090
Capabilities:
Set file attributes

Disassembly:
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret

Function at 0x4e10c0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
mov ebp, edx
push esi
push edi
mov esi, ebp
xor edi, edi
and esi, 3
mov eax, ecx
jle 0x4e10e1
mov dl, byte [eax]
inc eax
cmp dl, bl
je 0x4e113b
inc edi
cmp edi, esi
jl 0x4e10d5
mov edi, ebx
and edi, 0xff
mov esi, edi
shl esi, 8
or esi, edi
shl esi, 8
or esi, edi
shl esi, 8
or esi, edi
lea edi, [ecx + ebp]
cmp eax, edi
jae 0x4e1170
mov edx, dword [eax]
xor edx, esi
lea ebp, [edx - 0x1010101]
not edx
and ebp, edx
test ebp, 0x80808080
je 0x4e112a
cmp byte [eax], bl
je 0x4e1145
cmp byte [eax + 1], bl
je 0x4e114e
cmp byte [eax + 2], bl
je 0x4e1158
cmp byte [eax + 3], bl
je 0x4e1164
add eax, 4
cmp eax, edi
jb 0x4e1101
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret 4
pop edi
sub eax, ecx
pop esi
pop ebp
dec eax
pop ebx
ret 4
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
ret 4
pop edi
sub eax, ecx
pop esi
pop ebp
inc eax
pop ebx
ret 4
pop edi
sub eax, ecx
pop esi
pop ebp
add eax, 2
pop ebx
ret 4
pop edi
sub eax, ecx
pop esi
pop ebp
add eax, 3
pop ebx
ret 4
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret 4
Function at 0x4e1610
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x108
push ebx
push ebp
push esi
push edi
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x19]
mov byte [esp + 0x18], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esp + 0x11c]
lea eax, [esp + 0x18]
mov ebx, edi
xor esi, esi
xor ecx, ecx
sub ebx, eax
mov eax, ecx
lea ebp, [esp + ecx + 0x18]
cdq
idiv dword [esp + 0x124]
mov eax, dword [esp + 0x120]
mov byte [ebx + ebp], cl
inc ecx
cmp ecx, 0x100
mov dl, byte [edx + eax]
mov byte [ebp], dl
jl 0x4e1642
lea ebp, [esp + 0x18]
mov eax, edi
sub ebp, edi
mov dword [esp + 0x10], 0x100
mov cl, byte [eax]
xor edx, edx
mov dl, byte [eax + ebp]
mov byte [esp + 0x14], cl
mov ebx, dword [esp + 0x14]
add esi, edx
and ebx, 0xff
add esi, ebx
and esi, 0x800000ff
jns 0x4e16a2
dec esi
or esi, 0xffffff00
inc esi
mov dl, byte [esi + edi]
mov byte [eax], dl
mov byte [esi + edi], cl
mov ecx, dword [esp + 0x10]
inc eax
dec ecx
mov dword [esp + 0x10], ecx
jne 0x4e1679
xor al, al
mov byte [edi + 0x100], al
mov byte [edi + 0x101], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x108
ret

Function at 0x4e1750
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ecx
mov eax, dword [esp + 0x10]
push esi
push edi
mov edi, dword [esp + 0x14]
mov cl, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
xor esi, esi
mov byte [esp + 0x18], cl
test edi, edi
mov byte [esp + 8], dl
jle 0x4e17ec
mov edx, dword [esp + 0x10]
push ebx
push ebp
mov cl, byte [esp + 0x20]
mov bl, byte [esp + 0x10]
inc cl
mov byte [esp + 0x20], cl
mov ecx, dword [esp + 0x20]
and ecx, 0xff
lea edi, [ecx + eax]
mov cl, byte [ecx + eax]
add bl, cl
mov byte [esp + 0x10], bl
mov ebx, dword [esp + 0x10]
and ebx, 0xff
lea ebp, [ebx + eax]
mov bl, byte [ebx + eax]
mov byte [edi], bl
mov byte [ebp], cl
mov bl, byte [edi]
add bl, cl
and ebx, 0xff
mov cl, byte [ebx + eax]
mov bl, byte [esi + edx]
xor bl, cl
mov ecx, dword [esp + 0x1c]
mov byte [esi + edx], bl
inc esi
cmp esi, ecx
jl 0x4e177b
mov dl, byte [esp + 0x20]
mov cl, byte [esp + 0x10]
pop ebp
pop ebx
pop edi
mov byte [eax + 0x100], dl
mov byte [eax + 0x101], cl
pop esi
pop ecx
ret
pop edi
mov byte [eax + 0x100], cl
mov byte [eax + 0x101], dl
pop esi
pop ecx
ret

Function at 0x4ea590
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 0x4ea5f6
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 0x4ea5f6
push 0
call ebx
call esi
sub eax, edi
cmp eax, 0xbb8
jb 0x4ea5d7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret
Function at 0x4ea980
Capabilities:
Create http request

Disassembly:
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x4ea9b8
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 0x4eb640
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 0x4eb689
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 0x4ebb00
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5048b0
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.004eb6b0
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.004eb730
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.004eb730
lea ecx, [esi + 0xc]
call fcn.004fc72d
lea ecx, [esi + 0x10]
call fcn.004fc72d
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.004eccd0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.004eccd0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.004eccd0
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.004fc7a2
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.004fc7a2
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x4fd057
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x504cc4
call fcn.004efebc
sub esp, 0x18
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], esi
mov eax, dword [esi + 0x48]
mov edi, dword [esi + 0x44]
mov dword [ebp - 0x18], eax
call fcn.00502afc
cmp dword [esi + 0x40], 0
mov ebx, dword [eax + 0xc]
je 0x4fd096
call fcn.00502afc
mov ebx, dword [eax + 0xc]
push 5
push dword [esi + 0x40]
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x4fd0a4
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4fd0b2
or eax, 0xffffffff
jmp 0x4fd19a
mov ecx, esi
call fcn.004fcfcd
mov dword [ebp - 0x14], eax
call fcn.004fe09d
xor edi, edi
cmp dword [ebp - 0x14], edi
mov dword [ebp - 0x20], edi
je 0x4fd0e9
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x4fd0e9
push edi
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
mov dword [ebp - 0x20], 1
push esi
mov dword [ebp - 4], edi
call fcn.004fe051
push dword [ebp - 0x14]
call fcn.004fdb83
push ebx
push eax
push dword [ebp - 0x18]
mov ecx, esi
call fcn.004fcd65
cmp eax, edi
je 0x4fd15c
test byte [esi + 0x24], 0x10
je 0x4fd12a
push 4
mov ecx, esi
pop ebx
call fcn.004fd583
test ah, 1
je 0x4fd122
push 5
pop ebx
push ebx
mov ecx, esi
call fcn.004ffba9
cmp dword [esi + 0x1c], edi
je 0x4fd15c
push 0x97
push edi
push edi
push edi
push edi
push edi
mov ecx, esi
call fcn.004fd5b7
jmp 0x4fd15c
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x20], edi
je 0x4fd170
push 1
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp dword [ebp - 0x14], edi
je 0x4fd189
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x1c]
jne 0x4fd189
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x58]
mov ecx, esi
call fcn.004fd007
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret

Function at 0x4ffa57
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 0x4ffa99
call fcn.00502afc
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4ffa99
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4ffa90
xor eax, eax
jmp 0x4ffaa1
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004ffaa7
pop edi
pop esi
pop ebx
ret 4
Function at 0x5030f7
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 0x503125
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x503143
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0050305d
jmp 0x503143
mov eax, dword [esi + 0x14]
test eax, eax
je 0x503143
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0050305d
test edi, edi
mov eax, edi
jne 0x50312d
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401620
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, edx
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x4c
lea eax, [esp + 0x10]
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__fstati64]
test eax, eax
jne 0x401683
mov esi, dword [esp + 0x28]
test esi, esi
js 0x401683
mov dword [esp], esi
call sub.msvcrt.dll_malloc
test eax, eax
mov edi, eax
je 0x401683
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.msvcrt.dll__read
cmp esi, eax
jne 0x4016a3
mov dword [esp], ebx
call sub.msvcrt.dll__close
test ebp, ebp
je 0x4016c0
mov dword [ebp], esi
mov eax, edi
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [sym.imp.msvcrt.dll__errno]
call esi
mov ebp, dword [eax]
mov dword [esp], ebx
call sub.msvcrt.dll__close
call esi
mov dword [eax], ebp
add esp, 0x4c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [sym.imp.msvcrt.dll__errno]
call esi
mov ebp, dword [eax]
mov dword [esp], ebx
call sub.msvcrt.dll__close
mov dword [esp], edi
call fcn.00431918
jmp 0x401695
mov eax, edi
jmp 0x40167b

Function at 0x4016d0
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, edx
sub esp, 0x18
mov dword [esp + 4], 0x8000
mov dword [esp], eax
call sub.msvcrt.dll__open
test eax, eax
js 0x4016f5
add esp, 0x18
mov edx, ebx
pop ebx
jmp fcn.00401620
add esp, 0x18
xor eax, eax
pop ebx
ret

Function at 0x401ca0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x220
lea ebx, [ebp - 0x210]
mov dword [esp + 4], ebx
mov dword [esp], 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
sub eax, 1
sub esp, 8
cmp eax, 0x102
ja 0x401d10
lea esi, [ebp - 0x10c]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], str.fastboot
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
sub esp, 0x10
test eax, eax
je 0x401d40
mov dword [esp], esi
mov dword [esp + 4], str.wbTD
call sub.msvcrt.dll_fopen
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], str.GetTempPath_failed__error__ld_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00431b40
lea esp, [ebp - 8]
xor eax, eax
pop ebx
pop esi
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], str.GetTempFileName_failed__error__ld_n
mov dword [esp + 8], eax
jmp 0x401d22
Function at 0x401e70
Capabilities:
Query environment variable

Disassembly:
push edi
mov ecx, 5
push esi
mov edi, str.boot
push ebx
sub esp, 0x1a0
mov esi, dword [esp + 0x1b0]
mov ebx, dword [esp + 0x1b4]
repe cmpsb byte [esi], byte es:[edi]
je 0x401f02
mov esi, dword [esp + 0x1b0]
mov edi, str.recovery
mov ecx, 9
repe cmpsb byte [esi], byte es:[edi]
jne 0x401f71
test ebx, ebx
mov esi, str.recovery.img
jne 0x401f0b
mov dword [esp], str.ANDROID_PRODUCT_OUT
call sub.msvcrt.dll_getenv
test eax, eax
je 0x40205a
cmp byte [eax], 0
je 0x40205a
lea ebx, [esp + 0x1c]
mov dword [esp + 0xc], esi
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str._s__s
call fcn.00431b70
mov dword [esp], ebx
call sub.msvcrt.dll__strdup
add esp, 0x1a0
pop ebx
pop esi
pop edi
ret
mov esi, str.boot.img
test ebx, ebx
je 0x401eb7
lea edi, [esp + 0x1c]
mov dword [esp], edi
call fcn.004048d0
mov edx, edi
mov ecx, dword [edx]
add edx, 4
lea eax, [ecx - 0x1010101]
not ecx
and eax, ecx
and eax, 0x80808080
je 0x401f19
mov ecx, eax
shr ecx, 0x10
test eax, 0x8080
cmove eax, ecx
lea ecx, [edx + 2]
cmove edx, ecx
add al, al
sbb edx, 3
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], str..._.._.._target_product__s__s
mov dword [esp], edx
call fcn.00431b70
mov dword [esp], edi
call sub.msvcrt.dll__strdup
add esp, 0x1a0
pop ebx
pop esi
pop edi
ret
mov esi, dword [esp + 0x1b0]
mov edi, 0x44022c
mov ecx, 7
repe cmpsb byte [esi], byte es:[edi]
je 0x402021
mov esi, dword [esp + 0x1b0]
mov edi, str.vendor
mov ecx, 7
repe cmpsb byte [esi], byte es:[edi]
je 0x402030
mov esi, dword [esp + 0x1b0]
mov edi, str.userdata
mov ecx, 9
repe cmpsb byte [esi], byte es:[edi]
je 0x402040
mov esi, dword [esp + 0x1b0]
mov edi, str.cache
mov ecx, 6
repe cmpsb byte [esi], byte es:[edi]
je 0x402050
mov esi, dword [esp + 0x1b0]
mov edi, str.info
mov ecx, 5
repe cmpsb byte [esi], byte es:[edi]
mov esi, str.android_info.txt
seta dl
setb al
cmp dl, al
je 0x401f07
mov eax, dword [esp + 0x1b0]
mov dword [esp + 4], str.unknown_partition__s_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00431b40
xor eax, eax
jmp 0x401f67
mov esi, str.system.img
jmp 0x401f07
mov esi, str.vendor.img
jmp 0x401f07
mov esi, str.userdata.img
jmp 0x401f07
mov esi, str.cache.img
jmp 0x401f07
mov dword [esp], str.neither__p_product_specified_nor_ANDROID_PRODUCT_OUT_set
call fcn.00404120
lea esi, [esi]
lea edi, [edi]