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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dc29a
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x523f10]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
push 0x50b9e4
xor esi, esi
push eax
mov dword [ebp - 0x18], esi
call fcn.004be418
mov ebx, eax
add esp, 8
cmp ebx, esi
jne 0x487e08
mov ecx, dword [0x52a0c0]
mov eax, dword [ebp + 8]
mov dword [eax], ecx
cmp ecx, esi
je 0x487df6
inc dword [ecx + 0x30]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 2
push esi
push ebx
call fcn.004beb9c
add esp, 0xc
push ebx
call fcn.004bea6d
mov edi, eax
add esp, 4
mov dword [ebp - 0x10], esi
cmp edi, esi
jne 0x487e59
push ebx
call fcn.004bec98
mov edx, dword [0x52a0c0]
mov eax, dword [ebp + 8]
mov ecx, edx
add esp, 4
mov dword [eax], edx
cmp ecx, esi
je 0x487f79
inc dword [ecx + 0x30]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push esi
push ebx
call fcn.004beb9c
lea eax, [edi + 4]
add esp, 0xc
push eax
call fcn.004ba3e2
add esp, 4
push ebx
push edi
mov esi, eax
push 1
push esi
call fcn.004be6cf
push ebx
mov edi, eax
call fcn.004bec98
add esp, 0x14
push 0
push edi
push esi
mov byte [esi + edi], 0
mov byte [esi + edi + 1], 0
mov byte [esi + edi + 2], 0
mov byte [esi + edi + 3], 0
call dword [sym.imp.ADVAPI32.dll_IsTextUnicode]
test al, al
jne 0x487eeb
cmp byte [esi], 0xef
mov eax, 2
jne 0x487ec6
cmp byte [esi + 1], 0xbb
jne 0x487ec6
cmp byte [esi + 2], 0xbf
jne 0x487ec6
lea ecx, [eax + 1]
lea eax, [ecx - 2]
jmp 0x487ec9
mov ecx, dword [ebp - 0x10]
push eax
lea ebx, [esi + ecx]
call fcn.00486550
add esp, 4
push esi
mov edi, eax
call fcn.004ba2c5
add esp, 4
mov esi, edi
mov dword [ebp - 0x10], 0
jmp 0x487f0f
mov al, byte [esi]
cmp al, 0xef
jne 0x487efe
cmp byte [esi + 1], 0xff
jne 0x487efe
mov dword [ebp - 0x10], 2
cmp al, 0xff
jne 0x487f0f
cmp byte [esi + 1], 0xfe
jne 0x487f0f
mov dword [ebp - 0x10], 2
test esi, esi
jne 0x487f37
mov ecx, dword [0x52a0c0]
mov eax, dword [ebp + 8]
mov dword [eax], ecx
test ecx, ecx
je 0x487f79
inc dword [ecx + 0x30]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0x14]
push 0
lea ecx, [esi + edx]
push eax
call fcn.00487bc0
push esi
call fcn.004ba2c5
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp + 8]
add esp, 0xc
mov dword [esi], eax
test eax, eax
je 0x487f60
inc dword [eax + 0x30]
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0
push ecx
mov dword [ebp - 0x18], 1
call fcn.00488650
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x48b8e0
Capabilities:
Link many functions at runtime

Disassembly:
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push edi
push str.ntdll.dll
call esi
mov edi, eax
test edi, edi
je 0x48b979
push str.GetFinalPathNameByHandleW
push str.Kernel32.dll
call esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call esi
push str.NtQueryObject
push edi
mov dword [0x529c64], eax
call esi
push str.NtOpenSymbolicLinkObject
push edi
mov dword [0x529c88], eax
call esi
push str.NtQuerySymbolicLinkObject
push edi
mov dword [0x529c8c], eax
call esi
push str.ZwClose
push edi
mov dword [0x529c90], eax
call esi
push 0x68
push 0xff
push 0x52a138
mov dword [0x529c84], eax
call fcn.004ba4b0
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
add esp, 0xc
push 0x52a120
call esi
push 0x52a104
call esi
mov dword [0x529c60], 1
pop edi
pop esi
ret
Function at 0x48d870
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d7738
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x523f10]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x10]
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 8]
push eax
push ecx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
test esi, esi
jbe 0x48d911
push esi
call fcn.004aad61
mov edi, eax
add esp, 4
test edi, edi
je 0x48d911
mov edx, dword [ebp + 8]
push edi
push esi
push 0
push edx
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x48d908
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x48d8f5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push edi
call fcn.004aad6c
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x48d937
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x48e460
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [edi + 8]
sub esp, 8
test eax, eax
je 0x48e553
mov ecx, dword [edi + 0x10]
push ebx
push esi
push 1
push ecx
push 0x30
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
movzx edx, word [edi]
mov eax, dword [edi + 4]
push 5
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ecx, dword [edi + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
mov ecx, esi
mov dword [ebp - 8], esi
call fcn.0048dec0
mov ebx, eax
mov eax, esi
mov dword [ebp - 4], 0
call fcn.0048dea0
xor edx, edx
cmp dx, word [eax]
jae 0x48e53c
mov esi, dword [ebp - 8]
lea ebx, [ebx]
cmp dword [ebp - 4], 0
jne 0x48e4de
mov eax, dword [edi + 8]
push 5
push eax
jmp 0x48e4e1
push 2
push esi
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
je 0x48e53c
lea ecx, [ecx]
push esi
call dword [sym.imp.USER32.dll_GetDlgCtrlID]
cmp eax, dword [ebx + 0x14]
je 0x48e50d
push 2
push esi
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
jne 0x48e4f0
jmp 0x48e53c
test esi, esi
je 0x48e53c
mov ecx, dword [edi + 0x10]
push 1
push ecx
push 0x30
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, ebx
call fcn.0048df60
inc dword [ebp - 4]
mov ebx, eax
mov eax, dword [ebp - 8]
call fcn.0048dea0
movzx edx, word [eax]
cmp dword [ebp - 4], edx
jl 0x48e4d0
mov eax, dword [edi + 0xc]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
xor eax, eax
pop esi
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x48e560
Capabilities:
Encode data using xor
Encrypt data using aes

Disassembly:
push esi
mov esi, ecx
test esi, esi
je 0x48e6fe
test eax, eax
je 0x48e6fe
mov dword [eax + 0xf0], 0xa
mov ecx, dword [esi]
push edi
mov edx, ecx
ror edx, 8
and edx, 0xff00ff00
rol ecx, 8
and ecx, 0xff00ff
or edx, ecx
mov dword [eax], edx
mov edx, dword [esi + 4]
mov edi, edx
ror edi, 8
and edi, 0xff00ff00
rol edx, 8
and edx, 0xff00ff
or edi, edx
mov dword [eax + 4], edi
mov edx, dword [esi + 8]
mov edi, edx
ror edi, 8
and edi, 0xff00ff00
rol edx, 8
and edx, 0xff00ff
or edi, edx
mov dword [eax + 8], edi
mov edx, dword [esi + 0xc]
lea ecx, [eax + 4]
mov esi, edx
ror esi, 8
and esi, 0xff00ff00
rol edx, 8
and edx, 0xff00ff
or esi, edx
mov dword [eax + 0xc], esi
mov edx, esi
shr edx, 0x10
and edx, 0xff
mov edx, dword [edx*4 + 0x508aa0]
xor edx, 0x1000000
mov edi, esi
shr edi, 8
and edi, 0xff
mov edi, dword [edi*4 + 0x508ea0]
and edi, 0xff0000
and edx, 0xff000000
xor edx, edi
mov edi, esi
shr edi, 0x18
movzx edi, byte [edi*4 + 0x5086a0]
xor edx, edi
mov edi, esi
and edi, 0xff
mov edi, dword [edi*4 + 0x5082a0]
and edi, 0xff00
xor edx, edi
xor edx, dword [eax]
mov edi, dword [ecx]
xor edi, edx
mov dword [eax + 0x10], edx
mov edx, dword [eax + 8]
xor edx, edi
mov dword [eax + 0x18], edx
xor edx, esi
mov dword [eax + 0x14], edi
mov dword [eax + 0x1c], edx
mov esi, 0x50a3a4
jmp 0x48e670
mov edx, dword [ecx + 0x18]
add ecx, 0x10
mov eax, edx
shr eax, 8
mov edi, edx
and eax, 0xff
mov eax, dword [eax*4 + 0x508ea0]
shr edi, 0x10
and edi, 0xff
mov edi, dword [edi*4 + 0x508aa0]
and eax, 0xff0000
and edi, 0xff000000
xor eax, edi
mov edi, edx
and edx, 0xff
mov edx, dword [edx*4 + 0x5082a0]
shr edi, 0x18
movzx edi, byte [edi*4 + 0x5086a0]
xor eax, edi
and edx, 0xff00
xor eax, edx
xor eax, dword [ecx - 4]
add esi, 4
xor eax, dword [esi - 4]
mov dword [ecx + 0xc], eax
mov edx, dword [ecx]
xor edx, eax
mov dword [ecx + 0x10], edx
mov eax, dword [ecx + 4]
xor eax, edx
mov dword [ecx + 0x14], eax
mov edx, dword [ecx + 8]
xor edx, eax
mov dword [ecx + 0x18], edx
cmp esi, 0x50a3c8
jne 0x48e670
pop edi
xor eax, eax
pop esi
ret
or eax, 0xffffffff
pop esi
ret
Function at 0x490c30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, eax
xor ebx, ebx
push edi
mov dword [ebp - 4], 0
mov dword [esi + 0x6af80], 2
cmp dword [esi + 0x6af90], ebx
je 0x490e4f
lea ebx, [ebx]
cmp dword [esi + 0x6af90], 3
jb 0x490cb7
mov ecx, dword [esi + 0x6af84]
movzx eax, byte [ecx + esi + 0x1af72]
mov edx, dword [esi + 0x6af7c]
shl edx, 5
xor eax, edx
and eax, 0x7fff
mov dword [esi + 0x6af7c], eax
mov eax, dword [esi + eax*4 + 0x4af70]
and ecx, 0x7fff
mov dword [esi + ecx*4 + 0x2af70], eax
mov ecx, dword [esi + 0x6af84]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x6af7c]
mov dword [esi + eax*4 + 0x4af70], ecx
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x490cf7
mov edx, dword [esi + 0x6af84]
sub edx, ecx
cmp edx, 0x7efa
ja 0x490cf7
mov eax, dword [esi + 0x6af90]
cmp dword [esi + 0x6afa0], eax
jbe 0x490ce2
mov dword [esi + 0x6afa0], eax
mov eax, ecx
call fcn.00490940
mov ebx, eax
mov eax, dword [esi + 0x6af90]
cmp ebx, eax
jbe 0x490cf7
mov ebx, eax
mov eax, dword [esi + 0x6af84]
mov ecx, esi
cmp ebx, 3
jb 0x490ddc
sub eax, dword [esi + 0x6af88]
lea edx, [ebx - 3]
call fcn.00490130
sub dword [esi + 0x6af90], ebx
mov ecx, dword [esi + 0x6af90]
mov dword [ebp - 8], eax
cmp ebx, dword [esi + 0x6af98]
ja 0x490da4
cmp ecx, 3
jb 0x490da4
mov edi, 1
sub ebx, edi
lea esp, [esp]
add dword [esi + 0x6af84], edi
mov edx, dword [esi + 0x6af84]
movzx ecx, byte [esi + edx + 0x1af72]
mov eax, dword [esi + 0x6af7c]
shl eax, 5
xor ecx, eax
and ecx, 0x7fff
mov dword [esi + 0x6af7c], ecx
mov ecx, dword [esi + ecx*4 + 0x4af70]
and edx, 0x7fff
sub ebx, edi
mov dword [esi + edx*4 + 0x2af70], ecx
mov edx, dword [esi + 0x6af84]
mov dword [ebp - 4], ecx
mov ecx, dword [esi + 0x6af7c]
mov dword [esi + ecx*4 + 0x4af70], edx
jne 0x490d40
add dword [esi + 0x6af84], edi
mov eax, dword [ebp - 8]
jmp 0x490df7
add dword [esi + 0x6af84], ebx
mov ecx, dword [esi + 0x6af84]
lea edx, [ecx + esi]
movzx ecx, byte [edx + 0x1af70]
mov dword [esi + 0x6af7c], ecx
movzx edx, byte [edx + 0x1af71]
shl ecx, 5
xor edx, ecx
xor ebx, ebx
and edx, 0x7fff
mov dword [esi + 0x6af7c], edx
jmp 0x490df7
movzx edx, byte [eax + esi + 0x1af70]
xor eax, eax
call fcn.00490130
dec dword [esi + 0x6af90]
inc dword [esi + 0x6af84]
test eax, eax
je 0x490e31
mov ecx, dword [esi + 0x6af74]
test ecx, ecx
jl 0x490e0e
lea edx, [ecx + esi + 0x1af70]
jmp 0x490e10
xor edx, edx
mov eax, dword [esi + 0x6af84]
sub eax, ecx
push edx
xor edi, edi
mov ecx, esi
call fcn.0048ff90
mov ecx, dword [esi + 0x6af84]
add esp, 4
mov dword [esi + 0x6af74], ecx
cmp dword [esi + 0x6af90], 0x106
jae 0x490e42
call fcn.00490ae0
cmp dword [esi + 0x6af90], 0
jne 0x490c60
mov ecx, dword [esi + 0x6af74]
test ecx, ecx
jl 0x490e62
lea edx, [ecx + esi + 0x1af70]
jmp 0x490e64
xor edx, edx
mov eax, dword [esi + 0x6af84]
sub eax, ecx
push edx
mov edi, 1
mov ecx, esi
call fcn.0048ff90
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x491b10
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
test ecx, ecx
jne 0x491b17
xor eax, eax
ret
push esi
not eax
cmp edx, 8
jb 0x491bf4
mov esi, edx
shr esi, 3
push edi
lea esp, [esp]
movzx edi, byte [ecx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x507ea0]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x507ea0]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x507ea0]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x507ea0]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x507ea0]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x507ea0]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x507ea0]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x507ea0]
inc ecx
sub edx, 8
sub esi, 1
jne 0x491b30
pop edi
test edx, edx
je 0x491c1b
jmp 0x491c00
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x507ea0]
inc ecx
sub edx, 1
jne 0x491c00
not eax
pop esi
ret

Function at 0x491c20
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [edx]
movsx ecx, cl
xor ecx, eax
shr eax, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x507ea0]
xor ecx, eax
movzx eax, cl
add eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edx + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x507ea0]
mov dword [edx + 8], ecx
ret
Function at 0x491db0
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
mov esi, eax
push edi
lea eax, [ebp - 0x4c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x491dd6
mov eax, 0x200
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x4c]
mov edx, eax
xor edi, edi
and edx, 1
je 0x491dec
mov dword [ebp - 8], 1
mov edi, dword [ebp - 8]
test al, 2
je 0x491df3
or edi, 2
test al, 4
je 0x491dfa
or edi, 4
mov ecx, eax
and ecx, 0x10
je 0x491e04
or edi, 0x10
test al, 0x20
je 0x491e0b
or edi, 0x20
test ecx, ecx
je 0x491e17
or edi, 0x40000000
jmp 0x491e1d
or edi, 0x80000000
or edi, 0x1000000
mov dword [ebp - 8], edi
test edx, edx
jne 0x491e33
or edi, 0x800000
mov dword [ebp - 8], edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x10], eax
cmp eax, 0x28
jbe 0x491eda
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [ebp - 0xc]
push ecx
push 2
lea edx, [ebp - 4]
push edx
push esi
call ebx
push 0
push 0
push 0x24
push esi
call edi
push 0
lea eax, [ebp - 0xc]
push eax
push 4
lea ecx, [ebp - 0x14]
push ecx
push esi
call ebx
mov edx, 0x54ad
cmp word [ebp - 4], dx
jne 0x491ed7
mov eax, dword [ebp - 0x14]
lea ecx, [eax + 0x34]
cmp dword [ebp - 0x10], ecx
jbe 0x491ed7
push 0
push 0
push eax
push esi
call edi
push 0
lea edx, [ebp - 0xc]
push edx
push 4
lea eax, [ebp - 0x18]
push eax
push esi
call ebx
mov eax, dword [ebp - 0x18]
cmp eax, 0x5a4d
je 0x491ed0
cmp eax, 0x454e
je 0x491ed0
cmp eax, 0x454c
je 0x491ed0
cmp eax, 0x4550
jne 0x491ed7
or dword [ebp - 8], 0x400000
mov edi, dword [ebp - 8]
mov eax, dword [ebp + 8]
test eax, eax
je 0x491ee3
mov dword [eax], edi
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x491eef
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x38]
test esi, esi
je 0x491f69
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x3c]
push 0
sub edx, 0xd53e8000
push 0x989680
sbb eax, 0x19db1de
push eax
push edx
call fcn.004c0780
mov dword [esi + 4], edx
push 0
mov ecx, ebx
sub ecx, 0xd53e8000
mov edx, edi
push 0x989680
sbb edx, 0x19db1de
push edx
push ecx
mov dword [esi], eax
call fcn.004c0780
mov ecx, dword [ebp - 0x44]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x48]
push 0
sub eax, 0xd53e8000
push 0x989680
sbb ecx, 0x19db1de
push ecx
push eax
mov dword [esi + 0xc], edx
call fcn.004c0780
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x491f91
push edi
push ebx
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 4]
push eax
call fcn.00491d50
movzx ecx, word [ebp - 4]
movzx edx, word [ebp - 8]
shl ecx, 0x10
add esp, 0x10
or ecx, edx
mov dword [esi], ecx
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x492040
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp byte [esi + 0x2d], 0
push edi
mov edi, dword [ebp + 0xc]
mov eax, ebx
je 0x49212b
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x492077
cmp dword [esi + 0x40], edi
jae 0x492077
push eax
call fcn.004aad6c
add esp, 4
mov dword [esi + 0x3c], 0
cmp dword [esi + 0x3c], 0
jne 0x49208f
lea eax, [edi + edi]
push eax
call fcn.004aad61
add esp, 4
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
mov ecx, dword [esi + 0x3c]
push edi
push ebx
push ecx
call fcn.004b9e00
add esp, 0xc
xor ebx, ebx
test edi, edi
jbe 0x492128
mov edx, dword [esi + 0x3c]
mov cl, byte [ebx + edx]
mov edi, dword [esi + 0x30]
mov byte [ebp + 8], cl
movsx ecx, cl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x507ea0]
mov dword [ebp - 4], ecx
mov eax, dword [esi + 0x38]
shr edi, 8
xor dword [ebp - 4], edi
mov ecx, dword [ebp - 4]
mov dword [esi + 0x30], ecx
movzx ecx, cl
add ecx, dword [esi + 0x34]
mov edx, eax
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 0x34], ecx
shr ecx, 0x18
xor ecx, eax
shr eax, 8
and ecx, 0xff
xor eax, dword [ecx*4 + 0x507ea0]
and edx, 0xfffd
mov dword [esi + 0x38], eax
mov ecx, dword [esi + 0x3c]
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, byte [ebp + 8]
inc ebx
mov byte [ebx + ecx - 1], al
cmp ebx, dword [ebp + 0xc]
jb 0x4920a7
mov edi, dword [ebp + 0xc]
mov eax, dword [esi + 0x3c]
mov edx, dword [esi + 0x20]
test edx, edx
je 0x49216a
mov ecx, dword [esi + 0x24]
lea ebx, [ecx + edi]
cmp ebx, dword [esi + 0x28]
jb 0x49214f
pop edi
mov dword [esi + 0x14], 0x30000
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
push eax
add ecx, edx
push ecx
call fcn.004b9e00
add esp, 0xc
add dword [esi + 0x24], edi
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x49218c
push 0
lea edx, [ebp + 0xc]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
pop edi
mov dword [esi + 0x14], 0x1000000
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x492440
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [esi + 0x84]
push edi
test ecx, ecx
je 0x492493
mov eax, dword [esi + 0x8c]
mov edi, dword [esi + 0x88]
cmp eax, edi
jae 0x4924d0
sub edi, eax
cmp edi, edx
jbe 0x492467
mov edi, edx
push edi
add eax, ecx
push eax
push ebx
call fcn.004b9e00
mov eax, dword [esi + 0x78]
add dword [esi + 0x8c], edi
add dword [esi + 0x74], edi
add esp, 0xc
mov edx, edi
mov ecx, ebx
call fcn.00491b10
mov dword [esi + 0x78], eax
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x7c]
test eax, eax
je 0x4924c9
push 0
lea ecx, [ebp - 4]
push ecx
push edx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4924d0
mov edi, dword [ebp - 4]
mov eax, dword [esi + 0x78]
add dword [esi + 0x74], edi
mov edx, edi
mov ecx, ebx
call fcn.00491b10
mov dword [esi + 0x78], eax
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x14], 0x1000000
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x496150
Capabilities:
Encode data using xor

Disassembly:
or edx, 0xffffffff
cmp dword [0x529c6c], 0
jne 0x496161
call fcn.004960b0
xor eax, eax
test esi, esi
jle 0x49618b
jmp 0x496170
movzx ecx, byte [eax + edi]
xor ecx, edx
and ecx, 0xff
shr edx, 8
xor edx, dword [ecx*4 + 0x5297e0]
inc eax
cmp eax, esi
jl 0x496170
mov eax, edx
ret
Function at 0x496e70
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dbf48
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push esi
push edi
mov eax, dword [0x523f10]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xor edi, edi
mov dword [ebp - 4], edi
mov eax, dword [esi + 0xc]
cmp eax, edi
jne 0x496ee0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x496ecb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp + 8]
push edi
push edi
push 0x84000000
push edi
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
push ecx
mov edx, esp
mov dword [ebp - 0x14], esp
push eax
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 8]
push eax
push str.CHttpRemoteFile::SetLocation:_InternetOpenUrl__s__d
push edx
call fcn.0046bd30
add esp, 0x10
call fcn.00496e00
mov esi, dword [esi + 0x10]
add esp, 4
cmp esi, edi
je 0x496f50
push edi
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x10]
push edx
push 0x20000013
push esi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
mov eax, dword [ebp - 0x10]
je 0x496f8b
cmp eax, 0xc8
jne 0x496f8b
mov edi, 1
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x496f76
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
push str.CHttpRemoteFile::SetLocation:_return_code:__d
push ecx
call fcn.0046bd30
add esp, 0xc
call fcn.00496e00
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x496ebf

Function at 0x496fd0
Capabilities:
Get http content length

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push 0
lea edx, [ebp - 4]
push edx
push eax
mov dword [eax], 0
mov eax, dword [ecx + 0x10]
push 0x20000005
push eax
mov dword [ebp - 4], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x497009
mov eax, 1
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
mov esp, ebp
pop ebp
ret 4
Function at 0x4970c0
Capabilities:
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor edi, edi
push 0x4000
mov ebx, ecx
mov dword [ebp - 4], edi
call fcn.004ba3e2
mov ecx, dword [ebx + 0x10]
add esp, 4
mov esi, eax
lea eax, [ebp - 4]
push eax
push 0x4000
push esi
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x49714e
mov eax, dword [ebp - 4]
add edi, eax
cmp eax, 0x4000
jne 0x49713e
lea edx, [edi + 0x4000]
push edx
push esi
call fcn.004ba64e
mov edx, dword [ebx + 0x10]
add esp, 8
mov esi, eax
lea eax, [ebp - 4]
push eax
push 0x4000
lea ecx, [esi + edi]
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x4970f5
mov eax, dword [ebp + 8]
mov dword [eax], esi
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp + 8]
mov eax, edi
pop edi
mov dword [ecx], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [ebp + 8]
mov eax, edi
pop edi
mov dword [edx], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4