joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407c52
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x820
mov eax, dword [0x410034]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x818], eax
xor edi, edi
mov eax, dword [ebp + 0x10]
push 0x800
mov dword [ebp - 0x81c], eax
lea eax, [ebp - 0x804]
push edi
push eax
mov dword [ebp - 0x814], esi
call sub.msvcrt.dll_memset
xor ebx, ebx
add esp, 0xc
and dword [ebp - 0x80c], ebx
test esi, esi
jne 0x407cb2
mov eax, 0x80070057
jmp 0x407e7e
cmp dword [ebp - 0x818], ebx
je 0x407e79
cmp dword [ebp - 0x81c], ebx
je 0x407e79
push esi
push 0x401740
call fcn.0040b57f
pop ecx
pop ecx
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x810], esi
cmp esi, 0xffffffff
jne 0x407d2c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x407d12
movzx edi, di
or edi, 0x80070000
push dword [ebp - 0x814]
xor esi, esi
push 0x401778
mov dword [ebp - 0x810], esi
call fcn.0040b551
pop ecx
pop ecx
mov ecx, edi
call fcn.0040b5a8
test edi, edi
jne 0x407e3a
push dword [ebp - 0x814]
and dword [ebp - 0x808], 0
push 0x40179c
call fcn.0040b57f
pop ecx
pop ecx
push 0
lea eax, [ebp - 0x808]
push eax
push 0x800
lea eax, [ebp - 0x804]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor ecx, ecx
mov esi, eax
call fcn.0040b5a8
test esi, esi
jne 0x407d94
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x407da2
movzx edi, di
or edi, 0x80070000
jmp 0x407da0
cmp dword [ebp - 0x808], 0
jne 0x407da8
xor edi, edi
inc edi
test edi, edi
jne 0x407e3a
push dword [ebp - 0x808]
push 0x4017c8
call fcn.0040b57f
mov eax, dword [ebp - 0x808]
add eax, dword [ebp - 0x80c]
push eax
mov dword [ebp - 0x820], eax
call fcn.0040eb2e
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x407dde
mov edi, 0x8007000e
mov ecx, edi
call fcn.0040b5a8
test edi, edi
jne 0x407e3a
test ebx, ebx
je 0x407e03
push dword [ebp - 0x80c]
push ebx
push esi
call sub.msvcrt.dll_memcpy
push ebx
call fcn.0040eb57
add esp, 0x10
push dword [ebp - 0x808]
lea eax, [ebp - 0x804]
push eax
mov eax, dword [ebp - 0x80c]
add eax, esi
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x820]
mov ebx, esi
mov esi, dword [ebp - 0x810]
add esp, 0xc
mov dword [ebp - 0x80c], eax
jmp 0x407d3b
cmp edi, 1
jne 0x407e59
mov eax, dword [ebp - 0x818]
xor edi, edi
mov ecx, dword [ebp - 0x81c]
mov dword [eax], ebx
xor ebx, ebx
mov eax, dword [ebp - 0x80c]
mov dword [ecx], eax
test ebx, ebx
je 0x407e64
push ebx
call fcn.0040eb57
pop ecx
mov eax, dword [ebp - 0x810]
test eax, eax
je 0x407e75
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x407e7e
mov eax, 0x80004003
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040ee30
leave
ret 0xc
Function at 0x40a3af
Capabilities:
Check os version

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x410034]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x114]
push esi
push edi
push 0x110
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x118], 0x114
call fcn.0040b354
mov edi, eax
call fcn.0040b9f1
and dword [0x410c0c], 0
call fcn.0040b677
push 0x404134
call fcn.0040b523
mov dword [esp], 0x404160
call fcn.0040b523
pop ecx
test edi, edi
jne 0x40a54c
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x40a44f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x40a449
movzx edi, di
or edi, 0x80070000
test edi, edi
jne 0x40a54c
cmp dword [ebp - 0x114], 6
jb 0x40a530
jne 0x40a46b
cmp dword [ebp - 0x110], 2
jb 0x40a530
push 0x4042b0
call fcn.0040b57f
push 0x20
call fcn.0040eb2e
mov esi, eax
xor eax, eax
pop ecx
pop ecx
test esi, esi
je 0x40a4a4
mov dword [esi], 0x4010a0
mov dword [esi + 4], 1
mov dword [esi + 8], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
jmp 0x40a4a6
mov esi, eax
test esi, esi
jne 0x40a4af
mov edi, 0x8007000e
mov ecx, edi
call fcn.0040b5a8
test edi, edi
jne 0x40a4e7
push 0x4042f0
call fcn.0040b57f
pop ecx
mov ecx, esi
call fcn.0040a5a5
mov edi, eax
mov ecx, edi
call fcn.0040b5a8
test edi, edi
jne 0x40a4e7
mov ecx, dword [esi + 8]
push ebx
push dword [ebp + 8]
call fcn.0040e249
mov edi, eax
test esi, esi
je 0x40a54c
push 0x404558
call fcn.0040b57f
pop ecx
mov ecx, esi
call fcn.0040adb1
mov ecx, eax
call fcn.0040b5a8
push 0x404598
call fcn.0040b57f
pop ecx
mov ecx, dword [esi + 8]
call fcn.0040e154
mov ecx, eax
call fcn.0040b5a8
mov eax, dword [esi]
push esi
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x41116c]
call esi
jmp 0x40a54c
push 0x4041d8
call fcn.0040b523
mov dword [esp], 0x404260
call fcn.0040b523
pop ecx
mov edi, 0x80004005
xor ecx, ecx
call fcn.0040b44f
push 0x401c4c
call fcn.0040b523
mov eax, dword [0x410c14]
pop ecx
test eax, eax
je 0x40a581
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push dword [0x410c14]
call fcn.0040eb57
and dword [0x410c14], 0
pop ecx
and dword [0x41039c], 0
xor eax, eax
and dword [0x410394], 0
test edi, edi
mov ecx, dword [ebp - 4]
pop edi
setne al
xor ecx, ebp
pop esi
pop ebx
call fcn.0040ee30
leave
ret
Function at 0x40bd26
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
push 0x64
mov dword [edi], eax
mov eax, dword [ebp + 0xc]
mov dword [edi + 4], eax
pop eax
push 0x40565c
mov word [edi + 8], ax
call fcn.0040b57f
push 0x18
call fcn.0040eb2e
pop ecx
xor ebx, ebx
mov dword [edi + 0xc], eax
pop ecx
test eax, eax
jne 0x40bd65
mov esi, 0x8007000e
jmp 0x40bd96
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x40bd94
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40bd86
movzx esi, si
or esi, 0x80070000
push dword [edi + 0xc]
call fcn.0040eb57
pop ecx
mov dword [edi + 0xc], ebx
jmp 0x40bd96
mov esi, ebx
mov ecx, esi
call fcn.0040b5a8
test esi, esi
jne 0x40be1f
push 0x405690
call fcn.0040b57f
movzx eax, word [edi + 8]
pop ecx
push ebx
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov dword [edi + 0x18], eax
test eax, eax
jne 0x40bdd6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40bdd6
movzx esi, si
or esi, 0x80070000
mov ecx, esi
call fcn.0040b5a8
test esi, esi
jne 0x40be1f
push 0x4056b8
call fcn.0040b57f
pop ecx
push ebx
push ebx
push edi
push 0x40bcd0
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [edi + 0x1c], eax
test eax, eax
jne 0x40be18
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40be18
movzx esi, si
or esi, 0x80070000
mov ecx, esi
call fcn.0040b5a8
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x40e338
Capabilities:
Accept command line arguments

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x410034]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x204]
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
push 0x200
push 0
push eax
mov dword [ebp - 0x210], edi
call sub.msvcrt.dll_memset
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x20c], eax
mov dword [ebp - 0x208], eax
test edi, edi
je 0x40e4c1
test ebx, ebx
je 0x40e4c1
mov ecx, dword [esi]
mov dword [0x410394], ecx
test ecx, ecx
je 0x40e3a9
push eax
push 7
push 3
pop edx
call fcn.0040ba64
xor edi, edi
inc edi
push edi
call fcn.0040f43b
push eax
call dword [sym.imp.msvcrt.dll_fflush]
push 0
call fcn.0040f43b
push eax
mov esi, 0x100
lea eax, [ebp - 0x204]
push esi
push eax
call dword [sym.imp.msvcrt.dll_fgetws]
and dword [0x410394], 0
lea eax, [ebp - 0x208]
add esp, 0x18
mov dword [0x41003c], edi
mov edx, esi
lea ecx, [ebp - 0x204]
push eax
call fcn.004086a4
mov esi, eax
test esi, esi
jne 0x40e4bd
mov eax, dword [ebp - 0x208]
test eax, eax
je 0x40e43f
lea ecx, [eax + eax]
movzx edx, word [ebp + ecx - 0x206]
sub ecx, 2
dec eax
cmp edx, 0xa
je 0x40e425
cmp edx, 0xd
jne 0x40e43f
cmp ecx, 0x200
jae 0x40e4d7
xor edx, edx
mov word [ebp + ecx - 0x204], dx
test eax, eax
jne 0x40e40f
push dword [ebp - 0x204]
lea edi, [ebp - 0x204]
jmp 0x40e454
add edi, 2
movzx eax, word [edi]
push eax
call dword [sym.imp.msvcrt.dll_iswspace]
pop ecx
test eax, eax
jne 0x40e44d
xor eax, eax
cmp ax, word [edi]
jne 0x40e46b
xor esi, esi
inc esi
jmp 0x40e4bd
lea eax, [ebp - 0x20c]
push eax
push edi
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov edi, eax
test edi, edi
jne 0x40e4ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x40e494
movzx esi, si
or esi, 0x80070000
push esi
lea eax, [ebp - 0x204]
push eax
push 0x4072a0
call fcn.0040b551
add esp, 0xc
test esi, esi
jne 0x40e4bd
mov ecx, dword [ebp - 0x210]
mov eax, dword [ebp - 0x20c]
mov dword [ecx], eax
mov dword [ebx], edi
mov eax, esi
jmp 0x40e4c6
mov eax, 0x80004003
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040ee30
leave
ret 8
call fcn.0040f37b
int3
Function at 0x40ee20
Capabilities:
Terminate process

Disassembly:
push 0xc
push 0x40f468
call fcn.0040f1a8
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword fs:[0x18]
mov esi, dword [eax + 4]
mov edi, ebx
mov edx, 0x410c20
mov ecx, esi
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x40ec48
cmp eax, esi
jne 0x40ec3b
xor esi, esi
inc esi
mov edi, esi
jmp 0x40ec4b
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40ec1f
xor esi, esi
inc esi
cmp dword [0x410c24], esi
jne 0x40ec5d
push 0x1f
call fcn.0057f000
pop ecx
jmp 0x40ec97
cmp dword [0x410c24], ebx
jne 0x40ec91
mov dword [0x410c24], esi
push 0x4011c4
push 0x4011b8
call fcn.0040ed7c
pop ecx
pop ecx
test eax, eax
je 0x40ec97
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
jmp 0x40ed6c
mov dword [0x41004c], esi
cmp dword [0x410c24], esi
jne 0x40ecba
push 0x4011b4
push 0x4011ac
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x410c24], 2
test edi, edi
jne 0x40ecc7
xor eax, eax
mov ecx, 0x410c20
xchg dword [ecx], eax
cmp dword [0x410c28], 0
je 0x40ecf3
push 0x410c28
call fcn.0040f000
pop ecx
test eax, eax
je 0x40ecf3
push ebx
push 2
push ebx
mov esi, dword [0x410c28]
mov ecx, esi
call dword [0x41116c]
call esi
push dword [0x410058]
push dword [0x410054]
push dword [0x410050]
call fcn.0040a3af
add esp, 0xc
mov dword [0x410048], eax
cmp dword [0x410060], 0
jne 0x40ed51
push eax
call dword [sym.imp.msvcrt.dll_exit]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx]
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
push ecx
push eax
call sub.msvcrt.dll__XcptFilter
pop ecx
pop ecx
ret
cmp dword [0x41004c], 0
jne 0x40ed65
call dword [sym.imp.msvcrt.dll__cexit]
mov eax, dword [0x410048]
mov dword [ebp - 4], 0xfffffffe
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
call fcn.0040f0f5
jmp 0x40ec03

Function at 0x40eec4
Capabilities:
Parse pe header

Disassembly:
push 0xc
push 0x40f488
call fcn.0040f1a8
xor ecx, ecx
mov eax, dword [ebp + 8]
test eax, eax
je 0x40ef24
cmp eax, 0xffffffff
je 0x40ef24
mov dword [ebp - 4], ecx
mov edx, 0x5a4d
cmp word [eax], dx
jne 0x40ef1d
mov edx, dword [eax + 0x3c]
test edx, edx
js 0x40ef1d
cmp edx, 0x10000000
jae 0x40ef1d
add eax, edx
mov dword [ebp - 0x1c], eax
mov ecx, dword [eax]
sub ecx, 0x4550
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
jmp 0x40ef1a
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 0xfffffffe
mov eax, ecx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x40ef90
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x40efce
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x40efc6
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x40efd0
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x40efb6
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x40f0c0
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x40f0f1
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40f0f1
mov ecx, 0x10b
cmp word [eax + 0x18], cx
jne 0x40f0f1
mov eax, 1
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x10001b60
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub dword [ebp + 0xc], 1
jne 0x10001b7e
push 0
push 0
push 0
push 0x10001b50
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, 1
pop ebp
ret 0xc

Function at 0x411014
Capabilities:
Terminate process

Disassembly:
jmp 0x411890
jmp fcn.00412090
cmp ecx, dword [section..data]
jne 0x41189a
repz ret
jmp 0x411091
Function at 0x10031820
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x1004f37c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x10031850
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10038620
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x10031880
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x10031880
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
pop esi
mov byte [eax], bl
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10038620
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x1003197a
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x100318a9
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x100318dd
push dword [esi + 0x4c]
movsx eax, bl
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10038620
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x28], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x27]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
test eax, eax
js 0x1003197a
cmp eax, 1
jle 0x1003193b
cmp eax, 3
jne 0x1003197a
push dword [esi + 0x4c]
push dword [ebp - 0x28]
call fcn.1000eca0
add esp, 8
or ecx, 0xffffffff
test al, al
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10038620
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x10031959
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x1003197a
lea eax, [ebp - 0x28]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
je 0x1003197a
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10038620
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10038620
mov esp, ebp
pop ebp
ret 4
Function at 0x10036f80
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003ecf8
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x1004f37c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x1004f338]
cmp eax, 0xffffffff
jne 0x10036fb6
xor ebx, ebx
jmp 0x10036fbf
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov ebx, eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], 0
test ebx, ebx
je 0x10036fff
mov eax, dword [ebx + 0x18]
mov esi, dword [ebx + 0xc]
test eax, eax
jne 0x1003703e
test esi, esi
jne 0x10037042
push 0x10035760
push 0x10050e58
call fcn.1000eca0
mov eax, dword [0x1004f338]
add esp, 8
cmp eax, 0xffffffff
je 0x10036fff
push esi
push eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
mov dword [ebp - 4], 1
test ebx, ebx
je 0x1003702c
or eax, 0xffffffff
lock xadd dword [ebx + 4], eax
jne 0x1003702c
mov eax, dword [ebx]
mov ecx, ebx
push 0
call dword [eax]
push ebx
push 0
call dword [sym.imp.kernel32.dll_GetProcessHeap]
push eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x10037084
mov eax, dword [esi + 4]
mov dword [ebx + 0xc], eax
mov ecx, dword [esi]
test ecx, ecx
je 0x1003706d
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [esi]
mov ecx, edi
push 0
mov eax, dword [edi]
call dword [eax]
push edi
push 0
call dword [sym.imp.kernel32.dll_GetProcessHeap]
push eax
call dword [sym.imp.kernel32.dll_HeapFree]
push esi
push 0
call dword [sym.imp.kernel32.dll_GetProcessHeap]
push eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov esi, dword [ebx + 0xc]
test esi, esi
jne 0x10037042
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x10036fd0
nop
mov esi, dword [ebx + 0x14]
mov esi, dword [esi]
mov ecx, dword [esi + 0x14]
test ecx, ecx
je 0x100370a9
mov edx, dword [esi + 0x1c]
test edx, edx
je 0x100370a9
mov eax, dword [ecx]
push edx
call dword [eax + 4]
push esi
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebx + 0x14]
call fcn.1000eca0
mov eax, dword [ebx + 0x18]
test eax, eax
jne 0x10037090
jmp 0x10036fd0

Function at 0x100370d0
Capabilities:
Create thread
Resume thread

Disassembly:
push ebx
push esi
mov esi, ecx
mov edx, dword [esi]
lea eax, [edx + 0x10]
push eax
push 4
push edx
push 0x10037130
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x100370fa
pop esi
xor al, al
pop ebx
ret
mov eax, dword [esi]
push edi
add eax, 4
lock inc dword [eax]
mov edi, dword [esi]
mov eax, dword [edi + 8]
test eax, eax
je 0x10037118
cmp eax, 0xffffffff
je 0x10037118
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [edi + 8], ebx
mov eax, dword [esi]
push dword [eax + 8]
call dword [sym.imp.kernel32.dll_ResumeThread]
pop edi
pop esi
mov al, 1
pop ebx
ret
Function at 0x401bb0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x401bdc
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x401c04
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x401c0a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x401c72
jg 0x401c21
test esi, esi
je 0x401c72
test ecx, ecx
jl 0x401c6d
jg 0x401c2b
test eax, eax
je 0x401c6d
cmp edi, ecx
jg 0x401c3f
jl 0x401c35
cmp esi, eax
jae 0x401c3f
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x401c75
mov ecx, dword [ebp + 8]
jmp 0x401c7f
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x401c99
jg 0x401c7f
test esi, esi
je 0x401c99
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x401c99
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x401cb0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x401cdc
jl 0x401cd0
test ecx, ecx
jne 0x401cdc
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x401cf5
push eax
push ecx
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x401d43
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x401d49
mov edi, dword [ebp - 4]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp - 4], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x401d49
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x401db6
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x401d72
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x401da4
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x401db6
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x401d80
test edi, edi
je 0x401db6
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc