joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46d400
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x250
xor eax, eax
mov dword [esp + 0x28], eax
push ebx
mov bl, byte [ebp + 0xc]
mov dword [esp + 0x30], eax
push edi
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
push eax
lea ecx, [esp + 0x10]
push ecx
push 0x18
lea edx, [esp + 0x3c]
push edx
push eax
push eax
mov dword [esp + 0x5c], eax
mov eax, dword [ebp + 8]
push 0x74080
push eax
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
test eax, eax
je 0x46d4d9
mov cl, byte [esp + 0x34]
mov al, 1
test al, cl
je 0x46d4d9
xor ecx, ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
mov byte [esp + 0x1c], bl
and bl, al
mov dword [esp + 0x28], ecx
mov byte [esp + 0x15], al
mov byte [esp + 0x16], al
xor eax, eax
push eax
mov dword [esp + 0x30], ecx
lea edx, [esp + 0x10]
push edx
mov edx, dword [ebp + 8]
push 0x210
mov ecx, 0x84
lea edi, [esp + 0x54]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x54]
push eax
push 0x20
lea ecx, [esp + 0x24]
push ecx
or bl, 0xfa
push 0x7c088
shl bl, 4
push edx
mov byte [esp + 0x3a], 0xec
mov byte [esp + 0x39], bl
mov dword [esp + 0x30], 0x200
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
test eax, eax
jne 0x46d4e1
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x70]
mov eax, esi
mov dword [eax], ecx
mov ecx, dword [esp + 0x74]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x78]
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x7c]
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], ecx
mov byte [esi + 0x14], 0
lea eax, [esi + 1]
mov edi, 0xa
mov cl, byte [eax - 1]
mov dl, byte [eax]
mov byte [eax - 1], dl
mov byte [eax], cl
add eax, 2
dec edi
jne 0x46d511
xor eax, eax
cmp byte [eax + esi], 0x20
jge 0x46d52d
mov byte [eax + esi], 0x20
inc eax
cmp eax, 0x14
jl 0x46d523
pop edi
mov eax, 0x14
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x46f8e0
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x52e757
mov eax, dword fs:[0]
push eax
mov eax, 0x1030
mov dword fs:[0], esp
call fcn.004bd0a0
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0xa
lea eax, [esp + 0x24]
push eax
push 0
mov esi, ecx
call edi
push eax
call fcn.004bd2e3
add esp, 8
lea edx, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x14], esp
push edx
call fcn.00429610
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push str.Screen_Width
mov dword [esp + 0x1054], 0
call fcn.0040e1f0
or ebp, 0xffffffff
mov ecx, esi
mov dword [esp + 0x1050], ebp
call fcn.0046e350
push 0xa
lea eax, [esp + 0x24]
push eax
push 1
call edi
push eax
call fcn.004bd2e3
add esp, 8
lea edx, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x18], esp
push edx
call fcn.00429610
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push str.Screen_Height
mov dword [esp + 0x1054], 1
call fcn.0040e1f0
mov ecx, esi
mov dword [esp + 0x1050], ebp
call fcn.0046e350
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov ebx, eax
push 0xa
lea eax, [esp + 0x24]
push eax
push 0xc
push ebx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push eax
call fcn.004bd2e3
lea edi, [esp + 0x2c]
add esp, 0xc
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x46f9d2
mov ecx, dword [str._bit]
mov dl, byte [0x538310]
push ecx
mov dword [edi], ecx
lea eax, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x18], esp
push eax
mov byte [edi + 4], dl
call fcn.00429610
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push str.Screen_Color
mov dword [esp + 0x1054], 2
call fcn.0040e1f0
mov ecx, esi
mov dword [esp + 0x1050], ebp
call fcn.0046e350
push ebx
call dword [sym.imp.GDI32.dll_DeleteDC]
lea ecx, [esp + 0x18]
push ecx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionThemeManager
push SysReAllocString
mov dword [esp + 0x30], 0x1000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x46fabe
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x44]
push eax
push 0
push 0
push str.ThemeActive
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x18]
push edx
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x46fabe
push ecx
lea eax, [esp + 0x44]
mov ecx, esp
mov dword [esp + 0x18], esp
push eax
call fcn.00429610
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push str.XPThemeActive
mov dword [esp + 0x1054], 3
call fcn.0040e1f0
mov ecx, esi
mov dword [esp + 0x1050], ebp
call fcn.0046e350
jmp 0x46faf9
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x535f4c
call fcn.0040e1f0
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push str.XPThemeActive
mov dword [esp + 0x1054], 4
call fcn.0040e1f0
mov ecx, esi
mov dword [esp + 0x1050], ebp
call fcn.0046e2a0
mov ecx, dword [esp + 0x1040]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x103c
ret
Function at 0x4703a0
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x52e848
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
mov eax, dword [0x58ada8]
push ebx
push ebp
push esi
mov dword [esp + 0x20], ecx
push edi
mov ecx, 0x58ada8
mov dword [esp + 0x10], 0x5c3a63
xor edi, edi
xor esi, esi
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [esp + 0x20], ebx
mov edx, dword [0x58ada8]
mov ecx, 0x58ada8
mov dword [esp + 0x38], edi
call dword [edx + 0xc]
lea ebp, [eax + 0x10]
mov dword [esp + 0x1c], ebp
mov byte [esp + 0x38], 1
mov dword [esp + 0x14], edi
mov al, byte [esp + 0x14]
lea ecx, [esp + 0x10]
add al, 0x61
push ecx
mov byte [esp + 0x14], al
call dword [sym.imp.KERNEL32.DLL_GetDriveTypeA]
cmp eax, 3
jne 0x4704b1
push edi
push edi
push edi
push edi
lea edx, [esp + 0x28]
push edx
push edi
push edi
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x38], edi
call dword [sym.imp.KERNEL32.DLL_GetVolumeInformationA]
push esi
lea ecx, [esp + 0x24]
push str.Volume__d
push ecx
call fcn.004297d0
mov eax, dword [esp + 0x24]
movzx edx, ax
push edx
shr eax, 0x10
push eax
lea eax, [esp + 0x30]
push str._04X__04X
push eax
inc esi
call fcn.004297d0
mov ebp, dword [esp + 0x38]
add esp, 0x18
lea eax, [ebp - 0x10]
mov dword [esp + 0x2c], esp
mov edi, esp
push eax
call fcn.00404780
add eax, 0x10
mov dword [edi], eax
mov ebx, dword [esp + 0x28]
lea eax, [ebx - 0x10]
mov dword [esp + 0x34], esp
mov edi, esp
push eax
mov byte [esp + 0x44], 2
call fcn.00404780
mov ecx, dword [esp + 0x30]
add eax, 0x10
add esp, 4
mov dword [edi], eax
mov byte [esp + 0x40], 1
call fcn.0046e2a0
xor edi, edi
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 0x1a
mov dword [esp + 0x14], eax
jl 0x470402
lea eax, [ebp - 0x10]
mov byte [esp + 0x38], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4704e2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [ebx - 0x10]
mov dword [esp + 0x38], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x470504
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x30]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x2c
ret
Function at 0x470800
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x52e8a9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
mov esi, ecx
mov ecx, 1
xor eax, eax
push edi
mov dword [esp + 8], esi
mov dword [esi + 4], ecx
mov dword [esi + 0xc], eax
mov dword [esi], 0x5384f4
mov dword [esi + 8], 0x5384d0
mov dword [esi + 0x10], 0x538494
mov dword [esi + 0x14], 0x538470
lea edi, [esi + 0x10]
mov dword [esp + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x38], 0xa
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], eax
mov dword [esi + 0x48], eax
mov dword [esi + 0x4c], eax
lea eax, [esi + 0x50]
push eax
mov dword [eax + 0x18], ecx
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
push edi
mov byte [esp + 0x18], 3
call fcn.004705e0
mov ecx, dword [esp + 0xc]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret

Function at 0x472710
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push esi
mov esi, ecx
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
lea eax, [esi + 0x14]
mov dword [esi + 4], 1
mov dword [esi + 0xc], 0
mov dword [esi], 0x538890
mov dword [esi + 8], 0x53886c
mov dword [esi + 0x10], 0x538820
push eax
mov dword [eax + 0x18], 1
call edi
mov eax, dword [0x58ada8]
mov ecx, 0x58ada8
call dword [eax + 0xc]
add eax, 0x10
mov dword [esi + 0x34], eax
lea eax, [esi + 0x3c]
mov dword [esi + 0x38], 0
push eax
mov dword [eax + 0x18], 1
call edi
push 0
push 2
lea edi, [esi + 0x5c]
push 2
mov dword [edi], 0
call dword [sym.imp.WS2_32.dll_socket]
push 0x1000
mov ecx, edi
mov dword [esi + 0x30], eax
mov dword [esi + 0x58], 0x1000
call fcn.0042c210
pop edi
mov eax, esi
pop esi
ret

Function at 0x472b20
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x14
push esi
push edi
mov esi, ecx
mov edx, dword [esi + 0x30]
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x10]
push ecx
push edx
mov dword [esp + 0x14], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
mov eax, dword [esi + 0x2c]
test eax, eax
lea edi, [esi + 0x14]
je 0x472b54
push edi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
movzx eax, byte [esp + 0x13]
movzx ecx, byte [esp + 0x12]
movzx edx, byte [esp + 0x11]
push eax
movzx eax, byte [esp + 0x14]
push ecx
push edx
push eax
lea ecx, [esi + 0x34]
push 0x537f88
push ecx
call fcn.004297d0
mov edx, dword [esp + 0x26]
add esp, 0x18
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [esi + 0x38], eax
mov eax, dword [edi + 0x18]
test eax, eax
je 0x472b9c
push edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
pop edi
pop esi
add esp, 0x14
ret
Function at 0x47d790
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x52f2a0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebp
push esi
push edi
mov esi, ecx
mov eax, dword [0x58ada8]
mov ecx, 0x58ada8
mov dword [esp + 0x28], 0
call dword [eax + 0xc]
lea ecx, [esp + 0x30]
add eax, 0x10
push ecx
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], eax
call fcn.0040f010
lea edx, [esp + 0xc]
push edx
mov ecx, esi
call fcn.0047d150
mov edi, eax
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
or ebp, 0xffffffff
lea ecx, [eax + 0xc]
mov edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47d805
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test edi, edi
je 0x47d847
mov eax, dword [esp + 0x34]
add edi, 8
mov dword [eax], edi
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov dword [esp + 0x28], ebp
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebp
dec ebp
test ebp, ebp
jg 0x47d831
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
add esp, 0x20
ret 0xc
mov eax, dword [esp + 0x38]
test eax, eax
je 0x47d8c5
mov eax, dword [0x58ada8]
mov ecx, 0x58ada8
call dword [eax + 0xc]
lea ecx, [esp + 0x30]
add eax, 0x10
push ecx
lea ecx, [esp + 0x3c]
mov dword [esp + 0x3c], eax
call fcn.0040f010
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x3c]
push eax
mov ecx, esi
mov byte [esp + 0x30], 1
call fcn.0047d740
mov edi, eax
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
mov byte [esp + 0x28], 0
lea ecx, [eax + 0xc]
mov edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47d8ab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x38]
push eax
lea ecx, [esi + 0x18]
mov dword [esp + 0x3c], edi
call fcn.004464e0
mov ecx, dword [esp + 0x34]
add edi, 8
mov dword [ecx], edi
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov dword [esp + 0x28], ebp
lea edx, [eax + 0xc]
lock xadd dword [edx], ebp
dec ebp
test ebp, ebp
jg 0x47d8e4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x20]
pop edi
pop esi
mov eax, 1
pop ebp
mov dword fs:[0], ecx
add esp, 0x20
ret 0xc
Function at 0x481870
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, dword [esp + 0xc]
test ebp, ebp
jne 0x481882
mov eax, 0x80030009
pop ebp
ret 0x10
push ebx
mov ebx, dword [esp + 0x18]
test ebx, ebx
jne 0x48188f
lea ebx, [esp + 0x18]
push esi
mov esi, dword [esp + 0x10]
lea eax, [esi + 8]
mov dword [ebx], 0
mov ecx, dword [eax + 0x18]
test ecx, ecx
mov dword [esp + 0x14], eax
je 0x4818af
push eax
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov eax, dword [esi + 0x24]
test eax, eax
push edi
je 0x4818bc
cmp dword [esi + 0x28], eax
jae 0x4818de
mov edi, dword [esp + 0x1c]
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x2c]
push edi
push ebp
push eax
call fcn.004817b0
mov dword [ebx], eax
mov ecx, dword [esi + 0x28]
add ecx, eax
sub edi, eax
mov dword [esi + 0x28], ecx
add ebp, eax
jmp 0x4818e2
mov edi, dword [esp + 0x1c]
mov eax, dword [esi + 0x30]
test eax, eax
je 0x48196f
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
push 0
push 0
sub ecx, edx
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, 0xffffffff
jne 0x481924
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x481918
push eax
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
call fcn.004368a0
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
mov eax, dword [esi + 0x30]
push 0
lea edx, [esp + 0x20]
push edx
push edi
push ebp
push eax
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x481961
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x481955
push eax
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
call fcn.004368a0
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
mov edx, dword [esi + 0x28]
mov eax, dword [esp + 0x1c]
add edx, eax
mov dword [esi + 0x28], edx
add dword [ebx], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x481981
push eax
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
cmp dword [ebx], edi
pop edi
pop esi
sbb eax, eax
pop ebx
neg eax
pop ebp
ret 0x10
Function at 0x48c900
Capabilities:
Terminate process

Disassembly:
push esi
push 0x28
call fcn.004bab03
mov esi, eax
add esp, 4
test esi, esi
jne 0x48c91b
mov eax, str.out_of_dynamic_memory_in_yy_create_buffer__
jmp 0x48c8e0
mov eax, dword [esp + 0xc]
mov dword [esi + 0xc], eax
add eax, 2
push eax
call fcn.004bab03
add esp, 4
test eax, eax
mov dword [esi + 4], eax
jne 0x48c93f
mov eax, str.out_of_dynamic_memory_in_yy_create_buffer__
jmp 0x48c8e0
push esi
mov dword [esi + 0x14], 1
call fcn.0048c880
mov eax, dword [esp + 0xc]
mov dword [esi], eax
add esp, 4
mov dword [esi + 0x20], 1
mov dword [esi + 0x18], 0
mov eax, esi
pop esi
ret
Function at 0x498f90
Capabilities:
Enumerate pe sections

Disassembly:
push esi
mov esi, dword [esp + 8]
mov cl, byte [esi + 0x41]
test cl, cl
mov eax, dword [esi + 0x18]
jne 0x498fad
mov eax, dword [esp + 0xc]
mov dword [eax], 1
xor eax, eax
pop esi
ret
push ebx
mov ebx, dword [esi + 0x1c]
inc ebx
mov dword [esi + 0x1c], ebx
mov word [esi + 0x3a], 0
movzx edx, word [eax + 0x14]
mov ecx, ebx
cmp ecx, edx
jl 0x4990af
mov cl, byte [eax + 4]
test cl, cl
jne 0x499017
movzx ecx, byte [eax + 8]
mov edx, dword [eax + 0x44]
lea eax, [ecx + edx + 8]
movzx ecx, byte [eax + 2]
xor edx, edx
mov dh, byte [eax]
push esi
mov dl, byte [eax + 1]
movzx eax, byte [eax + 3]
shl edx, 8
or edx, ecx
shl edx, 8
or edx, eax
call fcn.004988c0
add esp, 4
test eax, eax
jne 0x499097
call fcn.004989d0
mov ecx, dword [esp + 0x10]
pop ebx
mov dword [ecx], 0
pop esi
ret
push ebp
push edi
lea esp, [esp]
mov eax, dword [eax + 0x4c]
test eax, eax
je 0x49909a
cmp dword [eax + 0x48], 1
ja 0x499045
movzx edx, byte [eax + 8]
mov eax, dword [eax + 0x44]
movzx ecx, byte [edx + eax + 4]
mov ch, byte [edx + eax + 3]
lea eax, [edx + eax + 3]
test ecx, ecx
je 0x49909a
mov ebp, dword [esi + 0x18]
mov edi, dword [ebp + 0x4c]
mov edx, dword [edi + 0x44]
movzx ebx, word [ebp + 0x10]
push edx
call fcn.004af5b0
mov eax, dword [ebp + 0x44]
push eax
call fcn.004b0350
mov dword [esi + 0x18], edi
mov word [esi + 0x3a], 0
mov dword [esi + 0x1c], ebx
movzx ecx, word [edi + 0x14]
add esp, 8
cmp ebx, ecx
mov eax, edi
jge 0x499020
mov eax, dword [esp + 0x18]
mov dword [eax], 0
mov cl, byte [edi + 6]
test cl, cl
je 0x4990a8
push eax
push esi
call fcn.00498f90
add esp, 8
pop edi
pop ebp
pop ebx
pop esi
ret
mov edx, dword [esp + 0x18]
mov dword [edx], 1
mov byte [esi + 0x41], 0
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], 0
mov cl, byte [eax + 4]
test cl, cl
je 0x4990c5
pop ebx
xor eax, eax
pop esi
ret
call fcn.004989d0
pop ebx
pop esi
ret
Function at 0x499b90
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x18]
push edi
mov edi, ecx
mov cl, byte [ebx + 2]
test cl, cl
jne 0x499c7d
movzx edx, word [ebx + 0x12]
lea ecx, [edi + 2]
cmp ecx, edx
jg 0x499c7d
movzx eax, word [ebx + 0xe]
movzx edx, word [ebx + 0x14]
movzx ecx, byte [ebx + 8]
lea edx, [eax + edx*2 + 2]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x18]
lea eax, [eax + edx*2]
push ebp
mov ebp, dword [ebx + 0x44]
movzx edx, byte [ecx + ebp + 6]
mov dh, byte [ecx + ebp + 5]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x14], ecx
sub edx, edi
cmp eax, edx
jle 0x499bf8
push ebx
call fcn.00497660
add esp, 4
push edi
push ebx
call fcn.004977c0
add word [ebx + 0x12], 0xfffe
mov ecx, edi
mov edx, ecx
shr ecx, 2
add esp, 8
inc word [ebx + 0x14]
lea edi, [eax + ebp]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0xc]
mov esi, dword [esp + 0x10]
add ecx, 0xfffffffe
cmp ecx, esi
lea edx, [ecx + ebp]
jle 0x499c51
sub ecx, esi
dec ecx
shr ecx, 1
inc ecx
mov edi, ecx
lea esp, [esp]
mov cl, byte [edx - 2]
mov byte [edx], cl
mov cl, byte [edx - 1]
mov byte [edx + 1], cl
add edx, 0xfffffffe
dec edi
jne 0x499c40
mov byte [esi + ebp + 1], al
mov edx, eax
shr edx, 8
mov byte [esi + ebp], dl
movzx eax, word [ebx + 0x14]
mov esi, dword [esp + 0x14]
mov ecx, eax
shr ecx, 8
mov byte [esi + ebp + 3], cl
mov byte [esi + ebp + 4], al
pop ebp
pop edi
mov byte [ebx + 1], 1
pop esi
add esp, 0xc
ret
test eax, eax
je 0x499c95
mov ecx, edi
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, eax
mov al, byte [ebx + 2]
movzx ecx, al
inc al
mov byte [ebx + 2], al
mov ax, word [esp + 0x18]
mov dword [ebx + ecx*8 + 0x18], esi
pop edi
mov word [ebx + ecx*8 + 0x1c], ax
mov word [ebx + 0x12], 0
pop esi
add esp, 0xc
ret
Function at 0x49c040
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
ret

Function at 0x49c170
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
mov eax, dword [0x588744]
sub esp, 0x138
test eax, eax
je 0x49c19c
push 0x118
push eax
lea eax, [esp + 8]
push eax
call fcn.004bc230
add esp, 0xc
mov byte [esp + 0x118], 0
jmp 0x49c1ab
lea ecx, [esp]
push ecx
push 0x118
call dword [sym.imp.KERNEL32.DLL_GetTempPathA]
lea eax, [esp]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x49c1b1
sub eax, edx
test eax, eax
jle 0x49c1cd
lea ecx, [esp]
dec ecx
cmp byte [ecx + eax], 0x5c
jne 0x49c1cd
dec eax
test eax, eax
jg 0x49c1c2
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.DLL_GetFileAttributesA]
push esi
push edi
mov edi, dword [esp + 0x14c]
mov byte [esp + eax + 0x10], 0
lea edx, [esp + 0x10]
push edx
push str._s_sqlite_
push edi
call fcn.004bc41d
mov esi, edi
add esp, 0xc
lea ecx, [esi + 1]
jmp 0x49c200
mov al, byte [esi]
inc esi
test al, al
jne 0x49c200
sub esi, ecx
lea eax, [esi + edi]
push eax
push 0xf
call fcn.004b1040
add esp, 8
mov ecx, 3
lea esp, [esp]
movzx eax, byte [esi + edi]
xor edx, edx
mov ebx, 0x3e
div ebx
inc esi
mov dl, byte [edx + str.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
mov byte [esi + edi - 1], dl
movzx eax, byte [esi + edi]
xor edx, edx
div ebx
inc esi
mov al, byte [edx + str.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
mov byte [esi + edi - 1], al
movzx eax, byte [esi + edi]
xor edx, edx
div ebx
inc esi
mov dl, byte [edx + str.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
mov byte [esi + edi - 1], dl
movzx eax, byte [esi + edi]
xor edx, edx
div ebx
inc esi
mov al, byte [edx + str.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
mov byte [esi + edi - 1], al
movzx eax, byte [esi + edi]
xor edx, edx
div ebx
inc esi
dec ecx
mov dl, byte [edx + str.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]
mov byte [esi + edi - 1], dl
jne 0x49c220
push edi
mov byte [esi + edi], 0
call ebp
cmp eax, 0xffffffff
jne 0x49c1e3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x138
ret

Function at 0x49c2d0
Capabilities:
Read file on windows

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
push 0
lea eax, [esp + 0x14]
push eax
mov eax, dword [edx]
push esi
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x49c2f7
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
push ecx
push 1
call fcn.004733b0
mov ecx, dword [esp + 0x18]
xor eax, eax
add esp, 8
cmp ecx, esi
sete al
pop esi
dec eax
and eax, 0xa
ret
Function at 0x49c320
Capabilities:
Write file on windows

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x18]
test esi, esi
push edi
jle 0x49c36e
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov ecx, dword [ebp]
push 0
lea eax, [esp + 0x20]
push eax
push esi
push ebx
push ecx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov edi, eax
test edi, edi
je 0x49c385
mov eax, dword [esp + 0x1c]
test eax, eax
jbe 0x49c376
push eax
push 0
call fcn.004733b0
mov eax, dword [esp + 0x24]
sub esi, eax
add esp, 8
add ebx, eax
test esi, esi
jg 0x49c334
jmp 0x49c376
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x1c]
test edi, edi
je 0x49c385
cmp esi, eax
jg 0x49c385
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
pop edi
pop esi
pop ebp
mov eax, 0xd
pop ebx
ret

Function at 0x49c420
Capabilities:
Get file size

Disassembly:
push ecx
mov ecx, dword [esp + 8]
mov edx, dword [ecx]
push esi
lea eax, [esp + 4]
push eax
push edx
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
push 1
push 0
mov esi, eax
mov eax, dword [esp + 0xc]
push 0
push eax
call fcn.004bd660
mov ecx, eax
xor eax, eax
add ecx, esi
adc edx, eax
mov eax, dword [esp + 0x10]
mov dword [eax], ecx
mov dword [eax + 4], edx
xor eax, eax
pop esi
pop ecx
ret