joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404b68
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x404d98
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x404beb
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x404d98
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x404beb
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x404db4
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x404c74
xor eax, eax
push ebp
push 0x404c6d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.004049b0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x404c52
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x404dd4
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x404c52
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404c74
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.kernel32.dll_GetThreadLocale
push eax
call sub.kernel32.dll_GetLocaleInfoA
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x404d8e
cmp byte [ebp - 0xd], 0
jne 0x404cbb
cmp byte [ebp - 0x12], 0
je 0x404d8e
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x404cd4
dec ebx
cmp byte [ebx], 0x2e
je 0x404ce3
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x404cd3
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x404d8e
inc ebx
cmp byte [ebp - 0x12], 0
je 0x404d20
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x404d8e
cmp byte [ebp - 0xd], 0
je 0x404d8e
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x404d8e
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404c74
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x404d98
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x404beb
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x404d98
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x404beb
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x404db4
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x404c74
xor eax, eax
push ebp
push 0x404c6d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.004049b0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x404c52
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x404dd4
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x404c52
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404c74
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.kernel32.dll_GetThreadLocale
push eax
call sub.kernel32.dll_GetLocaleInfoA
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x404d8e
cmp byte [ebp - 0xd], 0
jne 0x404cbb
cmp byte [ebp - 0x12], 0
je 0x404d8e
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x404cd4
dec ebx
cmp byte [ebx], 0x2e
je 0x404ce3
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x404cd3
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x404d8e
inc ebx
cmp byte [ebp - 0x12], 0
je 0x404d20
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x404d8e
cmp byte [ebp - 0xd], 0
je 0x404d8e
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x404d8e
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404f24
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x404f8a
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.004042b4
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00402f7c
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x404f74
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404f91
lea eax, [ebp - 0x10]
call fcn.00404060
ret

Function at 0x407600
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x407639
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00404150
jmp 0x407642
mov eax, ebx
mov edx, esi
call fcn.004040b4
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40764c
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40766d
mov al, byte [esp]
jmp 0x40766f
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x407cf4
Capabilities:
Write file on windows

Disassembly:
add esp, 0xfffffbbc
push 0x400
lea ecx, [esp + 0x48]
call 0x407b6c
mov eax, dword [0x4179c8]
cmp byte [eax], 0
je 0x407d70
mov eax, dword [0x417920]
call fcn.00402cac
call fcn.00402634
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x48]
push eax
call sub.user32.dll_CharToOemA
push 0
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x4c]
call fcn.00406ac4
push eax
lea eax, [esp + 0x50]
push eax
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x407db8
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x407da6
push 0x40
lea eax, [esp + 8]
push eax
mov eax, dword [0x417900]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x418660]
call fcn.00404974
push eax
call sub.user32.dll_LoadStringA_1
push 0x2010
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x4c]
push eax
push 0
call sub.user32.dll_MessageBoxA_1
add esp, 0x444
ret
Function at 0x408764
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
xor edx, edx
mov dword [ebp - 0xc], edx
xor edx, edx
push ebp
push 0x4087c8
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 7]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
lea eax, [ebp - 0xc]
lea edx, [ebp - 7]
mov ecx, 7
call fcn.004042b4
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetACP
mov edx, eax
pop eax
call fcn.004068e4
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4087cf
lea eax, [ebp - 0xc]
call fcn.00404060
ret

Function at 0x40becc
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff94
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
xor eax, eax
push ebp
push 0x40c025
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0xd], 0
mov esi, 0x10
test edi, edi
jne 0x40bf0d
or esi, 0x8000000
lea eax, [ebp - 0x58]
xor ecx, ecx
mov edx, 0x44
call fcn.00402d8c
mov dword [ebp - 0x58], 0x44
mov word [ebp - 0x28], di
mov dword [ebp - 0x2c], 1
test ebx, ebx
je 0x40bf36
xor eax, eax
mov dword [ebx], eax
xor edi, edi
cmp dword [ebp - 0xc], 0
je 0x40bf48
mov eax, dword [ebp - 0xc]
call fcn.004044d0
mov edi, eax
test ebx, ebx
je 0x40bf50
xor eax, eax
mov dword [ebx], eax
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 4]
call fcn.004040f8
mov edx, dword [ebp - 0x14]
mov eax, 0x40c040
call fcn.004045b8
test eax, eax
jle 0x40bf97
mov edx, dword [ebp - 0x14]
mov eax, 0x40c04c
call fcn.004045b8
test eax, eax
jg 0x40bf97
push 0x40c04c
push dword [ebp - 0x14]
push 0x40c04c
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.004043a0
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x58]
push eax
push edi
push 0
push esi
push 0
push 0
push 0
push dword [ebp - 0x14]
push 0x40c040
push dword [ebp - 8]
lea eax, [ebp - 0x6c]
mov edx, 3
call fcn.004043a0
mov eax, dword [ebp - 0x6c]
call fcn.004044d0
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
je 0x40c007
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 0x68]
push eax
call sub.kernel32.dll_WaitForSingleObject
test eax, eax
jne 0x40bff5
mov eax, dword [ebp - 0x68]
push eax
call sub.kernel32.dll_CloseHandle_1
mov byte [ebp - 0xd], 1
jmp 0x40bffe
test ebx, ebx
je 0x40bffe
mov eax, dword [ebp - 0x68]
mov dword [ebx], eax
mov eax, dword [ebp - 0x64]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40c02c
lea eax, [ebp - 0x6c]
call fcn.00404060
lea eax, [ebp - 0x14]
call fcn.00404060
ret
Function at 0x40da00
Capabilities:
Get keyboard layout

Disassembly:
add esp, 0xfffffff4
cmp dword [0x4177b0], 0
je 0x40da98
push esp
call sub.user32.dll_GetKeyboardLayoutNameA
push 0x40da9c
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_lstrcmpA
test eax, eax
jne 0x40da3a
push 0x40daa8
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_lstrcpyA
jmp 0x40da80
push 0x40daac
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_lstrcmpA
test eax, eax
jne 0x40da5e
push 0x40dab8
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_lstrcpyA
jmp 0x40da80
push 0x40dabc
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_lstrcmpA
test eax, eax
jne 0x40da80
push 0x40dac8
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_lstrcpyA
mov eax, esp
push eax
push 0x201
push 0x401
mov eax, dword [0x4177b0]
push eax
call sub.user32.dll_SendMessageA
add esp, 0xc
ret

Function at 0x40dbc8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebx
push esi
add esp, 0xfffffff0
mov esi, edx
mov ebx, eax
mov dword [esp + 4], 4
mov dword [esp + 8], 4
lea eax, [esp + 0xc]
push eax
push 0x40dc2c
push 0x80000001
call sub.advapi32.dll_RegOpenKeyA
lea eax, [esp + 4]
push eax
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x10]
push eax
push 0
push ebx
mov eax, dword [esp + 0x20]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
je 0x40dc18
mov dword [esp], esi
mov eax, dword [esp + 0xc]
push eax
call sub.advapi32.dll_RegCloseKey_1
mov eax, dword [esp]
add esp, 0x10
pop esi
pop ebx
ret

Function at 0x40dc44
Capabilities:
Query or enumerate registry value

Disassembly:
push ebx
push esi
add esp, 0xfffffff4
mov dword [esp], ecx
mov ebx, edx
mov esi, eax
lea eax, [esp + 8]
push eax
push 0x40dca0
push 0x80000001
call sub.advapi32.dll_RegOpenKeyA
mov dword [esp + 4], 1
push esp
push ebx
lea eax, [esp + 0xc]
push eax
push 0
push esi
mov eax, dword [esp + 0x1c]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
je 0x40dc8f
push 0x40dcb8
push ebx
call sub.kernel32.dll_lstrcpyA
mov eax, dword [esp + 8]
push eax
call sub.advapi32.dll_RegCloseKey_1
add esp, 0xc
pop esi
pop ebx
ret

Function at 0x40dcbc
Capabilities:
Set registry value

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, edx
mov edi, eax
push esp
push 0x40dd00
push 0x80000001
call sub.advapi32.dll_RegCreateKeyA
mov esi, 1
push ebx
call sub.kernel32.dll_lstrlenA_1
inc eax
push eax
push ebx
push esi
push 0
push edi
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_RegSetValueExA
mov eax, dword [esp]
push eax
call sub.advapi32.dll_RegCloseKey_1
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x40dd18
Capabilities:
Set registry value

Disassembly:
push ebx
add esp, 0xfffffff8
mov dword [esp], edx
mov ebx, eax
lea eax, [esp + 4]
push eax
push 0x40dd64
push 0x80000001
call sub.advapi32.dll_RegCreateKeyA
mov edx, 4
mov eax, 4
push eax
lea eax, [esp + 4]
push eax
push edx
push 0
push ebx
mov eax, dword [esp + 0x18]
push eax
call sub.advapi32.dll_RegSetValueExA
mov eax, dword [esp + 4]
push eax
call sub.advapi32.dll_RegCloseKey_1
pop ecx
pop edx
pop ebx
ret
Function at 0x40dd7c
Capabilities:
Get keyboard layout

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffc4
mov edi, esp
mov ebp, 0x4177ac
push 0
push 0
push 0xb8
mov eax, dword [ebp]
push eax
call sub.user32.dll_SendMessageA
mov ebx, eax
push 0xffffffffffffffff
push 0
push 0xb1
mov eax, dword [ebp]
push eax
call sub.user32.dll_SendMessageA
mov dword [edi], 0x3c
mov dword [edi + 4], 0xe8000003
xor eax, eax
mov dword [edi + 0x10], eax
mov eax, 0x40decc
mov edx, 8
call fcn.0040dbc8
mov dword [edi + 0x14], eax
xor eax, eax
mov al, byte [0x4177cc]
mov eax, dword [eax*4 + 0x4172e8]
xor edx, edx
call fcn.0040dbc8
mov dword [edi + 0xc], eax
movzx esi, byte [0x4177cc]
mov edx, dword [esi*4 + 0x417318]
mov eax, dword [esi*4 + 0x417300]
call fcn.0040dbc8
mov byte [edi + 0x18], al
xor eax, eax
mov al, byte [0x4177cc]
mov eax, dword [eax*4 + 0x4172f4]
xor edx, edx
call fcn.0040dbc8
mov dword [edi + 8], eax
lea edx, [edi + 0x1a]
xor eax, eax
mov al, byte [0x4177cc]
mov eax, dword [eax*4 + 0x41730c]
mov ecx, 0x20
call fcn.0040dc44
cmp byte [edi + 0x1a], 0
jne 0x40de48
mov byte [edi + 0x19], 0x30
jmp 0x40de4c
mov byte [edi + 0x19], 0
push 0
call sub.user32.dll_GetKeyboardLayout
mov esi, eax
push edi
push 5
push 0x444
mov eax, dword [ebp]
push eax
call sub.user32.dll_SendMessageA
push edi
push 0
push 0x444
mov eax, dword [ebp]
push eax
call sub.user32.dll_SendMessageA
push 0
push esi
call sub.user32.dll_ActivateKeyboardLayout
push 0
push 0
push 0xcd
mov eax, dword [ebp]
push eax
call sub.user32.dll_SendMessageA
push 0
push ebx
push 0xb9
mov eax, dword [ebp]
push eax
call sub.user32.dll_SendMessageA
push 8
xor eax, eax
mov al, byte [0x4177cc]
add eax, 0x10
push eax
push 0x12
push 0x10
mov eax, dword [0x418954]
push eax
call sub.user32.dll_CheckMenuRadioItem
call fcn.0040d9d4
add esp, 0x3c
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x40f888
Capabilities:
Get disk information

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffddc
mov byte [esp], dl
mov edi, eax
lea ebp, [esp + 0xc]
mov al, byte [edi]
mov byte [esp + 8], al
mov byte [esp + 9], 0x3a
mov byte [esp + 0xa], 0x5c
mov byte [esp + 0xb], 0
lea eax, [esp + 8]
push eax
call sub.kernel32.dll_GetDriveTypeA
cmp eax, 3
jne 0x40fafe
push edi
call sub.kernel32.dll_lstrlenA_1
dec eax
test eax, eax
jl 0x40f8df
inc eax
xor esi, esi
cmp byte [edi + esi], 0x24
je 0x40fafe
inc esi
dec eax
jne 0x40f8d1
push 0x104
lea eax, [esp + 0x1b]
push eax
push edi
call sub.kernel32.dll_GetShortPathNameA
mov edx, ebp
mov eax, 0x40fb0c
mov ecx, 0xb
call fcn.0040dc44
mov eax, dword [0x40fb14]
mov dword [esp + 8], eax
mov dword [esp + 4], 0xffffffff
xor esi, esi
lea eax, [esi + 0x30]
mov byte [esp + 8], al
mov byte [esp + 0x11c], 0
xor ebx, ebx
jmp 0x40f948
mov al, byte [ebp + ebx]
cmp al, byte [esp + 8]
jne 0x40f947
lea edx, [esp + 0x11c]
lea eax, [esp + 8]
mov ecx, 0x105
call fcn.0040dc44
jmp 0x40f952
inc ebx
push ebp
call sub.kernel32.dll_lstrlenA_1
cmp ebx, eax
jl 0x40f926
cmp byte [esp + 0x11c], 0
jne 0x40f970
cmp dword [esp + 4], 0
jge 0x40fa07
mov dword [esp + 4], esi
jmp 0x40fa07
push 0x104
lea eax, [esp + 0x120]
push eax
lea eax, [esp + 0x124]
push eax
call sub.kernel32.dll_GetShortPathNameA
lea eax, [esp + 0x17]
push eax
lea eax, [esp + 0x120]
push eax
call sub.kernel32.dll_lstrcmpiA
test eax, eax
jne 0x40fa07
cmp byte [esp], 0
je 0x40f9cf
mov byte [esp + 0xa], 0x43
lea eax, [esp + 8]
or edx, 0xffffffff
call fcn.0040dbc8
mov esi, eax
test esi, esi
jl 0x40f9cf
push esi
push esi
push 0xb1
mov eax, dword [0x4177ac]
push eax
call sub.user32.dll_SendMessageA
test ebx, ebx
je 0x40fafe
mov al, byte [ebp + ebx]
mov byte [esp + 0x11c], al
push ebp
lea eax, [esp + 0x121]
push eax
call sub.kernel32.dll_lstrcpyA
lea eax, [ebp + ebx + 1]
push eax
lea eax, [esp + ebx + 0x121]
push eax
call sub.kernel32.dll_lstrcpyA
jmp 0x40fab7
inc esi
cmp esi, 9
jle 0x40f913
cmp dword [esp + 4], 0
jge 0x40fa24
mov al, byte [ebp + 9]
mov byte [esp + 0x11c], al
jmp 0x40fa32
mov eax, dword [esp + 4]
add eax, 0x30
mov byte [esp + 0x11c], al
mov byte [esp + 0x11d], 0x46
mov byte [esp + 0x11e], 0x43
mov byte [esp + 0x11f], 0
lea eax, [esp + 0x11c]
xor edx, edx
call fcn.0040dd18
mov byte [esp + 0x11e], 0
lea eax, [esp + 0x11c]
mov edx, edi
call fcn.0040dcbc
push ebp
lea eax, [esp + 0x121]
push eax
call sub.kernel32.dll_lstrcpyA
mov ebx, 1
jmp 0x40faa5
mov al, byte [ebp + ebx]
cmp al, byte [esp + 0x11c]
jne 0x40faa4
lea eax, [ebp + ebx + 1]
push eax
lea eax, [esp + ebx + 0x121]
push eax
call sub.kernel32.dll_lstrcpyA
jmp 0x40faaf
inc ebx
push ebp
call sub.kernel32.dll_lstrlenA_1
cmp ebx, eax
jl 0x40fa83
mov byte [esp + 0x126], 0
lea edx, [esp + 0x11c]
mov eax, 0x40fb0c
call fcn.0040dcbc
mov esi, 0x38d
push 0x40fb14
push esi
push 0
push esi
mov eax, dword [0x418954]
push eax
call sub.user32.dll_ModifyMenuA
push 0
push esi
push pe_nt_image_headers32
push esi
mov eax, dword [0x418954]
push eax
call sub.user32.dll_ModifyMenuA
dec esi
cmp esi, 0x383
jne 0x40facd
add esp, 0x224
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x40fb38
Capabilities:
Get file size
Get graphical window text

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffe4
mov esi, eax
mov byte [esp], 0
push 0xfff
push 0x40
call sub.kernel32.dll_GlobalAlloc
mov dword [esp + 0xc], eax
cmp dword [esp + 0xc], 0
je 0x40fccb
mov edi, dword [esp + 0xc]
push 0
push esi
call sub.kernel32.dll__lopen
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40fb8e
push 0
push ebx
call sub.kernel32.dll_GetFileSize_1
cmp eax, dword [0x418984]
jbe 0x40fb9d
push ebx
call sub.kernel32.dll__lclose
call fcn.0040df6c
mov eax, dword [esp + 0xc]
push eax
call sub.kernel32.dll_GlobalFree
jmp 0x40fccb
mov dword [esp + 0x10], ebx
xor eax, eax
mov dword [esp + 0x14], eax
mov eax, 0x40f854
mov dword [esp + 0x18], eax
lea eax, [esp + 0x10]
push eax
push 1
push 0x449
mov eax, dword [0x4177ac]
push eax
call sub.user32.dll_SendMessageA
push ebx
call sub.kernel32.dll__lclose
cmp dword [esp + 0x14], 0
jne 0x40fb89
call fcn.0040e0a4
push 0
push 0
push 0xb9
mov eax, dword [0x4177ac]
push eax
call sub.user32.dll_SendMessageA
push esi
push 0x418af4
call sub.kernel32.dll_lstrcpyA
mov byte [esp], 1
mov eax, 0x418af4
mov dl, 1
call fcn.0040f888
call fcn.0040f7c0
xor eax, eax
mov dword [esp + 4], eax
xor esi, esi
xor eax, eax
mov dword [esp + 8], eax
push edi
push 0xffd
push 0xd
mov eax, dword [0x4177ac]
push eax
call sub.user32.dll_SendMessageA
mov ebp, eax
dec ebp
test ebp, ebp
jl 0x40fc91
inc ebp
xor edx, edx
mov eax, dword [0x417834]
jmp 0x40fc48
cmp cl, byte [edi + edx]
jne 0x40fc47
inc esi
jmp 0x40fc67
inc eax
mov cl, byte [eax]
test cl, cl
jne 0x40fc3f
mov eax, dword [0x417838]
jmp 0x40fc61
cmp cl, byte [edi + edx]
jne 0x40fc60
inc dword [esp + 4]
jmp 0x40fc67
inc eax
mov cl, byte [eax]
test cl, cl
jne 0x40fc55
cmp byte [edi + edx], 0x61
jae 0x40fc8d
cmp byte [edi + edx + 1], 0xe0
jb 0x40fc8d
cmp byte [edi + edx + 1], 0xff
ja 0x40fc8d
cmp byte [edi + edx + 2], 0xc0
jb 0x40fc8d
cmp byte [edi + edx + 2], 0xdf
ja 0x40fc8d
inc dword [esp + 8]
inc edx
dec ebp
jne 0x40fc38
xor edx, edx
cmp esi, dword [esp + 4]
jge 0x40fca0
mov edx, 1
jmp 0x40fcab
cmp esi, dword [esp + 8]
jge 0x40fcab
mov edx, 2
xor eax, eax
mov al, byte [0x4177cc]
cmp edx, eax
je 0x40fcc1
mov byte [0x4177cc], dl
call fcn.0040ded0
mov eax, dword [esp + 0xc]
push eax
call sub.kernel32.dll_GlobalFree
mov al, byte [esp]
add esp, 0x1c
pop ebp
pop edi
pop esi
pop ebx
ret