joyce8/EMBER2024-capa huggingface dataset:
Function at 0x470960
Capabilities:
Get common file path

Disassembly:
sub esp, 0x410
push ebx
push esi
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0xe]
mov word [esp + 0xc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0xc]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jbe 0x470aa5
lea ecx, [esp + 0xc]
push ecx
call fcn.004386b2
add esp, 4
test eax, eax
jbe 0x4709b9
cmp word [esp + eax*2 + 0xa], 0x5c
lea eax, [esp + eax*2 + 0xa]
jne 0x4709b9
mov word [eax], 0
lea edx, [esp + 0xc]
push edx
call fcn.00470860
add esp, 4
test eax, eax
je 0x470a34
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x216]
mov word [esp + 0x214], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x214]
push 0x104
lea ecx, [esp + 0x10]
push eax
push ecx
call fcn.004706d0
lea edx, [esp + 0x220]
push edx
call fcn.004386b2
mov esi, eax
add esp, 0x10
cmp esi, 0x104
jge 0x470a34
lea eax, [esp + 0x214]
push esi
lea ecx, [esp + 0x10]
push eax
push ecx
call fcn.00438675
add esp, 0xc
mov word [esp + esi*2 + 0xc], 0
mov edi, dword [esp + 0x420]
test edi, edi
je 0x470a9e
mov ebx, dword [esp + 0x424]
test ebx, ebx
je 0x470a9e
lea edx, [esp + 0xc]
test edx, edx
je 0x470a9e
mov eax, dword [esp + 0x428]
mov esi, 0x7a
test eax, eax
je 0x470a7b
push eax
lea eax, [esp + 0x10]
push eax
push 0x4e1598
push ebx
push edi
call fcn.00438bb1
add esp, 0x14
xor esi, esi
jmp 0x470aad
lea ecx, [esp + 0xc]
push ecx
call fcn.004386b2
add esp, 4
cmp ebx, eax
jbe 0x470aad
lea edx, [esp + 0xc]
push edx
push edi
call fcn.00438893
add esp, 8
xor esi, esi
jmp 0x470aad
mov esi, 0x57
jmp 0x470aad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
mov dword [0x4fa654], esi
je 0x470abe
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
test esi, esi
pop esi
pop ebx
sete al
add esp, 0x410
ret
Function at 0x476800
Capabilities:
Get user security identifier

Disassembly:
mov eax, dword [0x4fa6cc]
sub esp, 0x120
push ebx
xor ebx, ebx
push ebp
cmp eax, ebx
push edi
jne 0x47684c
mov ecx, 0x44
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x114
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov ecx, dword [esp + 0x28]
mov eax, 1
cmp ecx, 2
jne 0x476847
mov dword [0x4fa6d0], eax
mov dword [0x4fa6cc], eax
cmp dword [0x4fa6d0], ebx
jne 0x476860
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x120
ret
mov ebp, dword [esp + 0x130]
mov edi, dword [esp + 0x134]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
push edx
lea eax, [esp + 0x14]
push ebx
push eax
push ebx
push ebp
push ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [edi], ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x4768ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x4768ac
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x120
ret
mov ecx, dword [esp + 0xc]
push esi
push ecx
call fcn.004a2973
mov edx, dword [esp + 0x18]
mov dword [edi], eax
lea eax, [edx + edx]
push eax
call fcn.004a2973
mov esi, eax
mov eax, dword [edi]
add esp, 8
test eax, eax
je 0x4768f1
test esi, esi
je 0x476902
lea ecx, [esp + 0x18]
lea edx, [esp + 0x14]
push ecx
push edx
lea ecx, [esp + 0x18]
push esi
push ecx
push eax
push ebp
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov ebx, eax
test esi, esi
je 0x4768fe
push esi
call fcn.004a299c
add esp, 4
test ebx, ebx
jne 0x476911
mov edi, dword [edi]
test edi, edi
je 0x476911
push edi
call fcn.004a299c
add esp, 4
pop esi
pop edi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x120
ret
Function at 0x47a150
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x10]
push 0xf00021
mov edx, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [esi + 0xc]
sub eax, edx
push eax
mov eax, dword [esi + 8]
sub eax, ecx
push eax
push edx
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_PatBlt]
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov ebx, eax
lea eax, [eax + 5]
add eax, 3
and eax, 0xfffffffc
call fcn.004382c0
mov dword [ebp - 4], esp
cmp dword [ebp - 4], 0
je 0x47a21b
add ebx, 2
mov eax, dword [ebp - 4]
push ebx
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x47a21b
mov bx, 0x140
mov edi, dword [ebp + 0x14]
mov eax, edi
and al, 0xf
cmp al, 0xc
je 0x47a1ce
mov ebx, edi
and bx, 0xf
or bx, 0x150
test edi, 0x80
je 0x47a1d9
or bh, 8
and edi, 0x8000000
je 0x47a1f4
mov eax, dword [0x4fcf5c]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
movzx eax, bx
push eax
push esi
push 0xffffffffffffffff
push ecx
push edx
call dword [sym.imp.USER32.dll_DrawTextA]
test edi, edi
je 0x47a21b
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x47a5f0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x47a61b
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x47a63f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x47a65a
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20

Function at 0x47cab0
Capabilities:
Initialize winsock library

Disassembly:
mov eax, dword [0x4fb430]
sub esp, 0x190
test eax, eax
je 0x47cacb
mov eax, 1
add esp, 0x190
ret
push edi
mov ecx, 0x63
xor eax, eax
lea edi, [esp + 6]
mov word [esp + 4], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 4]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
pop edi
je 0x47cb00
xor eax, eax
add esp, 0x190
ret
mov eax, 1
mov dword [0x4fb430], eax
add esp, 0x190
ret
Function at 0x47cbd0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4b3e5f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
mov ecx, dword [0x4e29e0]
push ebx
xor eax, eax
push esi
push edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ecx
mov ecx, 9
lea edi, [esp + 0x16]
mov ebx, dword [esp + 0x50]
mov word [esp + 0x14], ax
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, ebx
lea edx, [esp + 0x14]
push 0xa
push edx
shr eax, 0x18
push eax
mov dword [esp + 0x50], 1
call fcn.0043a318
add esp, 0xc
lea ecx, [esp + 0xc]
push eax
call fcn.004a302b
push 0x4e6cc0
lea ecx, [esp + 0x10]
call fcn.004a302b
xor edx, edx
lea ecx, [esp + 0x14]
mov dl, byte [esp + 0x52]
push 0xa
push ecx
push edx
call fcn.0043a318
add esp, 0xc
lea ecx, [esp + 0xc]
push eax
call fcn.004a302b
push 0x4e6cc0
lea ecx, [esp + 0x10]
call fcn.004a302b
xor ecx, ecx
lea eax, [esp + 0x14]
push 0xa
mov cl, bh
push eax
push ecx
call fcn.0043a318
add esp, 0xc
lea ecx, [esp + 0xc]
push eax
call fcn.004a302b
push 0x4e6cc0
lea ecx, [esp + 0x10]
call fcn.004a302b
lea edx, [esp + 0x14]
push 0xa
and ebx, 0xff
push edx
push ebx
call fcn.0043a318
add esp, 0xc
lea ecx, [esp + 0xc]
push eax
call fcn.004a302b
mov esi, dword [esp + 0x4c]
lea eax, [esp + 0xc]
push eax
mov ecx, esi
call fcn.004a29a7
mov dword [esp + 0x10], 1
lea ecx, [esp + 0xc]
mov byte [esp + 0x44], 0
call fcn.004a2c3a
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
add esp, 0x3c
ret

Function at 0x487ad0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
mov eax, dword [ecx + 4]
push ebx
push ebp
push esi
push edi
mov edi, dword [ecx]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], 0
test ecx, ecx
je 0x487b11
lea edx, [esp + 0x14]
or eax, 0x20019
push edx
push eax
push 0
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
mov eax, dword [esp + 0x14]
neg esi
sbb esi, esi
not esi
and esi, eax
jmp 0x487b13
mov esi, edi
test esi, esi
je 0x487b88
mov ebx, dword [esp + 0x20]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x20]
push eax
push 0
push ecx
push 0
push ebx
push esi
call ebp
test eax, eax
jne 0x487b7d
mov ecx, dword [esp + 0x20]
mov eax, 4
cmp ecx, eax
jne 0x487b7d
cmp dword [esp + 0x1c], eax
jbe 0x487b4e
mov dword [esp + 0x1c], eax
lea edx, [esp + 0x1c]
lea eax, [esp + 0x10]
push edx
push eax
push 0
push 0
push ebx
push esi
call ebp
test eax, eax
jne 0x487b7d
cmp esi, edi
je 0x487b6f
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 0xc
cmp esi, edi
je 0x487b88
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 0xc
Function at 0x487ba0
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [ecx]
test esi, esi
push edi
je 0x487c14
mov ebx, dword [esp + 0x18]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
push 0
push ecx
push 0
push ebx
push esi
call ebp
test eax, eax
jne 0x487c14
cmp dword [esp + 0x10], 3
jne 0x487c14
mov edx, dword [esp + 0x18]
push edx
call fcn.004a2973
mov edi, eax
add esp, 4
test edi, edi
je 0x487c14
lea eax, [esp + 0x18]
push eax
push edi
push 0
push 0
push ebx
push esi
call ebp
test eax, eax
jne 0x487c0b
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov eax, edi
pop edi
pop esi
pop ebp
mov dword [ecx], edx
pop ebx
pop ecx
ret 8
push edi
call fcn.004a299c
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8

Function at 0x487c20
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x4b510f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
mov eax, dword [0x4e29e0]
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x10], eax
mov eax, dword [ecx + 4]
mov edi, dword [ecx]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x28], 1
test ecx, ecx
mov dword [esp + 0x14], edi
je 0x487c8b
lea edx, [esp + 0x18]
or eax, 0x20019
push edx
push eax
push 0
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
mov eax, dword [esp + 0x18]
neg esi
sbb esi, esi
not esi
and esi, eax
jmp 0x487c8d
mov esi, edi
test esi, esi
je 0x487d57
mov ebx, dword [esp + 0x38]
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x3c]
push 0
push ecx
push 0
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x487d4c
mov eax, dword [esp + 0x38]
cmp eax, 1
je 0x487ccf
cmp eax, 2
je 0x487ccf
cmp eax, 6
je 0x487ccf
cmp eax, 7
jne 0x487d4c
mov edx, dword [esp + 0x34]
add edx, 2
push edx
call fcn.004a2973
mov ebp, eax
mov eax, dword [esp + 0x38]
mov edi, ebp
add esp, 4
lea ecx, [eax + 2]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x34]
push eax
push ebp
push 0
push 0
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
push ebp
jne 0x487d32
lea ecx, [esp + 0x14]
call fcn.004a2dd1
cmp esi, dword [esp + 0x14]
je 0x487d27
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
call fcn.004a299c
add esp, 4
jmp 0x487d69
call fcn.004a299c
add esp, 4
lea ecx, [esp + 0x10]
push 0x4f4c50
call fcn.004a2dd1
mov edi, dword [esp + 0x14]
cmp esi, edi
je 0x487d57
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x487d69
push eax
lea ecx, [esp + 0x14]
call fcn.004a2dd1
mov esi, dword [esp + 0x30]
lea ecx, [esp + 0x10]
push ecx
mov ecx, esi
call fcn.004a29a7
mov dword [esp + 0x1c], 1
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], 0
call fcn.004a2c3a
mov ecx, dword [esp + 0x20]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret 0x10
Function at 0x487e50
Capabilities:
Check os version
Get system information on windows

Disassembly:
mov eax, dword [0x4fb6cc]
test eax, eax
jne 0x487f3c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
push 0x4fb468
mov dword [0x4fb6cc], 1
mov dword [0x4fb468], 0x114
call esi
mov edx, dword [0x4fb478]
xor eax, eax
cmp edx, 2
sete al
test eax, eax
mov dword [0x4f3050], eax
je 0x487f1e
push edi
push 0x4fb580
mov dword [0x4fb580], 0x11c
call esi
push 0x4e15c8
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push str.GetNativeSystemInfo
push esi
call edi
push str.GetProductInfo
push esi
mov dword [0x4fb6c4], eax
call edi
mov dword [0x4fb6c8], eax
mov eax, dword [0x4fb6c4]
pop edi
test eax, eax
push 0x4fb6a0
je 0x487eec
call eax
jmp 0x487ef2
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [0x4fb584]
cmp eax, 6
jae 0x487f0a
cmp eax, 5
jne 0x487f1e
cmp dword [0x4fb588], 2
jb 0x487f1e
cmp word [0x4fb6a0], 9
jne 0x487f1e
mov dword [0x4fb45c], 1
push 0x4fb470
push 0x4fb46c
call fcn.00488270
add esp, 8
call fcn.00487f50
mov eax, 1
pop esi
ret
mov eax, 1
ret
Function at 0x489390
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x1c]
push ebx
push ebp
push esi
mov esi, 0x8000
push edi
cmp eax, esi
mov dword [esp + 0x14], esi
jbe 0x4893ae
mov dword [esp + 0x14], eax
mov esi, eax
push esi
call fcn.004a2973
mov ecx, esi
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
mov ebp, dword [esp + 0x24]
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x10], ebx
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x24]
push 0
push 0
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test esi, esi
jne 0x4893ed
xor ebx, ebx
jmp 0x48940a
lea eax, [esp + 0x24]
push 0
push eax
push esi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x489406
or ebx, 0xffffffff
jmp 0x48940a
mov ebx, dword [esp + 0x24]
push 0
push 0
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x48945d
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x24]
push 0
push ecx
push eax
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x489442
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
cmp ecx, eax
je 0x489459
mov ecx, dword [esp + 0x10]
push ecx
call fcn.004a299c
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov eax, dword [esp + 0x2c]
cmp ebx, esi
jae 0x489482
test ebx, ebx
je 0x489556
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x2c]
push 0
push edx
push ebx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x489556
lea ecx, [ebx + edi]
add edi, eax
push esi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x30], edi
call fcn.004a2973
mov ecx, esi
mov edi, eax
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esp + 0x24], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
jmp 0x4894b6
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
cmp ecx, eax
jg 0x4894f5
push 0
push 0
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test esi, esi
je 0x4894f5
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x28]
push 0
push eax
push esi
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4894ef
or esi, 0xffffffff
jmp 0x4894f7
mov esi, dword [esp + 0x28]
jmp 0x4894f7
xor esi, esi
mov edx, dword [esp + 0x2c]
push 0
push 0
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test ebx, ebx
je 0x48951f
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push 0
push eax
push ebx
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
add edx, ebx
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x20]
add edi, esi
mov dword [esp + 0x10], edx
test esi, esi
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], eax
mov ebx, esi
jg 0x4894b2
push eax
call fcn.004a299c
add esp, 4
mov eax, dword [esp + 0x10]
push eax
call fcn.004a299c
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x489570
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4b51fb
push eax
mov dword fs:[0], esp
sub esp, 0x120
push ebx
mov ebx, dword [esp + 0x134]
push ebp
xor ebp, ebp
push esi
cmp ebx, ebp
push edi
je 0x489714
push ebx
call fcn.004386b2
add esp, 4
test eax, eax
je 0x489714
push ebx
lea ecx, [esp + 0x18]
call fcn.004a2cae
mov esi, dword [esp + 0x144]
mov dword [esp + 0x138], ebp
cmp esi, ebp
je 0x4895e1
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x489700
neg esi
sbb esi, esi
mov dword [esp + 0x18], ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileW]
and esi, 0xc0000000
add esi, 0xc0000000
or edi, 0xffffffff
cmp edi, 0xffffffff
jne 0x4896b4
mov eax, dword [esp + 0x18]
test eax, eax
je 0x489617
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x4f3eb8]
cmp eax, 0xffffffff
jne 0x489652
mov ecx, 0x44
xor eax, eax
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0x114
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov ecx, dword [esp + 0x2c]
xor eax, eax
cmp ecx, 2
sete al
mov dword [0x4f3eb8], eax
test eax, eax
je 0x48966b
push 0
push 0x80
push 4
push 0
push 1
push esi
push ebx
call ebp
mov edi, eax
jmp 0x489699
push ebx
lea ecx, [esp + 0x14]
call fcn.00446e30
mov edx, dword [esp + 0x10]
push 0
push 0x80
push 4
push 0
push 1
push esi
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
lea ecx, [esp + 0x10]
mov edi, eax
call fcn.00447180
mov eax, dword [esp + 0x18]
inc eax
cmp eax, 3
mov dword [esp + 0x18], eax
jl 0x4895fe
cmp edi, 0xffffffff
je 0x48974a
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
push 0
push 0
push edi
call esi
cmp eax, 0xffffffff
jne 0x4896cc
or ebp, eax
jmp 0x4896ce
mov ebp, eax
push 2
push 0
push 0
push edi
call esi
cmp eax, 0xffffffff
jne 0x4896e0
or ebx, eax
jmp 0x4896e2
mov ebx, eax
push 0
push 0
push ebp
push edi
call esi
test ebx, ebx
jne 0x48974a
mov eax, dword [esp + 0x144]
test eax, eax
je 0x489730
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x14]
mov dword [esp + 0x138], 0xffffffff
call fcn.004a2c3a
or eax, 0xffffffff
mov ecx, dword [esp + 0x130]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x12c
ret
lea eax, [esp + 0x10]
push 2
push eax
push 0
push edi
mov dword [esp + 0x20], 0xfeff
call fcn.00489390
add esp, 0x10
lea ecx, [esp + 0x14]
mov dword [esp + 0x138], 0xffffffff
call fcn.004a2c3a
mov eax, edi
jmp 0x489717
Function at 0x489d30
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, dword [esp + 8]
push esi
mov esi, ecx
push edi
push ebp
lea edi, [esi + 0xec]
mov ecx, edi
call fcn.0048db70
test al, al
jne 0x489d51
pop edi
pop esi
pop ebp
ret 4
lea ecx, [esi + 0x78]
call fcn.0048c100
cmp eax, 1
jne 0x489d66
pop edi
pop esi
xor al, al
pop ebp
ret 4
mov al, byte [esi + 0xe8]
test al, al
je 0x489d78
pop edi
pop esi
xor al, al
pop ebp
ret 4
lea ecx, [esi + 0x20]
call fcn.0048d100
push ebp
mov ecx, edi
call fcn.0048db90
mov ecx, dword [esi + 0x114]
call fcn.0048bce0
test al, al
je 0x489e2f
mov eax, dword [esi + 0x10]
test eax, eax
jne 0x489daa
pop edi
pop esi
xor al, al
pop ebp
ret 4
mov dword [esi + 0x14], 0x12345678
mov dword [esi + 0x18], 0x23456789
mov dword [esi + 0x1c], 0x34567890
mov eax, dword [esi + 0x10]
xor edi, edi
test eax, eax
jbe 0x489e1b
mov eax, dword [esi + 0xc]
mov cl, byte [edi + eax]
mov eax, dword [esi + 0x14]
mov byte [esp + 0x10], cl
mov ecx, esi
mov edx, dword [esp + 0x10]
push edx
push eax
call fcn.0048b620
mov edx, dword [esi + 0x18]
mov dword [esi + 0x14], eax
and eax, 0xff
add eax, edx
mov edx, dword [esi + 0x1c]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 0x18], eax
shr eax, 0x18
mov byte [esp + 0x10], al
mov ecx, dword [esp + 0x10]
push ecx
push edx
mov ecx, esi
call fcn.0048b620
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x10]
inc edi
cmp edi, eax
jb 0x489dc8
mov ecx, esi
call fcn.0048b400
test al, al
jne 0x489e2f
push 0xffffffffffffff94
mov ecx, esi
call fcn.00489b30
mov eax, dword [esi + 0x114]
mov di, word [eax + 0xe]
test di, di
je 0x489e4d
cmp di, 8
je 0x489e53
push 0xffffffffffffff9b
mov ecx, esi
call fcn.00489b30
cmp di, 8
jne 0x489e8a
mov al, byte [esi + 4]
test al, al
je 0x489e62
lea eax, [esi + 0xcc]
jmp 0x489e64
xor eax, eax
push 0x38
push str.1.1.4
lea ecx, [esi + 0x28]
push 0xfffffffffffffff1
push ecx
mov dword [esi + 0x50], eax
call fcn.00472210
test eax, eax
je 0x489e8a
cmp eax, 2
je 0x489e8a
push eax
mov ecx, esi
call fcn.00489b30
mov ecx, dword [esi + 0x114]
mov edx, dword [ecx + 0x18]
mov dword [esi + 0x64], edx
call fcn.0048bce0
test al, al
je 0x489ea3
add dword [esi + 0x64], 0xfffffff4
mov eax, dword [esi + 0x114]
pop edi
mov ecx, dword [eax + 0x1c]
mov dword [esi + 0x68], 0
mov dword [esi + 0x60], ecx
mov dword [esi + 0x3c], 0
mov dword [esi + 0x2c], 0
mov byte [esi + 0xe8], 0xff
pop esi
mov al, 1
pop ebp
ret 4