joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41be90
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x42e1e0
call sym._EnterCriticalSection_4
mov ebx, dword [0x42e1d8]
sub esp, 4
test ebx, ebx
je 0x41bedb
nop
mov eax, dword [ebx]
mov dword [esp], eax
call sym._TlsGetValue_4
sub esp, 4
mov esi, eax
call sym._GetLastError_0
test eax, eax
jne 0x41bed4
test esi, esi
je 0x41bed4
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x41beb0
mov dword [esp], 0x42e1e0
call sym._LeaveCriticalSection_4
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x41c0c0
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
lea esi, [esp + 0x24]
mov dword [esp], str.Mingw_runtime_failure:_n
lea ebx, [eax + 0x40]
mov dword [esp + 0xc], ebx
call sym._fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x41c110
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
mov ebx, eax
mov esi, edx
sub esp, 0x4c
lea eax, [esp + 0x24]
mov dword [esp + 8], 0x1c
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._VirtualQuery_12
sub esp, 0xc
test eax, eax
je 0x41c1e8
mov eax, dword [esp + 0x38]
cmp eax, 0x40
je 0x41c14e
cmp eax, 4
jne 0x41c170
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sym._memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
lea ebp, [esp + 0x20]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0x1c], edx
call sym._memcpy
mov edx, dword [esp + 0x1c]
cmp edx, 0x40
je 0x41c15e
cmp edx, 4
je 0x41c15e
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.0041c0c0
Function at 0x41e444
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebp - 0x2c]
mov dword [eax], 0
mov eax, dword [ebp - 0x2c]
add eax, 4
mov dword [esp], 0
mov ecx, eax
call method.mingw_stdthread::thread::id.id_unsigned_long_
sub esp, 4
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym.void__Timer::std::forward_void__Timer::_____std::remove_reference_void__Timer::____::type____
mov esi, eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.00420868
mov edi, eax
mov dword [esp], 0xc
call sym.operator_new_unsigned_int_
mov ebx, eax
mov dword [esp + 4], edi
mov dword [esp], esi
mov ecx, ebx
call method.mingw_stdthread::detail.ThreadFuncCall_void__Timer::_____Timer_::ThreadFuncCall_void__Timer::_____Timer_
sub esp, 8
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebp - 0x2c]
add eax, 4
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], sym.__ZN15mingw_stdthread6thread10threadfuncINS_6detail14ThreadFuncCallIM5TimerFvvEJPS4_EEEJS7_EEEjPv_4
mov dword [esp + 4], 0
mov dword [esp], 0
call sym.__beginthreadex
mov edx, eax
mov eax, dword [ebp - 0x2c]
mov dword [eax], edx
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax]
test eax, eax
jne 0x41e559
call sym.__errno
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym.operator_delete_void_
mov dword [esp], 0x10
call sym.___cxa_allocate_exception
mov ebx, eax
call sym.std::_V2::generic_category__
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov ecx, ebx
call method.std::system_error.system_error_int__std::_V2::error_category_const_
sub esp, 8
mov dword [esp + 8], sym.std::system_error::system_error__
mov dword [esp + 4], 0x426e40
mov dword [esp], ebx
call sym.___cxa_throw
mov esi, eax
mov dword [esp], ebx
call sym.___cxa_free_exception
mov eax, esi
mov dword [esp], eax
call sym.__Unwind_Resume
nop
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8
Function at 0x40189a
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
push edi
mov edi, 0x41c
push edi
call fcn.0040a125
mov esi, eax
push edi
push 0
push esi
call fcn.004095f0
mov ebx, dword [ebp + 8]
mov edi, dword [sym.imp.USER32.dll_SetWindowLongA]
add esp, 0x10
mov dword [esi], ebx
push esi
push 0xffffffffffffffeb
push ebx
call edi
push dword [0x4160f4]
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push 0x10
mov dword [esi + 0x40c], eax
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
push 0
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov dword [esi + 0x418], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x414], eax
lea eax, [ebp - 0x3c]
push 0
push eax
push 0x3c
push 0x1f
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.GDI32.dll_CreateFontIndirectA]
mov dword [esi + 0x410], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x404], eax
lea eax, [esi + 4]
push 0x400
push eax
push ebx
call dword [sym.imp.USER32.dll_GetWindowTextA]
push 0x4016f3
push 0xfffffffffffffffc
push ebx
call edi
mov dword [esi + 0x408], eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402f22
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 8
push dword [ebp + 0xc]
lea edi, [esi + 0x10]
push edi
call fcn.00409df0
lea ebx, [esi + 8]
push ebx
push dword [ebp + 0x10]
call fcn.004019ea
push dword [ebp + 0x10]
lea eax, [esi + 0x18]
push eax
push esi
call fcn.004023da
push edi
push dword [ebp + 0x10]
call fcn.004019ea
push dword [ebp + 0x10]
push edi
push ebx
call fcn.004023da
add esp, 0x34
xor eax, eax
mov cl, byte [esi + eax + 0x18]
xor byte [eax + esi], cl
mov cl, byte [edi + eax]
xor byte [ebx + eax], cl
inc eax
cmp eax, 8
jl 0x402f6a
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x404fe5
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ac
push ebx
push esi
push edi
push 0x24
xor esi, esi
xor ebx, ebx
pop ecx
xor eax, eax
cmp dword [0x418324], esi
lea edi, [ebp - 0x98]
mov dword [ebp - 0x9c], esi
rep stosd dword es:[edi], eax
jne 0x40512e
lea eax, [ebp - 0x9c]
mov dword [ebp - 0x9c], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x8c], 1
jne 0x4050d9
and byte [ebp - 0x1ac], bl
push 0x43
pop ecx
xor eax, eax
lea edi, [ebp - 0x1ab]
mov dword [ebp - 8], 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 4]
mov dword [ebp - 4], esi
push eax
push 0x20019
push esi
push str.SoftwarePGP_CorporationPGP
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
jne 0x4050d0
cmp dword [ebp - 4], esi
je 0x4050d0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x1ac]
push eax
push esi
push esi
push str.InstallPath
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4050c0
push 0xb
lea eax, [ebp - 0x1ac]
push str.unicows.dll
push eax
call fcn.0040a430
add esp, 0xc
lea eax, [ebp - 0x1ac]
push eax
call edi
mov ebx, eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp ebx, esi
mov dword [ebp - 4], esi
jne 0x4050ea
push str.Kernel32.dll
call edi
jmp 0x4050e4
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
cmp ebx, esi
je 0x40512e
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MultiByteToWideChar
push ebx
call esi
push str.WideCharToMultiByte
push ebx
mov dword [0x418328], eax
call esi
cmp dword [0x418328], 0
mov dword [0x41832c], eax
je 0x405123
test eax, eax
je 0x405123
mov dword [0x418324], 1
jmp 0x40512e
test ebx, ebx
je 0x40512e
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405475
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push 0x44
call fcn.0040a125
mov esi, eax
xor edi, edi
cmp esi, edi
pop ecx
jne 0x405494
mov eax, 0xffffd121
jmp 0x405522
push ebx
push 0x44
push edi
push esi
call fcn.004095f0
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [esi + 8], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 0xc], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0x1c]
add esp, 0xc
mov dword [esi + 0x18], eax
mov eax, dword [ebp + 0x20]
mov dword [esi + 4], ebx
push edi
mov dword [esi + 0x1c], eax
mov eax, dword [ebp + 0x24]
push 1
push edi
push edi
mov dword [esi + 0x20], eax
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
push edi
mov dword [esi + 0x2c], eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push esi
push 0x405215
push ebx
push 0x3fc
mov dword [esi + 0x40], eax
push dword [0x4186a4]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push 0xffffffffffffffff
push dword [esi + 0x2c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esi + 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esi + 0x34]
push esi
call fcn.0040959b
pop ecx
mov eax, edi
pop ebx
pop edi
pop esi
pop ebp
ret

Function at 0x40569f
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x24]
mov ecx, eax
dec eax
test ecx, ecx
je 0x405744
push ebx
push esi
mov esi, dword [ebp + 0x20]
push edi
mov edi, dword [ebp + 0x1c]
inc eax
push 4
mov dword [ebp + 0xc], eax
pop ebx
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
call dword [0x413294]
mov eax, dword [edi]
mov ecx, dword [ebp - 0x20]
xor ecx, eax
add edi, ebx
mov dword [ebp - 0x10], eax
mov dword [esi], ecx
mov eax, dword [edi]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
xor ecx, eax
lea eax, [ebp - 0x18]
add esi, ebx
push eax
lea eax, [ebp - 8]
push eax
mov dword [esi], ecx
push dword [ebp + 8]
add esi, ebx
add edi, ebx
call dword [0x413294]
mov eax, dword [edi]
mov ecx, dword [ebp - 0x18]
xor ecx, eax
add edi, ebx
mov dword [ebp - 8], eax
mov dword [esi], ecx
mov eax, dword [edi]
mov ecx, dword [ebp - 0x14]
add esi, ebx
xor ecx, eax
add esp, 0x18
add edi, ebx
mov dword [esi], ecx
add esi, ebx
dec dword [ebp + 0xc]
mov dword [ebp - 4], eax
jne 0x4056d7
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4057ea
Capabilities:
Log keystrokes via polling

Disassembly:
push 0x14
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x4057fa
push 5
jmp 0x4057fc
push 0
push 0x3eb
push dword [esp + 0xc]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
ret
Function at 0x405f4f
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x348
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov dword [ebp + 0x14], eax
xor ebx, ebx
lea eax, [ebp - 0x154]
push 0x418334
push eax
xor edi, edi
mov dword [ebp + 0x10], ebx
mov dword [ebp - 4], 1
call fcn.00409650
push 0x5c
push esi
call fcn.0040a76c
add esp, 0x10
cmp eax, ebx
je 0x405f98
sub eax, esi
inc eax
mov dword [ebp + 0x10], eax
push 0x2e
push esi
call fcn.0040a76c
pop ecx
cmp eax, ebx
pop ecx
je 0x405fba
inc eax
mov edi, eax
push eax
lea eax, [ebp - 0x154]
sub edi, esi
push eax
call fcn.00409650
pop ecx
pop ecx
cmp dword [ebp + 0x14], ebx
je 0x406080
push 0x4c
lea eax, [ebp - 0x50]
push ebx
push eax
call fcn.004095f0
add esp, 0xc
lea eax, [ebp - 0x348]
push 0x1f4
push eax
push 0x13b3
push dword [0x4186a4]
call dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [ebp - 0x348]
push 0x40
push eax
call fcn.0040a76c
pop ecx
cmp eax, ebx
pop ecx
je 0x406007
mov byte [eax], bl
jmp 0x405fef
mov eax, dword [ebp + 8]
mov dword [ebp - 0x50], 0x4c
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x348]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
mov ax, word [ebp + 0x10]
mov word [ebp - 0x18], ax
lea eax, [ebp - 0x154]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x50]
push eax
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], 0x104
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], 0xc
mov word [ebp - 0x16], di
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
call dword [sym.imp.comdlg32.dll_GetSaveFileNameA]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x40615d
cmp byte [ebp - 0x154], bl
je 0x4060d6
push 0x2e
push esi
call fcn.0040a76c
pop ecx
cmp eax, ebx
pop ecx
je 0x4060aa
inc eax
push eax
lea eax, [ebp - 0x154]
push eax
call fcn.0040a5d7
pop ecx
test eax, eax
pop ecx
je 0x4060d6
push esi
call fcn.00409520
dec eax
pop ecx
js 0x4060ba
cmp byte [eax + esi], 0x2e
je 0x4060c7
push 0x4161fc
push esi
call fcn.00409660
pop ecx
pop ecx
lea eax, [ebp - 0x154]
push eax
push esi
call fcn.00409660
pop ecx
pop ecx
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push ebx
push 0x80
push 3
push ebx
push ebx
push 0x80000000
push esi
call edi
cmp eax, 0xffffffff
je 0x40615d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x14], ebx
je 0x406143
push 0x10011
push str.File_exists._Overwrite_it_
push esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 2
je 0x406143
push ebx
push 0x80
push 2
push ebx
push ebx
push 0xc0000000
push esi
call edi
cmp eax, 0xffffffff
jne 0x40614f
push 0x10010
push str.Could_not_write_to_file_
push esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [ebp + 0x14], 1
jmp 0x405f66
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4067a2
Capabilities:
Log keystrokes via polling

Disassembly:
push ecx
push ebx
push ebp
and dword [esp + 8], 0
push esi
push edi
push 2
pop ebp
push 0x10
call dword [sym.imp.USER32.dll_GetKeyState]
test ah, 0x80
je 0x4067c7
push 3
mov dword [esp + 0x14], 1
pop ebp
mov ebx, dword [esp + 0x18]
mov edi, dword [sym.imp.USER32.dll_GetWindow]
push ebp
push ebx
call edi
mov esi, eax
test esi, esi
jne 0x4067e8
push dword [esp + 0x10]
push ebx
call edi
mov esi, eax
test esi, esi
je 0x406814
push 0xfffffffffffffff0
push esi
call dword [sym.imp.USER32.dll_GetWindowLongA]
test eax, 0x10000
je 0x406803
push esi
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
jne 0x40680d
cmp esi, dword [esp + 0x18]
mov ebx, esi
je 0x406814
jmp 0x4067d1
push esi
call dword [sym.imp.USER32.dll_SetFocus]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

Function at 0x406ab7
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push 0xffffffffffffffeb
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowLongA]
mov esi, eax
xor ecx, ecx
cmp dword [esi + 0x41c], ecx
jle 0x406aec
lea eax, [esi + 0x1c]
mov dx, word [eax + 0x200]
xor word [eax], dx
inc ecx
inc eax
inc eax
cmp ecx, dword [esi + 0x41c]
jl 0x406ad7
mov ebx, dword [ebp + 0xc]
lea eax, [ebp + 8]
push eax
lea edi, [esi + 0x1c]
push dword [ebp + 0x10]
push ebx
push dword [esi + 0x41c]
push edi
call fcn.00404ec9
xor ecx, ecx
add esp, 0x14
cmp dword [esi + 0x41c], ecx
jle 0x406b2a
mov eax, edi
mov dx, word [eax + 0x200]
xor word [eax], dx
inc ecx
inc eax
inc eax
cmp ecx, dword [esi + 0x41c]
jl 0x406b15
mov eax, dword [ebp + 8]
pop edi
pop esi
and byte [eax + ebx], 0
pop ebx
pop ebp
ret

Function at 0x406b36
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push 0xffffffffffffffeb
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowLongA]
mov esi, eax
xor ecx, ecx
cmp dword [esi + 0x41c], ecx
jle 0x406b6a
lea eax, [esi + 0x1c]
mov dx, word [eax + 0x200]
xor word [eax], dx
inc ecx
inc eax
inc eax
cmp ecx, dword [esi + 0x41c]
jl 0x406b55
lea eax, [ebp + 8]
lea edi, [esi + 0x1c]
push eax
push 0
push 0
push dword [esi + 0x41c]
push edi
call fcn.00404ec9
xor ecx, ecx
add esp, 0x14
cmp dword [esi + 0x41c], ecx
jle 0x406ba5
mov eax, edi
mov dx, word [eax + 0x200]
xor word [eax], dx
inc ecx
inc eax
inc eax
cmp ecx, dword [esi + 0x41c]
jl 0x406b90
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebp
ret
Function at 0x40e49d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x417f40
cmp edx, dword [eax]
je 0x40e4bf
add eax, 8
inc ecx
cmp eax, 0x417fd0
jl 0x40e4b0
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x417f40]
jne 0x40e5ed
mov eax, dword [0x418358]
cmp eax, 1
je 0x40e5c7
test eax, eax
jne 0x40e4f0
cmp dword [0x4178bc], 1
je 0x40e5c7
cmp edx, 0xfc
je 0x40e5ed
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40e527
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00409650
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00409520
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40e56a
lea eax, [ebp - 0x1a4]
push eax
call fcn.00409520
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x414688
push edi
call fcn.0040a330
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00409650
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00409660
lea eax, [ebp - 0xa0]
push 0x414668
push eax
call fcn.00409660
push dword [esi + 0x417f44]
lea eax, [ebp - 0xa0]
push eax
call fcn.00409660
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040f52e
add esp, 0x2c
pop edi
jmp 0x40e5ed
lea eax, [ebp + 8]
lea esi, [esi + 0x417f44]
push 0
push eax
push dword [esi]
call fcn.00409520
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x10002070
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1000f380], eax
je 0x1000208e
mov eax, 0x10dd
jmp 0x1000216f
mov eax, dword [0x1000f390]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x1000210c
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x10]
movzx eax, byte [edx + 0x36]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 4]
cmp dword [eax + 4], 0
jne 0x100020ea
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x10], 0
je 0x100020ea
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x10]
push eax
call fcn.10001710
add esp, 4
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x10], 0
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.1000a42c
add esp, 4
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
jmp 0x10002096
mov dword [0x1000f390], 0
call fcn.10001a30
mov ecx, dword [0x1000f38c]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
je 0x10002159
mov edx, dword [ebp - 8]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.1000a42c
add esp, 4
mov edx, dword [ebp - 0x18]
mov dword [ebp - 8], edx
jmp 0x10002124
mov dword [0x1000f38c], 0
mov dword [0x1000f380], 0
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x10002660
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
cmp dword [0x1000f384], 0
je 0x10002679
mov eax, dword [0x1000f384]
jmp 0x10002719
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
cmp dword [ebp + 8], eax
jne 0x1000268b
xor eax, eax
jmp 0x10002719
push 8
call fcn.10009d4e
add esp, 4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x100026e1
mov dword [ebp - 8], 8
cmp dword [ebp - 4], 0
je 0x100026ca
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
push edx
call fcn.1000a42c
add esp, 4
mov dword [ebp - 4], 0
mov eax, dword [ebp - 8]
mov dword [0x1000f384], eax
mov dword [0x1000f388], 0
mov eax, dword [ebp - 8]
jmp 0x10002719
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x100026fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
jmp 0x100026ab
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov dword [edx + 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [0x1000f38c]
mov dword [ecx], edx
mov eax, dword [ebp - 4]
mov dword [0x1000f38c], eax
xor eax, eax
mov esp, ebp
pop ebp
ret 4
Function at 0x10004840
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x1000f040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push esi
push edi
mov dword [0x1000f844], 0
xor esi, esi
lea eax, [esi + 1]
push eax
mov esi, eax
lea eax, [ebp - 0x38]
push str.ACCOUNT_i
push eax
call fcn.10003020
imul eax, dword [0x1000f844], 0xb
add esp, 0xc
push str..logins.ini
push 0xc
add eax, 0x1000f6f8
push eax
push 0x1000c42d
push 0x1000c4bc
lea eax, [ebp - 0x38]
push eax
call ebx
imul eax, dword [0x1000f844], 0xb
push str..logins.ini
push 0xc
add eax, 0x1000f848
push eax
push 0x1000c42d
push 0x1000c4c4
lea eax, [ebp - 0x38]
push eax
call ebx
mov edx, dword [0x1000f844]
imul eax, edx, 0xb
add eax, 0x1000f6f8
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100048d5
sub eax, edi
cmp eax, 1
jb 0x100048f3
inc edx
mov dword [0x1000f844], edx
cmp esi, 0x1e
jl 0x10004865
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10009d40
mov esp, ebp
pop ebp
ret