joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407e40
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42db11
mov eax, dword fs:[0]
push eax
push ebx
push esi
push edi
mov eax, dword [0x44205c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
xor ebx, ebx
mov edx, 1
mov dword [esi + 4], ebx
mov dword [esi + 8], edx
mov dword [ebp - 4], ebx
fldz
mov dword [esi], vtable.gge::ggeGuiWindow.0
or ecx, 0xffffffff
mov dword [esi + 0xc], ecx
mov edi, dword [eax]
mov dword [esi + 0x10], edi
mov edi, dword [eax + 4]
mov dword [esi + 0x14], edi
mov edi, dword [eax + 8]
mov dword [esi + 0x18], edi
mov edi, dword [eax + 0xc]
mov dword [esi + 0x1c], edi
mov eax, dword [eax + 0x10]
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], 0x10100
mov byte [esi + 0x28], bl
xor eax, eax
mov word [esi + 0x2a], ax
mov dword [esi + 0x2c], ebx
mov byte [esi + 0x30], bl
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], ebx
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x40], ebx
mov dword [esi + 0x44], ebx
mov dword [esi + 0x48], ebx
mov dword [esi + 0x4c], ebx
mov dword [esi + 0x50], ebx
mov dword [esi + 0x58], ebx
mov dword [esi + 0x5c], ebx
fst dword [esi + 0x60]
fst dword [esi + 0x64]
mov byte [esi + 0x70], dl
fst dword [esi + 0x68]
mov eax, 0xff000000
fst dword [esi + 0x6c]
mov dword [esi + 0x74], ecx
fst dword [esi + 0x78]
mov dword [esi + 0x88], ecx
fst dword [esi + 0x7c]
mov dword [esi + 0x8c], eax
fst dword [esi + 0x80]
mov dword [esi + 0x90], ebx
fst dword [esi + 0x84]
fst dword [esi + 0x94]
fst dword [esi + 0x98]
mov dword [esi + 0x9c], ebx
mov dword [esi + 0xa0], ebx
fst dword [esi + 0xa4]
fst dword [esi + 0xa8]
mov byte [esi + 0xb4], dl
fst dword [esi + 0xac]
fst dword [esi + 0xb0]
mov dword [esi + 0xb8], ecx
fst dword [esi + 0xbc]
mov dword [esi + 0xcc], ecx
fst dword [esi + 0xc0]
mov dword [esi + 0xd0], eax
fst dword [esi + 0xc4]
mov dword [esi + 0xd4], ebx
fst dword [esi + 0xc8]
fst dword [esi + 0xd8]
fstp dword [esi + 0xdc]
mov byte [ebp - 4], 2
mov ecx, esi
mov dword [esi + 0xe0], ebx
call dword [sym.imp.galaxy2d.dll_private:_void___thiscall_gge::ggeGuiWindow::_CreateWindowData_void_]
fldz
sub esp, 0x10
fst dword [esp + 0xc]
fst dword [esp + 8]
fst dword [esp + 4]
fstp dword [esp]
push ebx
call dword [sym.imp.galaxy2d.dll_class_gge::ggeSprite____stdcall_gge::Sprite_Create_class_gge::ggeTexture___float__float__float__float_]
fld dword [esi + 0x18]
fadd dword [esi + 0x10]
mov dword [esi + 0x54], eax
mov eax, esi
fstp dword [esi + 0x18]
fld dword [esi + 0x14]
fadd dword [esi + 0x1c]
fstp dword [esi + 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x41a390
Capabilities:
Terminate thread

Disassembly:
mov eax, dword [esi]
test eax, eax
je 0x41a3a8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi + 0x24]
mov edx, dword [0x447408]
push ecx
push 0xffffd8f0
push edx
call dword [sym.imp.lua51.dll_luaL_unref]
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.lua51.dll_lua_close]
add esp, 0x10
lea ecx, [esi + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push esi
call fcn.0041bf8e
add esp, 4
mov eax, esi
ret

Function at 0x41ba1b
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x44205c]
jne 0x41ba25
repz ret
jmp fcn.0041c6a7

Function at 0x420e2a
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x44205c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.0041e384
and dword [ebp - 0x14], 0
cmp dword [0x4473d0], 0
mov dword [ebp - 0x18], eax
jne 0x420edd
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x420f85
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x420f85
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x4473d0], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x4473d4], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x4473d8], eax
call edi
push eax
call esi
mov dword [0x4473e0], eax
test eax, eax
je 0x420edd
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x4473dc], eax
mov eax, dword [0x4473dc]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x420f36
cmp dword [0x4473e0], ecx
je 0x420f36
push eax
call esi
push dword [0x4473e0]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x420f36
test ebx, ebx
je 0x420f36
call edi
test eax, eax
je 0x420f2d
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x420f2d
test byte [ebp - 8], 1
jne 0x420f36
or dword [ebp + 0x10], 0x200000
jmp 0x420f69
mov eax, dword [0x4473d4]
cmp eax, dword [ebp - 0x18]
je 0x420f69
push eax
call esi
test eax, eax
je 0x420f69
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x420f69
mov eax, dword [0x4473d8]
cmp eax, dword [ebp - 0x18]
je 0x420f69
push eax
call esi
test eax, eax
je 0x420f69
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x4473d0]
call esi
test eax, eax
je 0x420f85
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x420f87
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041ba1b
leave
ret
Function at 0x429230
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x24
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov eax, dword [edx + 0x78]
mov ebx, dword [edx + 0x8c]
cmp eax, ebx
mov eax, dword [edx + 0x34]
mov ebx, dword [edx + 0x7c]
jl 0x429255
shr ebx, 2
dec ebx
shl ebx, 0x10
or ebx, eax
mov dword [esp], ebx
mov eax, dword [edx + 0x90]
mov ebx, dword [edx + 0x74]
cmp ebx, eax
jl 0x42926d
mov ebx, eax
mov dword [esp + 0x18], ebx
mov esi, dword [edx + 0x38]
mov dword [esp + 4], esi
mov ebp, dword [edx + 0x6c]
lea edi, [ebp + esi]
mov dword [esp + 0x20], edi
mov eax, edi
neg eax
and eax, 3
mov dword [esp + 0x14], eax
mov eax, dword [edx + 0x2c]
sub eax, 0x106
sub ebp, eax
jg 0x42929c
xor ebp, ebp
mov eax, dword [edx + 0x78]
mov dword [esp + 0x1c], eax
add esi, eax
mov dword [esp + 8], esi
movzx ebx, word [edi]
mov dword [esp + 0x10], ebx
movzx ebx, word [eax + edi - 1]
mov dword [esp + 0xc], ebx
mov edi, dword [edx + 0x40]
mov edx, dword [esp]
jmp 0x4292de
and ecx, edx
movzx ecx, word [edi + ecx*2]
cmp ecx, ebp
jbe 0x4293b2
sub edx, 0x10000
js 0x4293b2
movzx eax, word [ecx + esi - 1]
cmp eax, ebx
jne 0x4292c4
mov eax, dword [esp + 4]
movzx eax, word [ecx + eax]
cmp eax, dword [esp + 0x10]
jne 0x4292c4
mov dword [esp], edx
mov esi, dword [esp + 4]
mov edi, dword [esp + 0x20]
add esi, ecx
mov eax, dword [esp + 0x14]
mov edx, 0xfffffef8
lea edi, [eax + edi + 0x108]
lea esi, [eax + esi + 0x108]
mov eax, dword [edx + esi]
xor eax, dword [edx + edi]
jne 0x429335
mov eax, dword [edx + esi + 4]
xor eax, dword [edx + edi + 4]
jne 0x429332
add edx, 8
jne 0x429319
jmp 0x4293a3
add edx, 4
test eax, 0xffff
jne 0x429342
add edx, 2
shr eax, 0x10
sub al, 1
adc edx, 0
lea eax, [edx + edi]
mov edi, dword [esp + 0x20]
sub eax, edi
cmp eax, 0x102
jge 0x4293a3
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x1c]
cmp eax, ebx
jg 0x429376
mov esi, dword [esp + 8]
mov edi, dword [edx + 0x40]
mov ebx, dword [esp + 0xc]
mov edx, dword [esp]
jmp 0x4292c4
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
mov dword [edx + 0x70], ecx
cmp eax, ebx
jge 0x4293b2
mov esi, dword [esp + 4]
add esi, eax
mov dword [esp + 8], esi
movzx ebx, word [eax + edi - 1]
mov edi, dword [edx + 0x40]
mov dword [esp + 0xc], ebx
mov edx, dword [esp]
jmp 0x4292c4
mov edx, dword [esp + 0x38]
mov dword [esp + 0x1c], 0x102
mov dword [edx + 0x70], ecx
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x1c]
mov eax, dword [edx + 0x74]
cmp ebx, eax
jg 0x4293c3
mov eax, ebx
add esp, 0x24
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4013e0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x5a0f10]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov edi, edx
lea edx, [ebp - 0xc]
mov dword [ebp - 0x18], eax
call fcn.004010a0
lea eax, [ebp - 0xc]
xor esi, esi
sub edi, eax
lea esp, [esp]
lea ecx, [ebp - 0xc]
add ecx, esi
inc esi
mov al, byte [edi + ecx]
xor byte [ecx], al
cmp esi, 6
jl 0x401410
mov edx, dword [ebp - 0xc]
mov al, dl
shr al, 2
mov byte [ebp - 0x14], al
mov cl, dl
and cl, 3
shl cl, 4
mov al, dh
shr al, 4
or cl, al
mov byte [ebp - 0x13], cl
mov cl, byte [ebp - 0xa]
mov al, cl
and cl, 0x3f
shr al, 6
mov byte [ebp - 0x11], cl
mov cl, byte [ebp - 9]
mov dl, dh
and dl, 0xf
shl dl, 2
or dl, al
mov al, cl
shr al, 2
mov byte [ebp - 0x12], dl
mov dl, byte [ebp - 8]
mov byte [ebp - 0x10], al
and cl, 3
mov al, dl
shl cl, 4
shr al, 4
or cl, al
mov byte [ebp - 0xf], cl
mov cl, byte [ebp - 7]
and dl, 0xf
mov al, cl
shl dl, 2
shr al, 6
or dl, al
and cl, 0x3f
push ebx
mov byte [ebp - 0xe], dl
mov byte [ebp - 0xd], cl
xor ebx, ebx
mov al, byte [ebp + ebx - 0x14]
movzx edx, al
and al, 1
shl al, 4
movzx ecx, al
mov eax, edx
shr eax, 1
and eax, 0xf
or ecx, eax
and edx, 0x20
or ecx, edx
movzx eax, bl
shl eax, 6
inc ebx
mov dl, byte [ecx + eax + 0x5a2270]
and dl, 0xf
movsx ecx, dl
shr ecx, 3
mov al, dl
and al, 1
shl al, 3
and cl, 1
or cl, al
mov al, dl
shr al, 1
and al, 2
and dl, 2
or cl, al
add dl, dl
or cl, dl
mov byte [ebp + ebx - 0x15], cl
cmp ebx, 8
jl 0x401492
xor ecx, ecx
pop ebx
lea ecx, [ecx]
mov al, byte [ebp + ecx*2 - 0x14]
shl al, 4
or al, byte [ebp + ecx*2 - 0x13]
inc ecx
mov byte [ebp + ecx - 0xd], al
cmp ecx, 4
jl 0x4014f0
mov dword [ebp - 0x10], 0
xor eax, eax
mov edi, edi
movzx esi, byte [eax + 0x5a2470]
mov edx, esi
and edx, 7
mov ecx, 7
sub ecx, edx
mov edx, 1
shl edx, cl
shr esi, 3
test byte [ebp + esi - 0xc], dl
je 0x40154f
mov ecx, eax
shr ecx, 3
lea esi, [ebp - 0x10]
add esi, ecx
mov edx, eax
and edx, 7
mov ecx, 7
sub ecx, edx
mov dl, 1
shl dl, cl
or byte [esi], dl
inc eax
cmp eax, 0x20
jne 0x401510
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0052626d
mov esp, ebp
pop ebp
ret
Function at 0x40258e
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, 0x45f87e
call fcn.00444db8
push ecx
push esi
push edi
mov esi, ecx
xor edi, edi
mov dword [ebp - 0x10], esi
mov word [esi + 8], di
mov word [esi + 0xa], di
mov word [esi + 0xc], di
lea ecx, [esi + 0x34]
mov dword [esi + 0x2c], edi
mov dword [esi + 0x30], edi
call fcn.00402618
lea ecx, [esi + 0x60]
mov dword [ebp - 4], edi
mov dword [esi + 0x58], edi
mov dword [esi + 0x5c], edi
call fcn.00402667
lea eax, [esi + 0x84]
mov byte [ebp - 4], 1
lea ecx, [eax + 8]
mov dword [eax], edi
mov dword [eax + 4], edi
call fcn.004026b6
push 8
push edi
push esi
call fcn.004447a0
push 0x14
lea eax, [esi + 0xe]
push edi
push eax
call fcn.004447a0
push 0xa
lea eax, [esi + 0x22]
push edi
push eax
call fcn.004447a0
mov ecx, dword [ebp - 0xc]
add esp, 0x24
mov eax, esi
mov dword fs:[0], ecx
pop edi
pop esi
leave
ret

Function at 0x4027e6
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push 0x119b
mov esi, ecx
push dword [0x46f8a8]
call fcn.0040a517
push dword [ebp + 0x14]
mov ecx, esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00403946
mov eax, dword [esi + 0x1c0]
cmp eax, 0xffffffff
je 0x402823
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
push edi
push 0x80
push 3
push edi
push 3
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esi + 0x1c0], eax
je 0x402909
push edi
push edi
push edi
push 2
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, edi
mov dword [esi + 0x1c4], eax
je 0x402909
push edi
push edi
push edi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, edi
mov dword [esi + 0x1c8], eax
je 0x402909
mov ecx, 0xf24af34d
mov dword [ebp - 4], eax
cmp dword [eax], ecx
jne 0x40289d
cmp dword [eax + 4], ecx
jne 0x40289d
mov ecx, esi
call fcn.004039f1
jmp 0x402954
lea eax, [ebp - 4]
lea ecx, [esi + 0x104]
push eax
call fcn.00402db1
test al, al
je 0x402909
push 0x1199
push dword [0x46f8a8]
call fcn.0040a517
lea eax, [ebp - 4]
lea ecx, [esi + 0x130]
push eax
call fcn.0040295a
test al, al
je 0x402909
push 0x119a
push dword [0x46f8a8]
call fcn.0040a517
lea eax, [ebp - 4]
lea ecx, [esi + 0x15c]
push eax
call fcn.00402b07
test al, al
je 0x402909
lea eax, [ebp - 4]
lea ecx, [esi + 0x188]
push eax
call fcn.00402c98
test al, al
jne 0x40290d
xor al, al
jmp 0x402954
cmp word [esi + 0x10e], 2
push ebx
jne 0x402951
cmp dword [esi + 0x1b4], edi
mov ebx, dword [sym.imp.USER32.dll_FindWindowA]
mov byte [esi + 0x1cc], 1
jne 0x40293b
push str.DemoNow
push edi
call ebx
mov dword [esi + 0x1b4], eax
cmp dword [esi + 0x1b4], edi
jne 0x402951
push str.InstallFromTheWeb
push edi
call ebx
mov dword [esi + 0x1b4], eax
mov al, 1
pop ebx
pop edi
pop esi
leave
ret 0x10
Function at 0x403470
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push ebx
push esi
push edi
push 0x13
push dword [ebp + 8]
mov esi, ecx
call fcn.0040445e
xor ebx, ebx
cmp eax, ebx
je 0x403563
cmp dword [eax], ebx
jne 0x40354c
push dword [eax + 0x1c]
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x108]
push str.Text
push eax
call fcn.00409cbb
test eax, eax
je 0x403563
push ebx
push 0x80
push 3
push ebx
push 1
lea eax, [ebp - 0x108]
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x4034f1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x403563
mov eax, dword [ebp + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
mov eax, dword [eax]
push dword [ebp + 8]
lea esi, [eax - 1]
call edi
cmp eax, esi
jae 0x403511
push ebx
push dword [ebp + 8]
call edi
mov esi, eax
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 4]
push ebx
push eax
push esi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 4], esi
je 0x403533
cmp dword [ebp + 8], ebx
je 0x403563
push dword [ebp + 8]
jmp 0x4034e9
mov eax, dword [ebp + 0x10]
mov byte [esi + edi], bl
inc esi
cmp dword [ebp + 8], ebx
mov dword [eax], esi
je 0x403591
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x403591
lea eax, [ebp - 4]
mov ecx, esi
push eax
push 0x13
push dword [ebp + 8]
mov dword [ebp - 4], ebx
call fcn.004033cd
cmp eax, ebx
jne 0x403567
xor al, al
jmp 0x403593
mov esi, dword [ebp + 0x10]
mov ecx, dword [esi]
dec ecx
cmp dword [ebp - 4], ecx
jb 0x403575
mov dword [ebp - 4], ecx
push dword [ebp - 4]
mov edi, dword [ebp + 0xc]
push eax
push edi
call fcn.00444e70
mov eax, dword [ebp - 4]
add esp, 0xc
mov byte [eax + edi], bl
mov eax, dword [ebp - 4]
inc eax
mov dword [esi], eax
mov al, 1
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x4047db
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
test esi, esi
je 0x404853
push dword [esi + 0x1c]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x404853
test byte [esi + 0x10], 8
lea eax, [ebp - 0x108]
push 0x104
push eax
je 0x404816
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x404829
call fcn.0040a167
lea eax, [ebp - 0x108]
push 1
push eax
call fcn.00409392
push dword [esi + 0x1c]
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp byte [ebp + 0xc], 0
je 0x4048b0
lea eax, [ebp + 8]
push 1
push eax
push esi
mov ecx, edi
call fcn.00404512
mov edi, eax
test edi, edi
jne 0x404857
xor al, al
jmp 0x4048bf
push 0
push 0x80
push 2
push 0
push 1
lea eax, [ebp - 0x108]
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4048a8
lea eax, [ebp - 4]
push 0
push eax
push dword [ebp + 8]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 4]
sete byte [ebp + 0xf]
test esi, esi
je 0x4048a3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp + 0xf]
jmp 0x4048bf
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov al, 1
pop edi
pop esi
leave
ret 8
Function at 0x4048c5
Capabilities:
Get file size
Read file via mapping

Disassembly:
mov eax, 0x45fa44
call fcn.00444db8
sub esp, 0x218
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov ebx, ecx
cmp esi, edi
mov dword [ebp - 0x10], ebx
je 0x4049e9
cmp dword [esi + 0x18], edi
jne 0x404a94
cmp word [ebx + 0x10e], 2
jne 0x404a5a
movsx eax, word [esi + 0xc]
push eax
lea eax, [ebp - 0x224]
push str._u.sce
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x120]
push eax
push ebx
call fcn.004092fa
lea eax, [ebp - 0x120]
push 1
push eax
call fcn.00409392
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push edi
push 0x80
push 3
push edi
push 1
lea eax, [ebp - 0x120]
push SysReAllocStringLen
push eax
call ebx
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
mov dword [ebp - 4], edi
jne 0x4049c3
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x224]
push eax
movsx eax, word [esi + 0xc]
push eax
call fcn.00404e43
push edi
push 0x80
push 3
push edi
push 1
lea eax, [ebp - 0x120]
push SysReAllocStringLen
push eax
call ebx
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
push 0xffffffffffffffff
je 0x4049bb
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
mov eax, dword [ebp + 8]
mov dword [ebp + 8], eax
jmp 0x4049c9
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4049e9
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push edi
push edi
push 2
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, edi
mov dword [ebp - 0x1c], eax
jne 0x4049f0
cmp dword [ebp + 8], edi
je 0x4049e9
push dword [ebp + 8]
call ebx
xor eax, eax
jmp 0x404a9f
push edi
push edi
push edi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push edi
mov dword [ebp - 0x14], eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
mov ax, word [eax + 0x110]
push eax
lea eax, [ebp - 0x18]
push dword [esi + 4]
push eax
push dword [ebp - 0x14]
call fcn.0040584d
add esp, 0x10
mov ecx, esi
mov dword [ebp - 0x10], eax
push dword [ebp - 0x18]
push eax
call fcn.00404ab0
push dword [ebp - 0x10]
call fcn.00444382
pop ecx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x1c]
call ebx
cmp dword [ebp + 8], edi
je 0x404a94
push dword [ebp + 8]
call ebx
jmp 0x404a94
mov ecx, dword [esi]
mov eax, dword [ebx + 0x1c8]
add eax, dword [esi + 8]
mov dword [ebp + 8], ecx
mov cx, word [ebx + 0x110]
push ecx
lea ecx, [ebp + 8]
push dword [esi + 4]
push ecx
push eax
call fcn.0040584d
add esp, 0x10
mov edi, eax
mov ecx, esi
push dword [ebp + 8]
push edi
call fcn.00404ab0
push edi
call fcn.00444382
pop ecx
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 0x14]
mov dword [ecx], eax
mov eax, dword [esi + 0x18]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8
Function at 0x404be6
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
test esi, esi
je 0x404c69
cmp dword [esi + 0x14], 0
jne 0x404c7f
mov eax, dword [edi + 0x1c0]
cmp eax, 0xffffffff
je 0x404c69
push 0
push 0
push dword [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x404c69
mov eax, dword [esi]
inc eax
push eax
call fcn.00444e5b
pop ecx
mov dword [esi + 0x14], eax
lea ecx, [ebp - 4]
push 0
push ecx
push dword [esi]
push eax
push dword [edi + 0x1c0]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi]
cmp dword [ebp - 4], eax
jne 0x404c69
mov dword [ebp + 8], eax
mov ax, word [edi + 0x110]
push eax
lea eax, [ebp + 8]
push dword [esi + 4]
push eax
push dword [esi + 0x14]
call fcn.0040584d
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x404c6d
xor eax, eax
jmp 0x404c8a
mov eax, dword [ebp + 8]
push dword [esi + 0x14]
mov dword [esi + 4], eax
call fcn.00444382
pop ecx
mov dword [esi + 0x14], edi
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 4]
mov dword [ecx], eax
mov eax, dword [esi + 0x14]
pop edi
pop esi
leave
ret 8

Function at 0x404d41
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, 0x45fa6c
call fcn.00444db8
sub esp, 0x104
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp esi, edi
je 0x404e20
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
push dword [esi + 0x1c]
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x110]
push str.Image
push eax
call fcn.00409cbb
test eax, eax
je 0x404e2f
push edi
push 0x80
push 3
push edi
push 1
lea eax, [ebp - 0x110]
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp + 8], ebx
cmp ebx, 0xffffffff
mov dword [ebp - 4], edi
jne 0x404dbc
push eax
jmp 0x404e1a
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov eax, dword [esi + 0x24]
test eax, eax
je 0x404dd4
push eax
call fcn.00444382
pop ecx
lea eax, [edi + 1]
push eax
call fcn.00444e5b
mov dword [esi + 0x24], eax
pop ecx
movzx eax, byte [esi + 0xf]
dec eax
dec eax
je 0x404dfe
sub eax, 5
je 0x404dfe
push 0
push 0
push 0xe
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub edi, 0xe
push 0
push dword [ebp + 0xc]
push edi
push dword [esi + 0x24]
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp + 0xc]
cmp dword [eax], edi
je 0x404e24
test ebx, ebx
je 0x404e20
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x404e32
test ebx, ebx
je 0x404e2f
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x24]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8