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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
and eax, 0x3f
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
sar ecx, 6
imul edi, eax, 0x30
mov dword [ebp - 8], ecx
push 0xa
mov eax, dword [ecx*4 + 0x540140]
pop ebx
mov edx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], edx
mov edx, dword [ebp + 0xc]
test esi, esi
je 0x4b8081
cmp word [edx], bx
jne 0x4b8081
or byte [edi + eax + 0x28], 4
jmp 0x4b8086
and byte [edi + eax + 0x28], 0xfb
lea eax, [edx + esi*2]
mov ebx, edx
mov dword [ebp - 0xc], eax
mov esi, edx
cmp edx, eax
jae 0x4b81da
mov dword [ebp - 0x10], 0xd
movzx eax, word [ebx]
cmp eax, 0x1a
je 0x4b81ba
cmp ax, word [ebp - 0x10]
je 0x4b80bf
mov word [esi], ax
add esi, 2
add ebx, 2
jmp 0x4b81af
lea eax, [ebx + 2]
cmp eax, dword [ebp - 0xc]
jae 0x4b80e5
push 0xa
pop ecx
cmp word [eax], cx
jne 0x4b80d5
push ecx
pop eax
push 4
jmp 0x4b80da
push 0xd
pop eax
push 2
mov word [esi], ax
pop eax
add ebx, eax
jmp 0x4b81a9
push 0
mov ebx, eax
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4b81a0
cmp dword [ebp - 0x18], 0
je 0x4b81a0
mov ecx, dword [ebp - 8]
push 0xa
mov eax, dword [ecx*4 + 0x540140]
test byte [edi + eax + 0x28], 0x48
pop eax
je 0x4b816c
mov dx, word [ebp - 4]
cmp dx, ax
jne 0x4b8130
mov word [esi], ax
jmp 0x4b8164
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ecx*4 + 0x540140]
mov word [ebp - 0x20], dx
push 0xa
mov byte [edi + eax + 0x2a], dl
mov ecx, dword [ecx*4 + 0x540140]
mov al, byte [ebp - 0x1f]
pop edx
mov byte [edi + ecx + 0x2b], al
mov ecx, dword [ebp - 8]
mov eax, dword [ecx*4 + 0x540140]
mov byte [edi + eax + 0x2c], dl
mov edx, dword [ebp + 0xc]
add esi, 2
jmp 0x4b81af
cmp word [ebp - 4], ax
jne 0x4b8181
mov edx, dword [ebp + 0xc]
cmp esi, edx
jne 0x4b8181
mov word [esi], ax
add esi, 2
jmp 0x4b81af
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004b9b99
mov edx, dword [ebp + 0xc]
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x4b81ac
jmp 0x4b81a3
mov edx, dword [ebp + 0xc]
push 0xd
pop eax
mov word [esi], ax
add esi, 2
mov ecx, dword [ebp - 8]
cmp ebx, dword [ebp - 0xc]
jb 0x4b809f
jmp 0x4b81da
mov ecx, dword [ecx*4 + 0x540140]
mov al, byte [edi + ecx + 0x28]
test al, 0x40
jne 0x4b81d1
or al, 2
mov byte [edi + ecx + 0x28], al
jmp 0x4b81da
mov cx, word [ebx]
mov word [esi], cx
add esi, 2
sub esi, edx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4bf400
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0
push dword [ebp + 8]
call fcn.004bfa10
add esp, 8
test al, al
je 0x4bf425
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x4bf425
mov al, 1
pop ebp
ret
xor al, al
pop ebp
ret

Function at 0x4bfa10
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
setne al
pop ebp
ret

Function at 0x4c0ec0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea eax, [ebp - 4]
push eax
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4c0eeb
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4c0eeb
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp + 8]
xor ecx, ecx
mov edx, dword [ebp - 4]
add ecx, esi
pop esi
adc edx, 0
mov dword [eax], ecx
mov dword [eax + 4], edx
mov al, 1
mov esp, ebp
pop ebp
ret 4
Function at 0x4c6c10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x536204]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0xc]
push esi
mov esi, dword [ebp + 0xc]
push edi
push 0
push 0
push 0x80
push 2
push 1
push 0x40000000
push eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
call fcn.004c5950
mov edi, dword [ebp - 0xc]
test eax, eax
js 0x4c6ca3
cmp dword [esi + 0x14], 0x10
mov eax, dword [esi + 0x10]
jb 0x4c6c63
mov esi, dword [esi]
push 0
lea ecx, [ebp - 8]
push ecx
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4c6c81
call fcn.00417f00
mov esi, eax
test esi, esi
js 0x4c6c9c
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x4c6c9a
call fcn.00417f00
mov esi, eax
not esi
shr esi, 0x1f
jmp 0x4c6ca5
xor esi, esi
not esi
shr esi, 0x1f
jmp 0x4c6ca5
xor esi, esi
test edi, edi
je 0x4c6cb0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.00445b3a
mov esp, ebp
pop ebp
ret
Function at 0x4c9e90
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f7c16
mov eax, dword fs:[0]
push eax
sub esp, 0x108
mov eax, dword [0x536204]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, dword [ecx + 8]
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0xb4], ecx
mov dword [ebp - 4], 0
test esi, esi
je 0x4c9f7d
test edi, edi
je 0x4c9fa9
mov edx, dword [ebp + 0x10]
test edx, 0xf
jne 0x4c9fd5
lea eax, [edx - 0x10]
cmp dword [ebp + 0xc], eax
jbe 0x4ca001
cmp byte [ecx + 0x10], 0
je 0x4ca02d
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], edx
push eax
push edi
push 0
push 1
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov ecx, eax
test ecx, ecx
je 0x4ca059
jmp 0x4c9f55
mov eax, dword [ebp - 0x18]
mov dword [ebx], eax
test ecx, ecx
setne al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00445b3a
mov esp, ebp
pop ebp
ret 0x10
push 0x80090003
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Decrypt_1_:_Key_is_not_valid
lea ecx, [ebp - 0xc0]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0xc0]
push eax
call fcn.0046fbb4
push 0x6f8
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Decrypt_1_:_Buffer_is_NULL
lea ecx, [ebp - 0xcc]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0xcc]
push eax
call fcn.0046fbb4
push 0x80090005
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Decrypt_1_:_Data_size_is_not_a_multple_of_block_size
lea ecx, [ebp - 0xd8]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0xd8]
push eax
call fcn.0046fbb4
push 0x80090028
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Decrypt_1_:_Buffer_is_too_small
lea ecx, [ebp - 0xe4]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0xe4]
push eax
call fcn.0046fbb4
push 0x80090027
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Decrypt_1_:_IV_has_not_been_set
lea ecx, [ebp - 0xf0]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0xf0]
push eax
call fcn.0046fbb4
push 0x98
lea ecx, [ebp - 0xb0]
call fcn.004cc320
push 1
push 2
lea ecx, [ebp - 0xb0]
call fcn.004c8820
lea eax, [ebp - 0xb0]
mov byte [ebp - 4], 1
push str.Decrypt_1_:_CryptDecrypt_failed__
push eax
call fcn.004c8240
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 8
call esi
push eax
call fcn.004caaa0
push eax
lea eax, [ebp - 0xb0]
push eax
call fcn.004c8240
add esp, 0xc
lea eax, [ebp - 0xb0]
push str.__0x
push eax
call fcn.004c8240
add esp, 8
mov ecx, eax
push 0x4ccdd0
call fcn.004c9810
mov edi, eax
call esi
push eax
mov ecx, edi
call fcn.004c9550
push 0x516ed8
push eax
call fcn.004c8240
add esp, 8
mov dword [ebx], 0
lea eax, [ebp - 0x114]
lea ecx, [ebp - 0xb0]
push eax
call fcn.004cd550
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.0043a083
push eax
lea ecx, [ebp - 0xfc]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0xfc]
push eax
call fcn.0046fbb4
push 0
push 0
call fcn.0046fbb4
int3
Function at 0x4ca4b0
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f7c96
mov eax, dword fs:[0]
push eax
sub esp, 0xfc
mov eax, dword [0x536204]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edx, dword [ecx + 8]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0xb4], ecx
mov dword [ebp - 4], 0
test edx, edx
je 0x4ca599
test esi, esi
je 0x4ca5c5
mov ebx, dword [ebp + 0x10]
mov eax, ebx
and eax, 0xfffffff0
add eax, 0x10
cmp dword [ebp + 0xc], eax
jb 0x4ca5f1
cmp byte [ecx + 0x10], 0
je 0x4ca61d
push dword [ebp + 0xc]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], ebx
push eax
push esi
push 0
push 1
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
mov ecx, eax
test ecx, ecx
je 0x4ca649
jmp 0x4ca571
mov eax, dword [ebp - 0x18]
mov dword [edi], eax
test ecx, ecx
setne al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00445b3a
mov esp, ebp
pop ebp
ret 0x10
push 0x80090003
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Encrypt_1_:_Key_is_not_valid
lea ecx, [ebp - 0xc0]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0xc0]
push eax
call fcn.0046fbb4
push 0x6f8
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Encrypt_1_:_Buffer_is_NULL
lea ecx, [ebp - 0xcc]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0xcc]
push eax
call fcn.0046fbb4
push 0x80090028
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Encrypt_1_:_Buffer_is_too_small
lea ecx, [ebp - 0xd8]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0xd8]
push eax
call fcn.0046fbb4
push 0x80090027
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.Encrypt_1_:_IV_has_not_been_set
lea ecx, [ebp - 0xe4]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0xe4]
push eax
call fcn.0046fbb4
push 0x98
lea ecx, [ebp - 0xb0]
call fcn.004cc320
push 1
push 2
lea ecx, [ebp - 0xb0]
call fcn.004c8820
lea eax, [ebp - 0xb0]
mov byte [ebp - 4], 1
push str.Encrypt_1_:_CryptEncrypt_failed__
push eax
call fcn.004c8240
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 8
call esi
push eax
call fcn.004caaa0
push eax
lea eax, [ebp - 0xb0]
push eax
call fcn.004c8240
add esp, 0xc
lea eax, [ebp - 0xb0]
push str.__0x
push eax
call fcn.004c8240
add esp, 8
mov ecx, eax
push 0x4ccdd0
call fcn.004c9810
mov ebx, eax
call esi
push eax
mov ecx, ebx
call fcn.004c9550
push 0x516ed8
push eax
call fcn.004c8240
add esp, 8
mov dword [edi], 0
lea eax, [ebp - 0x108]
lea ecx, [ebp - 0xb0]
push eax
call fcn.004cd550
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.0043a083
push eax
lea ecx, [ebp - 0xf0]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0xf0]
push eax
call fcn.0046fbb4
push 0
push 0
call fcn.0046fbb4
int3
Function at 0x4caeb0
Capabilities:
Encrypt data using aes via winapi

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f7d38
mov eax, dword fs:[0]
push eax
sub esp, 0x94
mov eax, dword [0x536204]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov eax, dword [edi + 8]
lea ebx, [edi + 8]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x18], ecx
test eax, eax
je 0x4caf0a
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov ecx, dword [ebp - 0x18]
mov dword [ebx], 0
mov byte [edi + 0x10], 0
cmp dword [edi + 4], 0
mov dword [ebp - 4], 0
je 0x4cb039
test ecx, ecx
je 0x4cb054
mov esi, dword [ebp + 0xc]
cmp esi, 0x10
je 0x4caf39
cmp esi, 0x18
je 0x4caf39
cmp esi, 0x20
jne 0x4cb06f
push 0x2c
lea eax, [ebp - 0x44]
push 0
push eax
call fcn.004701b0
add esp, 0xc
mov dword [ebp - 0x44], 0x208
mov byte [ebp - 4], 1
cmp esi, 0x10
je 0x4caf80
cmp esi, 0x18
je 0x4caf72
cmp esi, 0x20
jne 0x4cb08a
mov dword [ebp - 0x40], 0x6610
mov eax, esi
jmp 0x4caf8c
mov dword [ebp - 0x40], 0x660f
mov eax, 0x18
jmp 0x4caf8c
mov dword [ebp - 0x40], 0x660e
mov eax, 0x10
push esi
push dword [ebp - 0x18]
mov dword [ebp - 0x3c], eax
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.004cd850
add esp, 0x10
test eax, eax
jne 0x4cb0a5
push ebx
push 0
push 0
lea eax, [esi + 0xc]
push eax
lea eax, [ebp - 0x44]
push eax
push dword [edi + 4]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x4cb0c6
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 1
push eax
push 4
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x4cb0e7
jmp 0x4cb003
mov al, 1
lea ecx, [ebp - 0x44]
mov edx, 4
nop dword [eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub edx, 1
jne 0x4cb010
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00445b3a
mov esp, ebp
pop ebp
ret 8
push str.SetKey:_Provider_is_not_valid
lea ecx, [ebp - 0x58]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0x58]
push eax
call fcn.0046fbb4
push str.SetKey:_Key_buffer_is_NULL
lea ecx, [ebp - 0x64]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0x64]
push eax
call fcn.0046fbb4
push str.SetKey:_Key_size_is_not_valid
lea ecx, [ebp - 0x70]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0x70]
push eax
call fcn.0046fbb4
push str.SetKey:_Key_size_is_not_valid
lea ecx, [ebp - 0x7c]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0x7c]
push eax
call fcn.0046fbb4
push str.SetKey:_Unable_to_copy_key
lea ecx, [ebp - 0x88]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0x88]
push eax
call fcn.0046fbb4
push str.SetKey:_Import_key_failed
lea ecx, [ebp - 0x94]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0x94]
push eax
call fcn.0046fbb4
push str.SetKey:_Set_CBC_mode_failed
lea ecx, [ebp - 0xa0]
call fcn.004c8b80
push 0x52ddd4
lea eax, [ebp - 0xa0]
push eax
call fcn.0046fbb4
push 0
push 0
call fcn.0046fbb4
int3
Function at 0x4cce00
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f7f08
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x536204]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 8
mov dword [esi + 0x30], 0
mov dword [esi + 8], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0x201
mov dword [esi + 0x18], 6
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov dword [esi + 0xc], 0
call fcn.0041caa0
mov edi, eax
add esp, 4
test edi, edi
je 0x4ccea4
xorps xmm0, xmm0
movq qword [edi], xmm0
push 1
mov dword [ebp - 4], 0
call fcn.004d2745
add esp, 4
mov dword [edi + 4], eax
jmp 0x4ccea6
xor edi, edi
mov eax, dword [ebp + 8]
mov dword [esi + 0x30], edi
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], 0
mov ecx, dword [edi + 4]
mov dword [ebp - 4], 1
mov dword [ebp - 0x10], ecx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x14]
mov dword [ebp - 4], 2
push eax
call fcn.004c84f0
add esp, 4
mov ecx, eax
mov edx, dword [eax]
push 0x20
mov eax, dword [edx + 0x20]
call eax
mov bl, al
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 4], 3
test ecx, ecx
je 0x4ccf07
mov edx, dword [ecx]
call dword [edx + 8]
test eax, eax
je 0x4ccf07
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
cmp dword [esi + 0x38], 0
mov dword [ebp - 4], 0xffffffff
mov byte [esi + 0x40], bl
jne 0x4ccf2a
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
and eax, 0x13
or eax, 4
mov dword [esi + 0xc], eax
and ecx, eax
jne 0x4ccf4d
cmp byte [ebp + 0xc], 0
je 0x4ccf39
push esi
call fcn.004d29fd
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
test cl, 4
je 0x4ccf59
mov esi, str.ios_base::badbit_set
jmp 0x4ccf69
test cl, 2
mov esi, str.ios_base::failbit_set
mov eax, str.ios_base::eofbit_set
cmove esi, eax
lea eax, [ebp - 0x1c]
push 1
push eax
call fcn.004ccf90
add esp, 8
lea ecx, [ebp - 0x30]
push eax
push esi
call fcn.004c8cf0
push 0x52dd90
lea eax, [ebp - 0x30]
push eax
call fcn.0046fbb4
int3
Function at 0x401188
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x11c
mov esi, dword [ebp + 8]
lea eax, [ebp - 0xc]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x110]
mov dword [esp + 8], 0x100
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.kernel32.dll_ReadFile
sub esp, 0x14
test eax, eax
jne 0x4011ec
call sub.kernel32.dll_GetLastError
cmp eax, 0x6d
je 0x401234
mov dword [esp], str.ReadFile
call fcn.00401000
mov dword [esp], str.WriteConsole
call fcn.00401000
cmp dword [ebp - 0xc], 0
je 0x4011c6
mov ebx, dword [ebp - 0xc]
mov dword [esp], 0xfffffff5
call sub.kernel32.dll_GetStdHandle
push edx
lea edx, [ebp - 0x10]
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x110]
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.kernel32.dll_WriteConsoleA
sub esp, 0x14
test eax, eax
jne 0x401196
jmp 0x4011de
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret

Function at 0x40123c
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x7c
lea ebx, [ebp - 0x58]
mov dword [esp + 8], 0x44
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 8]
mov dword [ebp - 0x58], 0x44
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x14]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x2c], 0x100
mov dword [ebp - 0x4c], str.debugged_program_console
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x10
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0
call sub.kernel32.dll_CreateProcessA
sub esp, 0x28
test eax, eax
je 0x4012f7
mov eax, dword [ebp - 0x14]
mov dword [section..bss], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.kernel32.dll_CloseHandle
test eax, eax
push ecx
je 0x401305
mov ebx, dword [ebp - 4]
leave
ret
mov dword [esp], str.CreateProcess
call fcn.00401000
mov dword [esp], str.CloseHandle
call fcn.00401000
Function at 0x4049fc
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xc
mov ebx, eax
mov esi, edx
cmp dword [edx], 0x28
je 0x404a18
add esp, 0xc
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.004032ac
mov ebp, dword [eax + 4]
test ebp, ebp
je 0x404a64
mov edi, dword [eax + 8]
mov edx, dword [edx + 4]
mov ecx, dword [edx + 8]
lea eax, [edi + ecx]
cmp eax, dword [ebx + 0xc]
jbe 0x404a44
mov ecx, dword [edx + 8]
mov edx, dword [edx + 4]
mov eax, ebx
add esp, 0xc
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00403224
lea eax, [ebp + edi]
push edi
push ecx
push dword [edx + 4]
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esi + 4]
mov eax, dword [eax + 8]
add dword [ebx + 8], eax
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [edx + 4]
jmp 0x404a30
Function at 0x4055e8
Capabilities:
Allocate thread local storage

Disassembly:
sub esp, 0xc
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x40561c
mov dword [0x410080], eax
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.004060b0
test eax, eax
sete al
movzx eax, al
mov dword [0x409040], eax
add esp, 0xc
ret
call sub.kernel32.dll_GetLastError
jmp 0x40560a

Function at 0x4056b4
Capabilities:
Set thread local storage value

Disassembly:
push ebx
sub esp, 8
mov eax, dword [esp + 0x10]
mov ebx, dword [eax]
mov eax, dword [0x409040]
test eax, eax
js 0x405700
mov eax, dword [0x409040]
test eax, eax
jne 0x4056dc
mov dword [0x410070], ebx
add esp, 8
pop ebx
ret
mov dword [esp + 4], ebx
mov eax, dword [0x410080]
mov dword [esp], eax
call sub.KERNEL32.dll_TlsSetValue
sub esp, 8
test eax, eax
jne 0x4056d6
add esp, 8
pop ebx
jmp sub.kernel32.dll_GetLastError
call fcn.0040556c
jmp 0x4056c7

Function at 0x4057d8
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov ebx, edx
mov esi, dword [edx]
mov eax, dword [0x409040]
test eax, eax
js 0x405838
mov eax, dword [0x409040]
test eax, eax
jne 0x40580c
mov dword [0x410070], esi
mov eax, dword [ebx]
add eax, 0x20
mov edx, dword [eax + 4]
mov ebp, dword [eax]
mov esp, dword [eax + 8]
jmp edx
mov dword [esp + 4], esi
mov eax, dword [0x410080]
mov dword [esp], eax
call sub.KERNEL32.dll_TlsSetValue
sub esp, 8
test eax, eax
jne 0x4057fc
call sub.kernel32.dll_GetLastError
mov eax, dword [ebx]
add eax, 0x20
mov edx, dword [eax + 4]
mov ebp, dword [eax]
mov esp, dword [eax + 8]
jmp edx
call fcn.0040556c
jmp 0x4057ed

Function at 0x4058d0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov edi, dword [esp + 0x20]
mov ebx, dword [0x409040]
test ebx, ebx
js 0x40594c
mov ecx, dword [0x409040]
test ecx, ecx
jne 0x405904
mov eax, dword [0x410070]
mov dword [edi], eax
mov dword [0x410070], edi
add esp, 0x10
pop ebx
pop esi
pop edi
ret
mov ebx, dword [0x410080]
call sub.kernel32.dll_GetLastError
mov esi, eax
mov dword [esp], ebx
call sub.KERNEL32.dll_TlsGetValue
push edx
mov ebx, eax
mov dword [esp], esi
call sub.KERNEL32.dll_SetLastError
push esi
mov dword [edi], ebx
mov dword [esp + 4], edi
mov eax, dword [0x410080]
mov dword [esp], eax
call sub.KERNEL32.dll_TlsSetValue
sub esp, 8
test eax, eax
jne 0x4058fb
add esp, 0x10
pop ebx
pop esi
pop edi
jmp sub.kernel32.dll_GetLastError
call fcn.0040556c
jmp 0x4058e4
Function at 0x4059ec
Capabilities:
Get thread local storage value

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov edi, dword [esp + 0x40]
mov ebx, dword [0x409040]
test ebx, ebx
js 0x405adc
mov ecx, dword [0x409040]
test ecx, ecx
jne 0x405a79
mov eax, dword [0x410070]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
test eax, eax
je 0x405a6d
lea ebx, [esp + 0x2c]
jmp 0x405a2c
mov dword [esp + 0x2c], eax
mov ecx, dword [eax + 0x18]
test ecx, ecx
je 0x405a63
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], edi
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov dword [esp + 4], 1
mov dword [esp], 1
call ecx
cmp eax, 6
je 0x405aa1
cmp eax, 8
jne 0x405ad0
mov eax, dword [esp + 0x2c]
mov eax, dword [eax]
test eax, eax
jne 0x405a28
mov eax, 5
add esp, 0x30
pop ebx
pop esi
pop edi
ret
mov ebx, dword [0x410080]
call sub.kernel32.dll_GetLastError
mov esi, eax
mov dword [esp], ebx
call sub.KERNEL32.dll_TlsGetValue
push edx
mov ebx, eax
mov dword [esp], esi
call sub.KERNEL32.dll_SetLastError
push esi
mov eax, ebx
jmp 0x405a13
mov dword [edi + 0xc], 0
mov eax, dword [esp + 0x2c]
mov dword [edi + 0x10], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x2c], eax
mov edx, ebx
mov eax, edi
call fcn.00405624
cmp eax, 7
jne 0x405a72
lea eax, [esp + 0x28]
mov edx, ebx
call fcn.004057d8
mov eax, 3
add esp, 0x30
pop ebx
pop esi
pop edi
ret
call fcn.0040556c
jmp 0x405a04

Function at 0x405ae8
Capabilities:
Get thread local storage value

Disassembly:
push edi
push esi
push ebx
sub esp, 0x20
mov edi, dword [esp + 0x30]
mov esi, dword [edi + 0xc]
test esi, esi
je 0x405b5c
mov ebx, dword [0x409040]
test ebx, ebx
js 0x405b6b
mov ecx, dword [0x409040]
test ecx, ecx
jne 0x405b34
mov eax, dword [0x410070]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
lea ebx, [esp + 0x1c]
mov edx, ebx
mov eax, edi
call fcn.00405708
cmp eax, 7
je 0x405b72
call sub.msvcrt.dll_abort
lea esi, [esi]
mov ebx, dword [0x410080]
call sub.kernel32.dll_GetLastError
mov esi, eax
mov dword [esp], ebx
call sub.KERNEL32.dll_TlsGetValue
push edx
mov ebx, eax
mov dword [esp], esi
call sub.KERNEL32.dll_SetLastError
push esi
mov eax, ebx
jmp 0x405b12
mov dword [esp], edi
call fcn.004059ec
add esp, 0x20
pop ebx
pop esi
pop edi
ret
call fcn.0040556c
jmp 0x405b03
lea eax, [esp + 0x18]
mov edx, ebx
call fcn.004057d8
lea esi, [esi]