joyce8/EMBER2024-capa huggingface dataset:
Function at 0x484380
Capabilities:
Get file size
Get system information on windows
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
push ebx
xor ebx, ebx
mov dword [esp + 0xc], ecx
mov ecx, dword [0x52dc20]
push esi
push edi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
cmp ecx, ebx
jne 0x4843c8
mov esi, dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push 0x52dc04
call esi
mov ecx, dword [0x52dc20]
cmp ecx, ebx
jne 0x4843c8
push 0x52dc04
call esi
mov ecx, dword [0x52dc20]
xor edx, edx
mov eax, 0x400000
div ecx
mov edi, dword [ebp + 8]
mov dword [esp + 0x2c], ebx
mov esi, eax
imul esi, ecx
lea eax, [esp + 0x20]
push eax
push edi
mov dword [esp + 0x14], esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push 0
push 0
push 0
push 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esp + 0x10], eax
test eax, eax
je 0x484514
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x20]
mov dword [esp + 0x1c], 1
lea ebx, [ebx]
xor edx, edx
cmp edx, ecx
jg 0x48442e
jl 0x48442c
cmp esi, edi
jae 0x48442e
mov edi, esi
mov ecx, dword [esp + 0x2c]
push edi
push ebx
push ecx
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
test esi, esi
je 0x4844be
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
mov edx, dword [edx]
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x30]
push edi
push eax
push ebx
push esi
push esi
mov dword [esp + 0x30], 0
call edx
xor eax, eax
cmp dword [esp + 0x24], eax
jl 0x484486
jg 0x484478
mov ecx, dword [esp + 0x20]
cmp ecx, dword [esp + 0xc]
jbe 0x484486
mov edx, dword [esp + 0xc]
sub dword [esp + 0x20], edx
sbb dword [esp + 0x24], eax
jmp 0x484490
xor ecx, ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
add ebx, dword [esp + 0xc]
push esi
adc dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [esp + 0x24]
test ecx, ecx
jl 0x4844fa
mov edi, dword [esp + 0x20]
jg 0x4844b1
test edi, edi
jbe 0x4844fa
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
jmp 0x484420
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push eax
push str._CVfcEncDec::EncryptFile:_mapping_failed__LE_d
push ecx
call fcn.0046d760
add esp, 0xc
call fcn.00482ca0
mov edx, dword [esp + 0x14]
add esp, 4
push edx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x484970
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dc100
mov eax, dword fs:[0]
push eax
push ecx
mov eax, dword [0x527f10]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
push eax
push 0x50e750
call fcn.0046b940
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0x10]
push str.PeContainer:
push edx
call fcn.00424a9b
push 0x4ed4c4
mov byte [ebp - 4], 1
call fcn.004bbaea
add esp, 0x18
push eax
push 0x4ed4c4
lea ecx, [ebp - 0x10]
call fcn.00425b93
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x484a06
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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 0x484a2c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 4
Function at 0x489a70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4de2ca
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x527f10]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
push 0x50eea4
xor esi, esi
push eax
mov dword [ebp - 0x18], esi
call fcn.004c0388
mov ebx, eax
add esp, 8
cmp ebx, esi
jne 0x489ad8
mov ecx, dword [0x52e0c4]
mov eax, dword [ebp + 8]
mov dword [eax], ecx
cmp ecx, esi
je 0x489ac6
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.004c0b0c
add esp, 0xc
push ebx
call fcn.004c09dd
mov edi, eax
add esp, 4
mov dword [ebp - 0x10], esi
cmp edi, esi
jne 0x489b29
push ebx
call fcn.004c0c08
mov edx, dword [0x52e0c4]
mov eax, dword [ebp + 8]
mov ecx, edx
add esp, 4
mov dword [eax], edx
cmp ecx, esi
je 0x489c49
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.004c0b0c
lea eax, [edi + 4]
add esp, 0xc
push eax
call fcn.004bc352
add esp, 4
push ebx
push edi
mov esi, eax
push 1
push esi
call fcn.004c063f
push ebx
mov edi, eax
call fcn.004c0c08
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 0x489bbb
cmp byte [esi], 0xef
mov eax, 2
jne 0x489b96
cmp byte [esi + 1], 0xbb
jne 0x489b96
cmp byte [esi + 2], 0xbf
jne 0x489b96
lea ecx, [eax + 1]
lea eax, [ecx - 2]
jmp 0x489b99
mov ecx, dword [ebp - 0x10]
push eax
lea ebx, [esi + ecx]
call fcn.00488220
add esp, 4
push esi
mov edi, eax
call fcn.004bc235
add esp, 4
mov esi, edi
mov dword [ebp - 0x10], 0
jmp 0x489bdf
mov al, byte [esi]
cmp al, 0xef
jne 0x489bce
cmp byte [esi + 1], 0xff
jne 0x489bce
mov dword [ebp - 0x10], 2
cmp al, 0xff
jne 0x489bdf
cmp byte [esi + 1], 0xfe
jne 0x489bdf
mov dword [ebp - 0x10], 2
test esi, esi
jne 0x489c07
mov ecx, dword [0x52e0c4]
mov eax, dword [ebp + 8]
mov dword [eax], ecx
test ecx, ecx
je 0x489c49
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.00489890
push esi
call fcn.004bc235
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp + 8]
add esp, 0xc
mov dword [esi], eax
test eax, eax
je 0x489c30
inc dword [eax + 0x30]
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0
push ecx
mov dword [ebp - 0x18], 1
call fcn.0048a320
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 0x48d5b0
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 0x48d649
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 [0x52dc64], eax
call esi
push str.NtOpenSymbolicLinkObject
push edi
mov dword [0x52dc88], eax
call esi
push str.NtQuerySymbolicLinkObject
push edi
mov dword [0x52dc8c], eax
call esi
push str.ZwClose
push edi
mov dword [0x52dc90], eax
call esi
push 0x68
push 0xff
push 0x52e138
mov dword [0x52dc84], eax
call fcn.004bc420
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
add esp, 0xc
push 0x52e120
call esi
push 0x52e108
call esi
mov dword [0x52dc60], 1
pop edi
pop esi
ret
Function at 0x48f7c0
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dc2b8
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x527f10]
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 0x48f861
push esi
call fcn.004accdc
mov edi, eax
add esp, 4
test edi, edi
je 0x48f861
mov edx, dword [ebp + 8]
push edi
push esi
push 0
push edx
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x48f858
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 0x48f845
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.004accd1
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 0x48f887
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 0x4904b0
Capabilities:
Encode data using xor
Encrypt data using aes

Disassembly:
push esi
mov esi, ecx
test esi, esi
je 0x49064e
test eax, eax
je 0x49064e
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 + 0x50bf60]
xor edx, 0x1000000
mov edi, esi
shr edi, 8
and edi, 0xff
mov edi, dword [edi*4 + 0x50c360]
and edi, 0xff0000
and edx, 0xff000000
xor edx, edi
mov edi, esi
shr edi, 0x18
movzx edi, byte [edi*4 + 0x50bb60]
xor edx, edi
mov edi, esi
and edi, 0xff
mov edi, dword [edi*4 + 0x50b760]
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, 0x50d864
jmp 0x4905c0
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 + 0x50c360]
shr edi, 0x10
and edi, 0xff
mov edi, dword [edi*4 + 0x50bf60]
and eax, 0xff0000
and edi, 0xff000000
xor eax, edi
mov edi, edx
and edx, 0xff
mov edx, dword [edx*4 + 0x50b760]
shr edi, 0x18
movzx edi, byte [edi*4 + 0x50bb60]
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, 0x50d888
jne 0x4905c0
pop edi
xor eax, eax
pop esi
ret
or eax, 0xffffffff
pop esi
ret
Function at 0x493a60
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
test ecx, ecx
jne 0x493a67
xor eax, eax
ret
push esi
not eax
cmp edx, 8
jb 0x493b44
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 + 0x50b360]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x50b360]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x50b360]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x50b360]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x50b360]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x50b360]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x50b360]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x50b360]
inc ecx
sub edx, 8
sub esi, 1
jne 0x493a80
pop edi
test edx, edx
je 0x493b6b
jmp 0x493b50
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x50b360]
inc ecx
sub edx, 1
jne 0x493b50
not eax
pop esi
ret

Function at 0x493b70
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 + 0x50b360]
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 + 0x50b360]
mov dword [edx + 8], ecx
ret
Function at 0x493f90
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 0x49407b
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x493fc7
cmp dword [esi + 0x40], edi
jae 0x493fc7
push eax
call fcn.004accd1
add esp, 4
mov dword [esi + 0x3c], 0
cmp dword [esi + 0x3c], 0
jne 0x493fdf
lea eax, [edi + edi]
push eax
call fcn.004accdc
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.004bbd70
add esp, 0xc
xor ebx, ebx
test edi, edi
jbe 0x494078
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 + 0x50b360]
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 + 0x50b360]
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 0x493ff7
mov edi, dword [ebp + 0xc]
mov eax, dword [esi + 0x3c]
mov edx, dword [esi + 0x20]
test edx, edx
je 0x4940ba
mov ecx, dword [esi + 0x24]
lea ebx, [ecx + edi]
cmp ebx, dword [esi + 0x28]
jb 0x49409f
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.004bbd70
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 0x4940dc
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 0x4980c0
Capabilities:
Encode data using xor

Disassembly:
or edx, 0xffffffff
cmp dword [0x52dc6c], 0
jne 0x4980d1
call fcn.00498020
xor eax, eax
test esi, esi
jle 0x4980fb
jmp 0x4980e0
movzx ecx, byte [eax + edi]
xor ecx, edx
and ecx, 0xff
shr edx, 8
xor edx, dword [ecx*4 + 0x52d7e0]
inc eax
cmp eax, esi
jl 0x4980e0
mov eax, edx
ret
Function at 0x498de0
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d98b8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push esi
push edi
mov eax, dword [0x527f10]
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 0x498e50
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 0x498e3b
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.0046d760
add esp, 0x10
call fcn.00498d70
mov esi, dword [esi + 0x10]
add esp, 4
cmp esi, edi
je 0x498ec0
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 0x498efb
cmp eax, 0xc8
jne 0x498efb
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 0x498ee6
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.0046d760
add esp, 0xc
call fcn.00498d70
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 0x498e2f

Function at 0x498f40
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 0x498f79
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 0x4994f0
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d9888
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x527f10]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor esi, esi
mov dword [ebp - 4], esi
mov eax, dword [ebp + 8]
mov ecx, dword [ecx + 0xc]
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x49956c
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 0x499556
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
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x18], esp
mov ebx, esp
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], esi
push eax
lea edi, [ebp - 0x14]
lea esi, [ebp - 0x10]
call fcn.00425450
add eax, 0x10
add esp, 4
mov dword [ebx], eax
call fcn.00470760
add esp, 4
or edx, 0xffffffff
mov dword [ebp - 4], 0xffffffff
test eax, eax
mov eax, dword [ebp + 8]
jne 0x4995da
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x499556
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
pop ebx
mov esp, ebp
pop ebp
ret 4
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4995f3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x49b820
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d9db3
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x527f10]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov dword [ebp - 4], 0
lea edi, [esi + 0x20]
call fcn.004ad3ae
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x49b86c
push 0x80004005
call fcn.00422000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [edi], eax
lea ecx, [ebp + 0xc]
push ecx
mov byte [ebp - 4], 1
mov ecx, edi
mov dword [esi + 0x38], 0
call fcn.00424eea
mov eax, dword [ebp + 0xc]
xor edi, edi
push edi
push 0x80
push 3
mov edx, ebx
neg edx
sbb edx, edx
push edi
and edx, 0x116
push 1
add edx, 0x120089
push edx
push eax
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 0x34], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
jne 0x49b8de
push 0x518038
lea ecx, [ebp - 0x10]
push ecx
mov dword [ebp - 0x10], str.Cant_open_file
call fcn.004c223c
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], edi
cmp edi, edi
ja 0x49b915
jb 0x49b8f7
cmp eax, 0x40
jae 0x49b915
mov edx, dword [esi]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x518038
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x10], str.Incorrect_PE_file__too_small_
call fcn.004c223c
mov edx, dword [esi]
xor ecx, ecx
cmp ebx, edi
push edi
setne cl
push edi
push edi
lea ecx, [ecx + ecx + 2]
push ecx
push edi
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi + 4], eax
cmp eax, edi
jne 0x49b953
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x518038
lea ecx, [ebp - 0x10]
push ecx
mov dword [ebp - 0x10], str.Cant_create_file_mapping
call fcn.004c223c
xor edx, edx
cmp ebx, edi
setne dl
push edi
push edi
push edi
lea edx, [edx + edx + 4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0x30], eax
cmp eax, edi
jne 0x49b996
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
mov ecx, dword [esi]
push ecx
call edi
push 0x518038
lea edx, [ebp - 0x10]
push edx
mov dword [ebp - 0x10], str.Cant_create_map_file_view
call fcn.004c223c
mov dword [esi + 0x34], 1
mov dword [esi + 0x38], ebx
call fcn.0049b9e0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x49b9cb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8