joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40eaf0
Capabilities:
Get socket status
Print debug messages
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x420008]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x120], eax
lea eax, [edi + 0xc]
xor esi, esi
mov dword [ebp - 0x128], eax
cmp dword [eax + 0x18], esi
je 0x40eb2b
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 8]
mov dword [ebp - 0x118], eax
lea eax, [ebp - 0x10]
push eax
push 0
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x11c], 1
push eax
push 0
push 1
mov dword [ebp - 0x10], 0xa
mov dword [ebp - 0xc], esi
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x124], eax
test eax, eax
jns 0x40eb96
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAERROR__d____Fail_to_wait_socket_available.
push 0x400
push dword [edi + 4]
call fcn.00404b30
add esp, 0x10
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [ebp - 0x124]
test eax, eax
jle 0x40ebf9
push 0
push ebx
push dword [ebp - 0x120]
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x40ebd4
nop
add esi, eax
cmp esi, ebx
je 0x40ebf2
push 0
mov eax, ebx
sub eax, esi
push eax
mov eax, dword [ebp - 0x120]
add eax, esi
push eax
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x40ebb0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x41aba4
push 0x400
push dword [edi + 4]
call fcn.00404b30
add esp, 0x10
jmp 0x40ec0e
mov ebx, 1
jmp 0x40ec10
push str.Failed_to_send.
push 0x400
push dword [edi + 4]
call fcn.00404b30
add esp, 0xc
xor ebx, ebx
mov ecx, dword [ebp - 0x128]
cmp dword [ecx + 0x18], 0
je 0x40ec23
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004168de
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40ec40
Capabilities:
Get socket status
Print debug messages
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x420008]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x120], eax
push edi
lea eax, [esi + 0x28]
xor edi, edi
mov dword [ebp - 0x124], eax
cmp dword [eax + 0x18], edi
je 0x40ec78
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 8]
mov dword [ebp - 0x118], eax
lea eax, [ebp - 0x10]
push eax
push 0
push 0
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x11c], 1
push eax
push 1
mov dword [ebp - 0x10], 0x3c
mov dword [ebp - 0xc], edi
call dword [sym.imp.WS2_32.dll_select]
mov ebx, eax
test ebx, ebx
jns 0x40ecd9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAERROR__d____Fail_to_wait_socket_available.
push 0x400
push dword [esi + 4]
call fcn.00404b30
add esp, 0x10
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test ebx, ebx
jne 0x40ed43
nop dword [eax + eax]
mov eax, dword [esi + 8]
mov dword [ebp - 0x118], eax
lea eax, [ebp - 0x10]
push eax
push 0
push 0
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x11c], 1
push eax
push 1
mov dword [ebp - 0x10], 0x3c
mov dword [ebp - 0xc], edi
call dword [sym.imp.WS2_32.dll_select]
mov ebx, eax
test ebx, ebx
jns 0x40ed41
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAERROR__d____Fail_to_wait_socket_available.
push 0x400
push dword [esi + 4]
call fcn.00404b30
add esp, 0x10
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
test ebx, ebx
je 0x40ece0
test ebx, ebx
jle 0x40eda3
mov ebx, dword [ebp + 0xc]
push 0
push ebx
push dword [ebp - 0x120]
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x40ed85
add edi, eax
cmp edi, ebx
je 0x40edcd
push 0
mov eax, ebx
sub eax, edi
push eax
mov eax, dword [ebp - 0x120]
add eax, edi
push eax
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x40ed60
test eax, eax
je 0x40eda3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Receive_Error:__d_r_n
push 0x400
push dword [esi + 4]
call fcn.00404b30
add esp, 0x10
xor ebx, ebx
mov ecx, dword [ebp - 0x124]
cmp dword [ecx + 0x18], 0
je 0x40edb8
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004168de
mov esp, ebp
pop ebp
ret 0xc
mov ebx, 1
jmp 0x40eda5
Function at 0x40f4d0
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x420008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x2c
mov dword [ebp - 0x3c], eax
mov edi, ecx
lea eax, [ebp - 0x38]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp + 0xc]
add esp, 0xc
mov dword [ebp - 0x38], 0x208
mov dword [ebp - 0x34], 0x6610
mov dword [ebp - 0x30], eax
test eax, eax
je 0x40f563
test esi, esi
je 0x40f52f
cmp eax, 0x20
ja 0x40f52f
push eax
lea eax, [ebp - 0x2c]
push esi
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
jmp 0x40f563
xorps xmm0, xmm0
movups xmmword [ebp - 0x2c], xmm0
movups xmmword [ebp - 0x1c], xmm0
test esi, esi
jne 0x40f54c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x16
jmp 0x40f55d
cmp eax, 0x20
jbe 0x40f563
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x22
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
push 0xf0000000
push 0x18
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
push 0
lea ebx, [edi + 8]
push ebx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x40f5a6
push str.GetServerSessionKey_Error:_CryptAcquireContext_error_r_n
push 0x400
push dword [edi + 4]
call fcn.00404b30
add esp, 0xc
push dword [edi + 4]
call fcn.004027f0
add esp, 4
xor eax, eax
jmp 0x40f652
lea esi, [edi + 0xc]
push esi
push 0
push 0
push 0x2c
lea eax, [ebp - 0x38]
push eax
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x40f5ec
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
call esi
push eax
push str.GetServerSessionKey_Error:_CryptImportKey_error__error_code:_d_r_n
push 0x400
push dword [edi + 4]
call fcn.00404b30
push dword [edi + 4]
call fcn.004027f0
add esp, 0x14
xor eax, eax
jmp 0x40f652
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
push 0
push dword [ebp - 0x3c]
push 1
push dword [esi]
call ebx
test eax, eax
jne 0x40f60b
push str.GetServerSessionKey_Error:_CryptSetKeyParam_KP_IV_error_r_n
jmp 0x40f584
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 1
push eax
push 3
push dword [esi]
call ebx
test eax, eax
jne 0x40f62c
push str.GetServerSessionKey_Error:_CryptSetKeyParam_KP_PADDING_error_r_n
jmp 0x40f584
push 0
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 1
push eax
push 4
push dword [esi]
call ebx
test eax, eax
jne 0x40f64d
push str.GetServerSessionKey_Error:_CryptSetKeyParam_KP_MODE_error_r_n
jmp 0x40f584
mov eax, 1
mov edx, 0x2c
lea ecx, [ebp - 0x38]
nop word [eax + eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub edx, 1
jne 0x40f660
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004168de
mov esp, ebp
pop ebp
ret 0x10
Function at 0x40f680
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, ecx
cmp dword [eax + 0x30], 0
push ebx
push edi
lea edi, [eax + 0x18]
mov dword [ebp - 8], eax
je 0x40f69d
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
test eax, eax
jg 0x40f6b0
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
cdq
and edx, 0xf
add eax, edx
sar eax, 4
inc eax
shl eax, 4
push esi
mov dword [ebp - 4], eax
lea esi, [eax + 1]
push esi
call fcn.004168ef
push esi
push 0
push eax
mov dword [ebp + 0xc], eax
call sub.VCRUNTIME140.dll_memset
push dword [ebx]
push dword [ebp + 8]
push dword [ebp + 0xc]
call sub.VCRUNTIME140.dll_memcpy
mov esi, dword [ebp - 4]
add esp, 0x1c
mov eax, dword [ebp - 8]
push esi
push ebx
push dword [ebp + 0xc]
push 0
push 1
push 0
push dword [eax + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
cmp dword [edi + 0x18], 0
je 0x40f70d
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp + 0xc]
mov dword [ebx], esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x4109a0
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x420008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
push dword [edi + 4]
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x4109ff
mov ecx, dword [edi + 4]
lea eax, [ebp - 0xc]
push 0
push eax
push 0
push 2
push 0
push 0
push 0
push 1
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp + 8]
push esi
mov dword [ebp - 8], ecx
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004168de
mov esp, ebp
pop ebp
ret 8

Function at 0x410a20
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x420008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
push dword [ebp + 0xc]
mov edi, ecx
push eax
push str._s_failed_w_err_0x_08lx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.00410100
add esp, 0x14
mov dword [ebp - 0x214], 0
mov dword [ebp - 0x210], 0
push dword [edi + 4]
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x410ab4
mov ecx, dword [edi + 4]
lea eax, [ebp - 0x20c]
push 0
mov dword [ebp - 0x210], eax
lea eax, [ebp - 0x214]
push eax
push 0
push 2
push 0
push 0
push 0
push 1
push esi
mov dword [ebp - 0x214], ecx
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004168de
mov esp, ebp
pop ebp
ret 8
Function at 0x410ad0
Capabilities:
Delete service
Print debug messages
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa34
mov eax, dword [0x420008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edx, edx
call fcn.00410cd0
push 1
xorps xmm0, xmm0
mov dword [ebp - 0xa14], 0
push 0
push 0
movups xmmword [ebp - 0xa2c], xmm0
movq qword [ebp - 0xa1c], xmm0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0xa30], ebx
test ebx, ebx
jne 0x410b46
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.00404ad0
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004168de
mov esp, ebp
pop ebp
ret
push 0x10024
push 0x41b530
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x410b6e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenService_failed_w_err_0x_08lx_n
jmp 0x410ca6
lea eax, [ebp - 0xa2c]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x410c17
push 0x41b530
push str.Stopping__s.
call fcn.00404ad0
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 8
push 0x3e8
call edi
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0xa2c]
push eax
push esi
call ebx
test eax, eax
je 0x410bed
nop dword [eax]
mov eax, dword [ebp - 0xa28]
cmp eax, 3
jne 0x410bf3
push 0x419ff4
call fcn.00404ad0
add esp, 4
push 0x3e8
call edi
lea eax, [ebp - 0xa2c]
push eax
push esi
call ebx
test eax, eax
jne 0x410bc0
mov eax, dword [ebp - 0xa28]
push 0x41b530
cmp eax, 1
jne 0x410c04
push str._n_s_is_stopped._n
jmp 0x410c09
push str._n_s_failed_to_stop._n
call fcn.00404ad0
mov ebx, dword [ebp - 0xa30]
add esp, 8
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x410c30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeleteService_failed_w_err_0x_08lx_n
jmp 0x410ca6
push 0x800
lea eax, [ebp - 0xa10]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x210]
push 0x208
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x210]
push 0x41b530
push str.Remove_NetFirewallRule__Displayname__s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 8
lea eax, [ebp - 0xa10]
lea edx, [ebp - 0x210]
push eax
call fcn.00404b50
add esp, 8
test eax, eax
je 0x410c9c
lea eax, [ebp - 0xa10]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x41b530
push str._s_is_removed._n
call fcn.00404ad0
add esp, 8
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call edi
test esi, esi
je 0x410cbe
push esi
call edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004168de
mov esp, ebp
pop ebp
ret
Function at 0x410cd0
Capabilities:
Modify service
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
mov eax, dword [0x420008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0xf003f
push 0
push 0
mov esi, edx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x410d1b
push 0xf01ff
push 0x41b530
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
jne 0x410d2e
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004168de
mov esp, ebp
pop ebp
ret
xorps xmm0, xmm0
mov dword [ebp - 0x238], 0
sub esp, 8
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x220], 0
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x218], 0
mov dword [ebp - 0x22c], 0
movq qword [ebp - 0x234], xmm0
test esi, esi
je 0x410e53
mov dword [ebp - 0x224], 0xa
mov dword [ebp - 0x21c], 0xa
mov dword [ebp - 0x214], 0xa
call fcn.00410eb0
mov esi, dword [ebp - 0x234]
lea eax, [ebp - 0x228]
push esi
push 2
push ebx
mov dword [esi], 0x15180
mov dword [esi + 8], 0
mov dword [esi + 4], 0
mov dword [esi + 0xc], 3
mov dword [esi + 0x10], eax
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x410e16
push 0x208
push eax
lea eax, [ebp - 0x210]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x210]
push str._n_ServiceHelper__ChangeServiceConfig_failed_code___d
push eax
call fcn.00410f00
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x410e2b
push str._n_ServiceHelper__ChangeServiceConfig_OK
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 0x238], 1
mov ecx, dword [ebp - 0x22c]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x410e76
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x410e76
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov dword [ebp - 0x224], 0x3e8
mov dword [ebp - 0x21c], 0x3e8
mov dword [ebp - 0x214], 0x3e8
jmp 0x410d9a
push ecx
push esi
call fcn.00416baa
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 8
push ebx
call esi
push edi
call esi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x238]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004168de
mov esp, ebp
pop ebp
ret

Function at 0x413640
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
test esi, esi
jle 0x41368d
push ebx
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov eax, dword [edi + 0x40]
test eax, eax
je 0x41366d
push eax
push 4
push 1
push str.
call ebx
add esp, 0x10
jmp 0x413687
push 4
lea ecx, [edi + 0xd0]
call fcn.00414440
mov ecx, dword [str.]
mov dword [eax - 1], ecx
mov byte [eax + 3], 0
sub esi, 1
jne 0x413655
pop ebx
pop edi
pop esi
pop ebp
ret 4
Function at 0x4136a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dh, byte [ecx + 0x4c]
mov eax, SysReAllocString
mov dword [ebp - 4], ecx
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp + 8], ebx
push esi
push edi
mov edi, ebx
test dh, dh
je 0x413843
movzx eax, byte [ebp + 0xc]
lea esi, [ecx + 0x4e]
mov dl, byte [ebx]
shl eax, 6
add esi, eax
mov dword [ebp - 8], esi
test dl, dl
je 0x413836
nop dword [eax]
lea eax, [edx - 1]
cmp al, 0x3e
ja 0x413824
movzx eax, dl
cmp byte [eax + esi], 0
je 0x413824
cmp ebx, edi
jae 0x413753
nop dword [eax]
mov esi, edi
mov eax, SysReAllocString
sub esi, ebx
cmp esi, 0x7fffffff
cmova esi, eax
mov eax, dword [ecx + 0x40]
test eax, eax
je 0x413729
push eax
push esi
push 1
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
jmp 0x41374a
push esi
add ecx, 0xd0
call fcn.00414440
push esi
push ebx
lea edi, [eax - 1]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov byte [edi + esi], 0
add esp, 0xc
mov edi, dword [ebp + 8]
mov ecx, dword [ebp - 4]
add ebx, esi
cmp ebx, edi
jb 0x413700
mov dl, byte [edi]
xor esi, esi
mov eax, 0x419784
nop dword [eax]
cmp byte [eax], dl
je 0x413774
add eax, 0xc
inc esi
cmp eax, 0x4197c0
jl 0x413760
jmp 0x41381d
mov eax, dword [ecx + 0x40]
test eax, eax
je 0x413789
push eax
push 0x26
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
jmp 0x41379c
push 1
add ecx, 0xd0
call fcn.00414440
mov word [eax - 1], 0x26
lea eax, [esi + esi*2]
mov esi, dword [ebp - 4]
mov ecx, dword [eax*4 + 0x419780]
mov eax, dword [eax*4 + 0x41977c]
mov dword [ebp + 0xc], ecx
mov edx, dword [esi + 0x40]
mov dword [ebp + 8], eax
test edx, edx
je 0x4137cd
push edx
push ecx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
jmp 0x4137f5
push ecx
lea ecx, [esi + 0xd0]
call fcn.00414440
push dword [ebp + 0xc]
push dword [ebp + 8]
lea esi, [eax - 1]
push esi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp + 0xc]
add esp, 0xc
mov byte [esi + eax], 0
mov esi, dword [ebp - 4]
mov eax, dword [esi + 0x40]
test eax, eax
je 0x41380a
push eax
push 0x3b
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
jmp 0x41381d
push 1
lea ecx, [esi + 0xd0]
call fcn.00414440
mov word [eax - 1], 0x3b
mov ecx, dword [ebp - 4]
inc ebx
mov esi, dword [ebp - 8]
mov dl, byte [edi + 1]
inc edi
mov dword [ebp + 8], edi
test dl, dl
jne 0x4136e0
mov dh, byte [ecx + 0x4c]
mov eax, SysReAllocString
test dh, dh
je 0x413843
cmp ebx, edi
jae 0x41388a
sub edi, ebx
cmp edi, 0x7fffffff
cmova edi, eax
mov eax, dword [ecx + 0x40]
test eax, eax
je 0x41386c
push eax
push edi
push 1
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
add ecx, 0xd0
call fcn.00414440
push edi
push ebx
lea esi, [eax - 1]
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov byte [esi + edi], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x4138a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, ecx
push edi
cmp byte [esi + 4], 0
je 0x4138da
mov eax, dword [esi + 0x40]
mov byte [esi + 4], 0
test eax, eax
je 0x4138c7
push eax
push 0x3e
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
jmp 0x4138da
push 1
lea ecx, [esi + 0xd0]
call fcn.00414440
mov word [eax - 1], 0x3e
mov eax, dword [esi + 0x38]
lea ecx, [eax + 1]
cmp ecx, dword [esi + 0x34]
jle 0x413933
lea edi, [ecx + ecx]
mov edx, 4
xor ecx, ecx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004168ef
mov ecx, dword [esi + 0x38]
mov ebx, eax
shl ecx, 2
push ecx
push dword [esi + 8]
push ebx
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esi + 8]
lea eax, [esi + 0xc]
add esp, 0x10
cmp ecx, eax
je 0x413928
push ecx
call fcn.004168fd
add esp, 4
mov eax, dword [esi + 0x38]
mov dword [esi + 8], ebx
mov dword [esi + 0x34], edi
jmp 0x413936
mov ebx, dword [esi + 8]
mov edi, dword [ebp + 8]
mov dword [ebx + eax*4], edi
inc dword [esi + 0x38]
cmp dword [esi + 0x48], 0
jge 0x41397b
cmp byte [ebp + 0xc], 0
jne 0x41398b
cmp byte [esi + 0x3c], 0
jne 0x413981
mov eax, dword [esi + 0x40]
test eax, eax
je 0x413966
push eax
push 0xa
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
jmp 0x413981
push 1
lea ecx, [esi + 0xd0]
call fcn.00414440
mov word [eax - 1], 0xa
jmp 0x413981
cmp byte [ebp + 0xc], 0
jne 0x41398b
mov eax, dword [esi]
mov ecx, esi
push dword [esi + 0x44]
call dword [eax + 0x2c]
mov eax, dword [esi + 0x40]
test eax, eax
je 0x4139a7
push eax
push 1
push 1
push 0x41bca0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
jmp 0x4139c0
push 1
lea ecx, [esi + 0xd0]
call fcn.00414440
mov cl, byte [0x41bca0]
mov byte [eax - 1], cl
mov byte [eax], 0
mov ebx, edi
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4139c5
mov eax, dword [esi + 0x40]
sub ebx, ecx
test eax, eax
je 0x4139f5
push eax
push ebx
push 1
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
mov byte [esi + 4], 1
inc dword [esi + 0x44]
mov byte [esi + 0x3c], 0
pop edi
pop esi
pop ebx
pop ebp
ret 8
push ebx
lea ecx, [esi + 0xd0]
call fcn.00414440
push ebx
push dword [ebp + 8]
lea edi, [eax - 1]
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov byte [ebx + edi], 0
inc dword [esi + 0x44]
mov byte [esi + 4], 1
mov byte [esi + 0x3c], 0
pop edi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x413a30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, ecx
mov eax, dword [ebx + 0x40]
test eax, eax
je 0x413a4b
push eax
push 0x20
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
jmp 0x413a5e
push 1
lea ecx, [ebx + 0xd0]
call fcn.00414440
mov word [eax - 1], 0x20
mov ecx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
lea edx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x413a68
mov eax, dword [ebx + 0x40]
sub edi, edx
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
test eax, eax
je 0x413a8a
push eax
push edi
push 1
push ecx
call esi
add esp, 0x10
jmp 0x413ab0
push edi
lea ecx, [ebx + 0xd0]
call fcn.00414440
push edi
push dword [ebp + 8]
lea esi, [eax - 1]
push esi
call sub.VCRUNTIME140.dll_memcpy
mov byte [edi + esi], 0
add esp, 0xc
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov eax, dword [ebx + 0x40]
test eax, eax
je 0x413ac8
push eax
push 2
push 1
push 0x41bf98
call esi
add esp, 0x10
jmp 0x413ae4
push 2
lea ecx, [ebx + 0xd0]
call fcn.00414440
mov cx, word [0x41bf98]
mov word [eax - 1], cx
mov byte [eax + 1], 0
push 0
push dword [ebp + 0xc]
mov ecx, ebx
call fcn.004136a0
mov eax, dword [ebx + 0x40]
pop edi
pop esi
test eax, eax
je 0x413b0a
push eax
push 0x22
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
pop ebx
pop ebp
ret 8
push 1
lea ecx, [ebx + 0xd0]
call fcn.00414440
pop ebx
mov word [eax - 1], 0x22
pop ebp
ret 8