joyce8/EMBER2024-capa huggingface dataset:
Function at 0xb40d20
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov edx, dword [esp + 8]
push esi
mov esi, dword [esp + 0x10]
lea eax, [esp + 4]
push eax
mov eax, dword [ecx + 4]
push esi
push 0
push 0
push edx
push eax
mov dword [esp + 0x1c], 8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0xb40d58
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esi], ecx
mov dword [esi + 4], edx
pop esi
pop ecx
ret 0x10

Function at 0xb40d60
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
mov eax, dword [ecx + 4]
push esi
push 0
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0xb40d94
mov eax, dword [esp + 0x14]
test eax, eax
je 0xb40d94
push eax
push esi
call fcn.00b4320b
add esp, 8
pop esi
ret 0x10

Function at 0xb40da0
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x24
lea eax, [esp + 0x28]
push eax
mov eax, dword [ecx + 4]
push 0x20019
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0xb40e22
push ebx
mov ebx, dword [esp + 0x30]
push esi
xor esi, esi
test ebx, ebx
jbe 0xb40e15
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
mov edi, dword [esp + 0x40]
push esi
lea ecx, [esp + 0x18]
push 0xb59320
push ecx
mov dword [esp + 0x1c], 4
call fcn.00b42dff
mov ecx, dword [esp + 0x44]
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push edi
push 0
push 0
push eax
push ecx
call ebp
inc esi
add edi, 4
cmp esi, ebx
jb 0xb40dda
pop edi
pop ebp
mov edx, dword [esp + 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
add esp, 0x24
ret 0xc

Function at 0xb40e30
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x28
lea eax, [esp + 0x2c]
push eax
mov eax, dword [ecx + 4]
push 0x20019
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0xb40ec2
push ebp
mov ebp, dword [esp + 0x34]
push esi
xor esi, esi
test ebp, ebp
jbe 0xb40eb5
push ebx
mov ebx, dword [esp + 0x40]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push esi
lea ecx, [esp + 0x1c]
push 0xb59320
push ecx
mov dword [esp + 0x1c], 4
call fcn.00b42dff
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x40]
push eax
push 0
push 0
push ecx
push edx
call edi
test eax, eax
jne 0xb40eab
mov ax, word [esp + 0x14]
mov word [ebx], ax
inc esi
add ebx, 2
cmp esi, ebp
jb 0xb40e6a
pop edi
pop ebx
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebp
add esp, 0x28
ret 0xc
Function at 0xb41000
Capabilities:
Get file version info

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
lea eax, [esp + 0xc]
push edi
push eax
push ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
test esi, esi
je 0xb41131
push esi
call fcn.00b44145
add esp, 4
mov edi, eax
push edi
push esi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoW
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push ebx
call fcn.00b33080
mov ebp, eax
add esp, 0x1c
cmp ebp, 0xffffffff
je 0xb41131
push 0
push ebp
call fcn.00b333a0
push 0
push 0
push 0
push 4
push 0
push ebp
mov ebx, eax
call fcn.00b33260
add esp, 0x20
mov dword [esp + 0x18], eax
test eax, eax
jne 0xb4108b
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 0
push 0
push 0
push 6
push eax
call fcn.00b332f0
mov esi, eax
add esp, 0x14
test esi, esi
je 0xb41121
push 0xb59918
push edi
call fcn.00b423f0
push eax
push ebx
push esi
call fcn.00b40f60
push 0xb598f8
push edi
call fcn.00b423f0
push eax
push ebx
push esi
call fcn.00b40f60
push 0xb598d8
push edi
call fcn.00b423f0
push eax
push ebx
push esi
call fcn.00b40f60
push 0xb598c0
push edi
call fcn.00b423f0
add esp, 0x44
push eax
push ebx
push esi
call fcn.00b40f60
push 0xb598a0
push edi
call fcn.00b423f0
push eax
push ebx
push esi
call fcn.00b40f60
push 0xb59888
push edi
call fcn.00b423f0
push eax
push ebx
push esi
call fcn.00b40f60
add esp, 0x34
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
push ebp
call esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0xb421b0
Capabilities:
Acquire debug privileges

Disassembly:
push ecx
lea eax, [esp]
mov dword [esp], 0
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp]
push 1
push str.SeBackupPrivilege
push ecx
call fcn.00b42140
mov edx, dword [esp + 0xc]
push 1
push str.SeDebugPrivilege
push edx
call fcn.00b42140
mov eax, dword [esp + 0x18]
push 1
push str.SeRestorePrivilege
push eax
call fcn.00b42140
mov ecx, dword [esp + 0x24]
push 1
push str.SeSecurityPrivilege
push ecx
call fcn.00b42140
mov edx, dword [esp + 0x30]
add esp, 0x30
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop ecx
ret

Function at 0xb42bfa
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0xb42c50
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0xb5487c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0xb42c43
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0xb42c52
xor eax, eax
pop esi
leave
ret 4
Function at 0x405260
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x533c
call fcn.0041f5e0
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 4]
test eax, eax
jne 0x405284
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x533c
ret 8
mov esi, dword [esp + 0x534c]
test esi, esi
jne 0x405292
lea esi, [edi + 8]
push esi
mov ecx, edi
call fcn.00405450
test eax, eax
jne 0x4052aa
pop edi
pop esi
pop ebx
add esp, 0x533c
ret 8
lea eax, [esp + 0x114]
mov ecx, edi
push eax
call fcn.00405150
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x114]
push ecx
call ebx
cmp byte [esp + eax + 0x113], 0x5c
jne 0x4052e4
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x533c
ret 8
lea edx, [esp + 0x10]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edx
call esi
lea eax, [esp + 0x10]
push eax
call ebx
mov cl, byte [esp + eax + 0xf]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp cl, 0x5c
je 0x405314
lea ecx, [esp + 0x10]
push 0x426420
push ecx
call ebx
mov eax, dword [esp + 0x5350]
test eax, eax
je 0x405342
lea edx, [esp + 0x114]
push 0x5c
push edx
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
test eax, eax
je 0x405342
inc eax
push eax
lea eax, [esp + 0x118]
push eax
call esi
lea ecx, [esp + 0x114]
lea edx, [esp + 0x10]
push ecx
push edx
call ebx
lea eax, [esp + 0x10]
mov ecx, edi
push eax
call fcn.004054f0
test eax, eax
jne 0x40536d
pop edi
pop esi
pop ebx
add esp, 0x533c
ret 8
push 0
push 0x80
push 2
push 0
push 0
lea ecx, [esp + 0x24]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40539f
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x533c
ret 8
mov edx, dword [edi + 4]
push edx
call fcn.0040e0f0
test eax, eax
je 0x4053ba
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x533c
ret 8
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [edi + 4]
lea eax, [esp + 0x34c]
push 0x5000
push eax
push ecx
call fcn.0040da60
mov esi, eax
test esi, esi
jle 0x405405
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x354]
push esi
push eax
push ebx
mov dword [esp + 0x24], 0
call ebp
test eax, eax
je 0x405402
cmp dword [esp + 0x10], esi
je 0x4053c1
or esi, 0xffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi + 4]
push ecx
call fcn.0040dc60
test esi, esi
pop ebp
jne 0x40542e
mov edx, dword [esp + 0x32c]
lea eax, [esp + 0x10]
push edx
push eax
mov ecx, edi
call fcn.00405540
xor eax, eax
pop edi
test esi, esi
pop esi
pop ebx
sete al
add esp, 0x533c
ret 8
Function at 0x405450
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebx
push esi
push edi
mov edi, dword [esp + 0x10]
test edi, edi
mov ebx, ecx
je 0x4054b8
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x4054b8
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405486
and eax, 0x10
xor ecx, ecx
cmp al, 0x10
pop edi
sete cl
pop esi
mov eax, ecx
pop ebx
ret 4
push edi
call dword [sym.imp.MSVCRT.dll__strdup]
mov esi, eax
push 0x5c
push esi
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 0xc
test eax, eax
je 0x4054d6
push esi
mov ecx, ebx
mov byte [eax], 0
call fcn.00405450
test eax, eax
push esi
jne 0x4054c0
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
ret 4
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x4054b8
pop edi
pop esi
mov eax, 1
pop ebx
ret 4

Function at 0x405540
Capabilities:
Timestomp file

Disassembly:
sub esp, 0x28
mov eax, dword [esp + 0x2c]
push edi
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
test edi, edi
jne 0x40556b
pop edi
add esp, 0x28
ret 8
lea ecx, [esp + 0x1c]
push esi
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0x2c]
push edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov esi, eax
dec esi
neg esi
sbb esi, esi
inc esi
je 0x4055d4
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x10]
push ecx
push eax
shr eax, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
mov esi, eax
test esi, esi
je 0x4055d4
lea edx, [esp + 8]
lea eax, [esp + 0x10]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
mov esi, eax
test esi, esi
je 0x4055d4
lea ecx, [esp + 8]
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0xc]
push edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop edi
add esp, 0x28
ret 8
Function at 0x4078a0
Capabilities:
Delete file

Disassembly:
sub esp, 0xe8
mov ecx, 0x32
xor eax, eax
push esi
mov esi, dword [esp + 0xf4]
push edi
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
test esi, esi
je 0x4078c7
mov eax, esi
push eax
lea eax, [esp + 0x2c]
push str._s.
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x18]
mov dword [esp + 0x14], 0
rep stosd dword es:[edi], eax
add esp, 0xc
lea edx, [esp + 8]
lea ecx, [esp + 0x28]
stosw word es:[edi], ax
push edx
mov word [esp + 0x1c], 0x410
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], 3
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
test eax, eax
jne 0x40794c
test esi, esi
je 0x407941
mov al, byte [esi - 1]
test al, al
je 0x407937
cmp al, 0xff
je 0x407937
dec al
pop edi
mov byte [esi - 1], al
mov al, 1
pop esi
add esp, 0xe8
ret
dec esi
push esi
call fcn.0041f590
add esp, 4
pop edi
mov al, 1
pop esi
add esp, 0xe8
ret
test esi, esi
je 0x407975
mov al, byte [esi - 1]
test al, al
je 0x40796b
cmp al, 0xff
je 0x40796b
dec al
pop edi
mov byte [esi - 1], al
xor al, al
pop esi
add esp, 0xe8
ret
dec esi
push esi
call fcn.0041f590
add esp, 4
pop edi
xor al, al
pop esi
add esp, 0xe8
ret
Function at 0x409b50
Capabilities:
Create thread
Move file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xf0
push esi
push edi
push 0
push 0
push 0
push 0x409ce0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, 1
mov dword [esp + 8], esi
push 0x64
call edi
fild dword [esp + 8]
fstp qword [esp + 8]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
push eax
push ecx
push eax
push ecx
push eax
mov eax, dword [0x4288c8]
push ecx
push 0x40220000
push 0
push eax
call fcn.00409a90
add esp, 0x24
inc esi
cmp esi, 0xa
mov dword [esp + 8], esi
jl 0x409b82
mov esi, dword [ebp + 0xc]
mov ecx, 0x32
xor eax, eax
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
test esi, esi
je 0x409bd6
mov eax, esi
push eax
lea ecx, [esp + 0x34]
push str._s.
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x20]
mov dword [esp + 0x1c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, dword [ebp + 0x1c]
add esp, 0xc
lea edx, [esp + 0x30]
mov word [esp + 0x20], 0x610
test edi, edi
mov dword [esp + 0x18], edx
jne 0x409c22
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov dword [esp + 0x1c], eax
jmp 0x409c26
mov dword [esp + 0x1c], edi
lea ecx, [esp + 0x10]
mov dword [esp + 0x14], 1
push ecx
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
test eax, eax
jne 0x409c8b
test esi, esi
je 0x409c5d
mov al, byte [esi - 1]
test al, al
je 0x409c53
cmp al, 0xff
je 0x409c53
dec al
mov byte [esi - 1], al
jmp 0x409c5d
dec esi
push esi
call fcn.0041f590
add esp, 4
test edi, edi
je 0x409c83
mov al, byte [edi - 1]
test al, al
je 0x409c79
cmp al, 0xff
je 0x409c79
dec al
mov byte [edi - 1], al
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
dec edi
push edi
call fcn.0041f590
add esp, 4
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x409cab
mov al, byte [esi - 1]
test al, al
je 0x409ca1
cmp al, 0xff
je 0x409ca1
dec al
mov byte [esi - 1], al
jmp 0x409cab
dec esi
push esi
call fcn.0041f590
add esp, 4
test edi, edi
je 0x409cd1
mov al, byte [edi - 1]
test al, al
je 0x409cc7
cmp al, 0xff
je 0x409cc7
dec al
mov byte [edi - 1], al
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
ret
dec edi
push edi
call fcn.0041f590
add esp, 4
pop edi
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40b420
Capabilities:
Read file via mapping

Disassembly:
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push esi
mov esi, dword [esp + 0xc]
test esi, esi
je 0x40b430
mov eax, esi
push eax
push 0
push 2
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
test eax, eax
je 0x40b464
push 0
push 0
push 0
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
je 0x40b464
mov ecx, dword [esp + 0x18]
mov edx, dword [eax]
push 0
push 0
push ecx
push edx
call dword [sym.imp.USER32.dll_PostThreadMessageA]
test esi, esi
je 0x40b489
mov al, byte [esi - 1]
test al, al
je 0x40b47f
cmp al, 0xff
je 0x40b47f
dec al
mov byte [esi - 1], al
mov eax, 1
pop esi
ret
dec esi
push esi
call fcn.0041f590
add esp, 4
mov eax, 1
pop esi
ret

Function at 0x40b670
Capabilities:
Read file via mapping

Disassembly:
sub esp, 0x20
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
lea eax, [esp + 0x14]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
lea ecx, [esp + 0x1c]
push 1
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov esi, dword [esp + 0x30]
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea edx, [esp + 0x14]
mov dword [esp + 8], 0xc
test esi, esi
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], 0
je 0x40b6c2
mov eax, esi
push eax
push 0x5004
push 0
lea eax, [esp + 0x14]
push 4
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
je 0x40b726
push 0
push 0
push 0
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
je 0x40b726
test esi, esi
mov dword [eax], edi
je 0x40b71b
mov al, byte [esi - 1]
test al, al
je 0x40b711
cmp al, 0xff
je 0x40b711
dec al
pop edi
mov byte [esi - 1], al
mov eax, 1
pop esi
add esp, 0x20
ret
dec esi
push esi
call fcn.0041f590
add esp, 4
pop edi
mov eax, 1
pop esi
add esp, 0x20
ret
test esi, esi
je 0x40b74c
mov al, byte [esi - 1]
test al, al
je 0x40b742
cmp al, 0xff
je 0x40b742
dec al
pop edi
mov byte [esi - 1], al
xor eax, eax
pop esi
add esp, 0x20
ret
dec esi
push esi
call fcn.0041f590
add esp, 4
pop edi
xor eax, eax
pop esi
add esp, 0x20
ret
Function at 0x40b820
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x420669
push eax
mov eax, 0x2804
mov dword fs:[0], esp
call fcn.0041f5e0
push ebx
push ebp
push esi
push edi
mov eax, dword [esp + 0x2828]
xor ebp, ebp
cmp eax, ebp
mov dword [esp + 0x281c], ebp
jne 0x40b85c
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0x426068
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
cmp esi, ebp
je 0x40b9ae
mov ecx, 0xa00
xor eax, eax
lea edi, [esp + 0x14]
mov bl, 0x10
rep stosd dword es:[edi], eax
test byte [esi + 0xc], bl
jne 0x40b8b0
mov edi, dword [sym.imp.MSVCRT.dll_fread]
cmp ebp, 0x2800
jae 0x40b8b0
push esi
push 1
lea eax, [esp + ebp + 0x1c]
push 1
push eax
call edi
add esp, 0x10
test eax, eax
jbe 0x40b8ab
inc ebp
test byte [esi + 0xc], bl
je 0x40b88f
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
lea ecx, [esp + 0x1c]
push ecx
call fcn.0040b9f0
mov esi, eax
lea edx, [esp + 0x18]
lea eax, [esp + 0x24]
push edx
push eax
push esi
call fcn.0040ba20
mov ecx, dword [esp + 0x24]
mov dl, byte [esp + esi + 0x30]
lea eax, [esp + esi + 0x30]
add esp, 0x14
cmp dl, cl
jne 0x40b992
cmp byte [esp + esi + 0x1d], ch
jne 0x40b992
mov byte [eax], 0
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov ebp, dword [esp + 0x2834]
push 1
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x40b93e
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [ebx + eax], 0
mov ebp, dword [ebp + 4]
test ebp, ebp
jne 0x40b94b
mov ebp, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0
push ebp
call dword [sym.imp.MSVCRT.dll__access]
mov ecx, dword [esp + 0x2830]
add esp, 8
test eax, eax
jge 0x40b966
test ecx, ecx
jmp 0x40b9b7
test ecx, ecx
je 0x40b98b
mov al, byte [ecx - 1]
test al, al
je 0x40b981
cmp al, 0xff
je 0x40b981
dec al
mov byte [ecx - 1], al
mov eax, 1
jmp 0x40b9d7
dec ecx
push ecx
call fcn.0041f590
add esp, 4
mov eax, 1
jmp 0x40b9d7
push 1
lea ecx, [esp + 0x2828]
mov dword [esp + 0x2820], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x40b9d5
mov ecx, dword [esp + 0x2828]
cmp ecx, ebp
je 0x40b9d5
mov al, byte [ecx - 1]
test al, al
je 0x40b9cb
cmp al, 0xff
je 0x40b9cb
dec al
mov byte [ecx - 1], al
jmp 0x40b9d5
dec ecx
push ecx
call fcn.0041f590
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x2814]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2810
ret
Function at 0x40bab0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x420692
push eax
mov eax, 0x2808
mov dword fs:[0], esp
call fcn.0041f5e0
push ebp
mov ebp, dword [esp + 0x2820]
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
test ebp, ebp
mov dword [esp + 0x2814], 1
je 0x40baed
mov eax, ebp
push 0x4265ac
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 4], eax
test eax, eax
je 0x40bc5c
push ebx
push esi
push edi
mov ecx, 0xa00
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
push eax
call dword [sym.imp.MSVCRT.dll_time]
mov ecx, dword [0x4288e0]
add eax, ecx
inc ecx
push eax
mov dword [0x4288e0], ecx
call dword [sym.imp.MSVCRT.dll_srand]
add esp, 8
call dword [sym.imp.MSVCRT.dll_rand]
mov ebx, dword [esp + 0x2840]
mov ecx, eax
sar ecx, 0x18
mov byte [esp + 0x18], cl
mov edx, eax
mov ecx, eax
mov byte [esp + 0x1b], al
sar edx, 0x10
sar ecx, 8
cmp ebx, 0x27f6
mov byte [esp + 0x19], dl
mov byte [esp + 0x1a], cl
jbe 0x40bb71
mov ebx, 0x27f6
lea edx, [esp + 0x1c]
push edx
push ebx
call fcn.0040bcc0
mov esi, dword [esp + 0x2844]
add esp, 8
test esi, esi
jne 0x40bb90
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov ecx, ebx
lea edi, [esp + 0x20]
mov eax, ecx
lea edx, [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push ecx
push edx
push ebx
call fcn.0040ba20
mov ax, word [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov word [esp + ebx + 0x2c], ax
add ebx, 0xa
push esi
push ebx
lea ecx, [esp + 0x2c]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x20
test ebp, ebp
pop edi
pop esi
pop ebx
je 0x40bc01
mov al, byte [ebp - 1]
test al, al
je 0x40bbf7
cmp al, 0xff
je 0x40bbf7
dec al
mov byte [ebp - 1], al
jmp 0x40bc01
dec ebp
push ebp
call fcn.0041f590
add esp, 4
mov ecx, dword [esp + 0x2830]
test ecx, ecx
je 0x40bc41
mov al, byte [ecx - 1]
test al, al
je 0x40bc37
cmp al, 0xff
je 0x40bc37
dec al
pop ebp
mov byte [ecx - 1], al
mov eax, 1
mov ecx, dword [esp + 0x2808]
mov dword fs:[0], ecx
add esp, 0x2814
ret
dec ecx
push ecx
call fcn.0041f590
add esp, 4
mov eax, 1
pop ebp
mov ecx, dword [esp + 0x2808]
mov dword fs:[0], ecx
add esp, 0x2814
ret
test ebp, ebp
je 0x40bc7c
mov al, byte [ebp - 1]
test al, al
je 0x40bc72
cmp al, 0xff
je 0x40bc72
dec al
mov byte [ebp - 1], al
jmp 0x40bc7c
dec ebp
push ebp
call fcn.0041f590
add esp, 4
mov ecx, dword [esp + 0x2830]
test ecx, ecx
je 0x40bca3
mov al, byte [ecx - 1]
test al, al
je 0x40bc99
cmp al, 0xff
je 0x40bc99
dec al
mov byte [ecx - 1], al
jmp 0x40bca3
dec ecx
push ecx
call fcn.0041f590
add esp, 4
mov ecx, dword [esp + 0x280c]
xor eax, eax
pop ebp
mov dword fs:[0], ecx
add esp, 0x2814
ret