joyce8/EMBER2024-capa huggingface dataset:
Function at 0x12f98da0
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x130709f5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x49c
push esi
push edi
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0xa5]
mov byte [esp + 0xa4], 0
rep stosd dword es:[edi], eax
mov esi, dword [esp + 0x4b8]
mov dword [esp + 0xc], 0
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [0x131c8c98]
test esi, esi
je 0x12f98e8b
test eax, eax
jne 0x12f98e4a
mov ecx, 0x24
xor eax, eax
lea edi, [esp + 0x14]
mov dword [0x131c8c98], 1
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x20], 2
jne 0x12f98e3e
cmp dword [esp + 0x14], 5
jb 0x12f98e3e
mov ecx, dword [0x13181b08]
mov dword [0x131c8c9c], ecx
jmp 0x12f98e4a
mov edx, dword [0x13181b0c]
mov dword [0x131c8c9c], edx
mov eax, dword [esp + 0x4bc]
test eax, eax
mov eax, dword [0x13181b0c]
jne 0x12f98e5f
mov eax, dword [0x131c8c9c]
mov ecx, dword [esp + 0x4c4]
mov edx, dword [esp + 0x4c0]
push ecx
push edx
push esi
push eax
lea eax, [esp + 0xb4]
push 0x13181b3c
push eax
call fcn.12f5ce9d
add esp, 0x18
jmp 0x12f98f1a
test eax, eax
jne 0x12f98edf
mov ecx, 0x24
xor eax, eax
lea edi, [esp + 0x14]
mov dword [0x131c8c98], 1
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0x94
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x20], 2
jne 0x12f98ed5
cmp dword [esp + 0x14], 5
jb 0x12f98ed5
mov edx, dword [0x13181b08]
mov dword [0x131c8c9c], edx
jmp 0x12f98edf
mov eax, dword [0x13181b0c]
mov dword [0x131c8c9c], eax
mov eax, dword [esp + 0x4bc]
test eax, eax
mov eax, dword [0x13181b0c]
jne 0x12f98ef4
mov eax, dword [0x131c8c9c]
mov ecx, dword [esp + 0x4c4]
mov edx, dword [esp + 0x4c0]
push ecx
push edx
push eax
lea eax, [esp + 0xb0]
push 0x13181b2c
push eax
call fcn.12f5ce9d
add esp, 0x14
lea ecx, [esp + 0xa4]
push ecx
lea ecx, [esp + 0xc]
call fcn.12f41570
mov esi, dword [esp + 0x4b4]
lea edx, [esp + 8]
push edx
mov ecx, esi
mov dword [esp + 0x4b0], 1
call fcn.12f41470
mov dword [esp + 0xc], 1
lea ecx, [esp + 8]
mov byte [esp + 0x4ac], 0
call fcn.12f41ea0
mov ecx, dword [esp + 0x4a4]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x4a8
ret
Function at 0x12f9b6c0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 8
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0xc], 0xffffffff
je 0x12f9b748
mov eax, dword [esi + 0x14]
xor ebx, ebx
cmp eax, ebx
je 0x12f9b722
mov ecx, dword [esi + 0x18]
xor eax, eax
mov dword [esp + 9], eax
push edi
mov edi, dword [sym.imp.WS2_32.dll_htonl]
mov word [esp + 0x11], ax
push ecx
mov byte [esp + 0x10], bl
mov byte [esp + 0x17], al
call edi
push ebx
mov dword [esp + 0x10], eax
call edi
lea edx, [esp + 0xc]
push 8
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0xc]
push edx
push 0xd
push ebx
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
pop edi
jge 0x12f9b722
pop esi
xor eax, eax
pop ebx
add esp, 8
ret
mov ecx, dword [esi + 0xc]
push 1
push ecx
call dword [sym.imp.WS2_32.dll_shutdown]
mov edx, dword [esi + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0xc], 0xffffffff
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
pop esi
mov eax, 1
pop ebx
add esp, 8
ret

Function at 0x12f9be10
Capabilities:
Check os version
Get system information on windows

Disassembly:
mov eax, dword [0x131c8e40]
sub esp, 0x114
test eax, eax
jne 0x12f9bf5d
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
push 0x131c8cd8
mov dword [0x131c8e40], 1
mov dword [0x131c8cd8], 0x94
call esi
mov edx, dword [0x131c8ce8]
xor eax, eax
cmp edx, 2
sete al
test eax, eax
mov dword [0x13181b68], eax
je 0x12f9bf38
push ebx
push 0x131c8d70
mov dword [0x131c8d70], 0x9c
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.kernel32.dll
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push 0x13136f68
push esi
call edi
push 0x13136f58
push esi
mov dword [0x131c8e34], eax
call edi
mov dword [0x131c8e38], eax
mov eax, dword [0x131c8e34]
test eax, eax
push 0x131c8e10
je 0x12f9beb4
call eax
jmp 0x12f9beba
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [0x131c8d74]
cmp eax, 6
jae 0x12f9bed2
cmp eax, 5
jne 0x12f9bee6
cmp dword [0x131c8d78], 2
jb 0x12f9bee6
cmp word [0x131c8e10], 9
jne 0x12f9bee6
mov dword [0x131c8ccc], 1
push 0x13182440
call ebx
test eax, eax
pop ebx
je 0x12f9bf04
push 0x13182430
push eax
call edi
mov edx, eax
mov dword [0x131c8e3c], edx
jmp 0x12f9bf0a
mov edx, dword [0x131c8e3c]
test edx, edx
je 0x12f9bf38
mov ecx, 0x44
xor eax, eax
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
mov dword [esp + 8], 0x114
push eax
call edx
test eax, eax
jne 0x12f9bf38
mov ecx, dword [esp + 0x14]
mov dword [0x131c8ce4], ecx
push 0x131c8ce0
push 0x131c8cdc
call fcn.12f9c300
add esp, 8
call fcn.12f9bf70
pop edi
mov eax, 1
pop esi
add esp, 0x114
ret
mov eax, 1
add esp, 0x114
ret
Function at 0x12f9da30
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x13070f78
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
lea ecx, [esp + 0x18]
call fcn.12f4cba0
mov eax, dword [esp + 0x38]
lea ecx, [esp]
push eax
mov dword [esp + 0x34], 0
call fcn.12f46a80
mov ecx, dword [esp]
mov byte [esp + 0x30], 1
mov eax, dword [ecx - 8]
test eax, eax
je 0x12f9db78
lea edx, [esp + 4]
lea eax, [esp + 0x38]
push edx
push 0x130c9048
push eax
lea ecx, [esp + 0xc]
mov dword [esp + 0x10], 0
call fcn.12f4ba20
lea ecx, [esp + 0x38]
mov byte [esp + 0x30], 2
call fcn.12f4ac90
lea ecx, [esp + 0x38]
call fcn.12f4afb0
mov ecx, dword [esp + 0x38]
push 0x131911a8
push ecx
call fcn.12f5cf5e
add esp, 8
test eax, eax
je 0x12f9db6a
push esi
mov eax, dword [esp + 0x20]
xor esi, esi
test eax, eax
jle 0x12f9daf9
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + esi*4]
push eax
mov eax, dword [esp + 0x40]
push eax
call fcn.12f606f9
add esp, 8
test eax, eax
je 0x12f9db08
mov eax, dword [esp + 0x20]
inc esi
cmp esi, eax
jl 0x12f9dad7
lea ecx, [esp + 0x3c]
push ecx
push eax
lea ecx, [esp + 0x24]
call fcn.12f4d1b0
lea edx, [esp + 8]
lea eax, [esp + 0xc]
push edx
push 0x130c9048
push eax
lea ecx, [esp + 0x10]
call fcn.12f4ba20
push eax
lea ecx, [esp + 0x40]
mov byte [esp + 0x38], 3
call fcn.12f473b0
lea ecx, [esp + 0xc]
mov byte [esp + 0x34], 2
call fcn.12f47220
lea ecx, [esp + 0x3c]
call fcn.12f4ac90
lea ecx, [esp + 0x3c]
call fcn.12f4afb0
mov ecx, dword [esp + 0x3c]
push 0x131911a8
push ecx
call fcn.12f5cf5e
add esp, 8
test eax, eax
jne 0x12f9dacd
pop esi
lea ecx, [esp + 0x38]
mov byte [esp + 0x30], 1
call fcn.12f47220
push 1
push 0x131c8e70
lea ecx, [esp + 0x14]
call fcn.12f560a0
push 0xffffffffffffffff
push 0
mov ecx, 0x131c8e58
mov byte [esp + 0x38], 4
call fcn.12f4cc10
lea edx, [esp + 0x18]
mov ecx, 0x131c8e58
push edx
call fcn.12f4cf30
lea ecx, [esp + 0xc]
mov byte [esp + 0x30], 1
call fcn.12f56100
lea ecx, [esp]
mov byte [esp + 0x30], 0
call fcn.12f47220
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], 0xffffffff
call fcn.12f4cbb0
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
add esp, 0x34
ret
Function at 0x12f9fac0
Capabilities:
Get file size

Disassembly:
sub esp, 0x40
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebp, ebp
mov dword [0x131c8e90], ebp
call edi
mov ebx, dword [esp + 0x54]
mov dword [0x131c8e98], eax
cmp ebx, 0xffffffff
je 0x12f9fcb9
mov esi, dword [esp + 0x58]
cmp esi, 0xffffffff
je 0x12f9fcb9
lea eax, [esp + 0x10]
mov dword [esp + 0x20], ebp
push eax
push ebx
mov dword [esp + 0x18], ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x10]
mov edi, eax
push ecx
push edi
push esi
call fcn.12fee810
add esp, 0xc
test eax, eax
je 0x12f9fc8e
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebp
push ebp
push ebp
push ebx
call esi
mov edx, dword [esp + 0x58]
push ebp
push ebp
push ebp
push edx
call esi
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], ebp
cmp eax, ebp
mov dword [esp + 0x18], ebp
jne 0x12f9fb51
cmp edi, ebp
je 0x12f9fc39
cmp eax, ebp
mov ebx, 0x1000
jne 0x12f9fb60
cmp edi, ebx
jae 0x12f9fb60
mov ebx, edi
push ebx
call fcn.12f5bf8b
add esp, 4
mov esi, eax
mov ecx, ebx
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebp
and ecx, 3
push ebp
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x5c]
lea eax, [esp + 0x24]
push eax
push ebx
push esi
push ecx
mov dword [esp + 0x34], ebp
call fcn.12fecef0
add esp, 0x18
test eax, eax
je 0x12f9fbd6
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jae 0x12f9fbb1
cmp eax, ebp
mov dword [esp + 0x14], 1
je 0x12f9fc13
lea edx, [esp + 0x24]
push ebp
push edx
push eax
mov eax, dword [esp + 0x64]
push esi
push eax
mov dword [esp + 0x38], ebp
call fcn.12fecff0
add esp, 0x14
test eax, eax
je 0x12f9fbec
cmp dword [esp + 0x14], ebp
je 0x12f9fb6b
jmp 0x12f9fc13
mov dword [0x131c8e90], 0xd
mov dword [0x131c8e94], 0x54c
jmp 0x12f9fc00
mov dword [0x131c8e90], 0xe
mov dword [0x131c8e94], 0x55b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8e98], eax
mov dword [esp + 0x18], 1
mov ecx, dword [esp + 0x58]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call fcn.12f5bf80
mov eax, dword [esp + 0x18]
add esp, 4
cmp eax, ebp
je 0x12f9fc82
cmp dword [esp + 0x18], ebp
jne 0x12f9fc82
mov ebx, dword [esp + 0x54]
mov al, byte [esp + 0x5c]
mov dword [esp + 0x20], 1
test al, 2
je 0x12f9fc82
lea edx, [esp + 0x28]
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x2c]
push 0x28
mov dword [esp + 0x2c], ebp
push edx
push ebx
rep stosd dword es:[edi], eax
call fcn.12feca70
add esp, 0xc
test eax, eax
je 0x12f9fc82
mov ecx, dword [esp + 0x58]
lea eax, [esp + 0x28]
push 0x28
push eax
push ecx
call fcn.12fecab0
add esp, 0xc
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
mov dword [0x131c8e90], 0x25
mov dword [0x131c8e94], 0x52d
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x131c8e98], eax
mov eax, dword [esp + 0x18]
pop ebp
pop ebx
add esp, 0x40
ret
mov dword [0x131c8e90], 1
mov dword [0x131c8e94], 0x51d
call edi
pop edi
pop esi
mov dword [0x131c8e98], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
Function at 0x12fa0ea0
Capabilities:
Get file size

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
push 0
lea eax, [esp + 8]
push 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push esi
push 1
mov dword [esp + 0x30], 0
call fcn.12fa19c0
add esp, 0x2c
test eax, eax
je 0x12fa0f88
mov eax, dword [esp + 4]
cmp eax, 4
jne 0x12fa0f14
mov ecx, dword [esp + 0x10]
push ecx
push esi
call fcn.12fcc580
mov edx, dword [0x131c96c0]
mov ecx, dword [0x131c96c4]
add esp, 8
mov dword [0x131c8e90], edx
mov edx, dword [0x131c96c8]
mov dword [0x131c8e94], ecx
mov dword [0x131c8e98], edx
pop esi
pop ecx
ret
cmp eax, 3
jne 0x12fa0f4e
mov eax, dword [esp + 0x10]
push eax
push esi
call fcn.12fb2860
mov ecx, dword [0x131c8f38]
mov edx, dword [0x131c8f3c]
add esp, 8
mov dword [0x131c8e90], ecx
mov ecx, dword [0x131c8f40]
mov dword [0x131c8e94], edx
mov dword [0x131c8e98], ecx
pop esi
pop ecx
ret
mov edx, dword [esp + 0x10]
cmp eax, 6
push edx
push esi
jne 0x12fa0f8e
call fcn.12fe8a30
mov ecx, dword [0x131c9cd0]
mov edx, dword [0x131c9cd4]
add esp, 8
mov dword [0x131c8e90], ecx
mov ecx, dword [0x131c9cd8]
mov dword [0x131c8e94], edx
mov dword [0x131c8e98], ecx
pop esi
pop ecx
ret
mov eax, dword [esp + 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
pop esi
pop ecx
ret

Function at 0x12fa1410
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
mov eax, dword [0x131c8f44]
push ebx
mov ebx, dword [esp + 0x10]
push esi
test eax, eax
push edi
jne 0x12fa1432
mov eax, dword [0x131c96cc]
test eax, eax
jne 0x12fa1432
mov eax, dword [0x131c9cdc]
test eax, eax
je 0x12fa1436
test ebx, ebx
je 0x12fa1470
mov eax, dword [0x13182788]
or esi, 0xffffffff
cmp eax, esi
jne 0x12fa1470
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, esi
mov dword [0x13182788], eax
je 0x12fa1470
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x12fa1470
mov eax, dword [0x13182788]
push eax
call dword [sym.imp.KERNEL32.dll_TlsFree]
mov dword [0x13182788], esi
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
push ebx
push esi
push edi
call fcn.12fb3260
add esp, 0xc
test eax, eax
je 0x12fa14b3
mov ecx, dword [esp + 0x1c]
push ecx
push ebx
push esi
push edi
call fcn.12fcfb00
add esp, 0x10
test eax, eax
je 0x12fa14b3
push ebx
push esi
push edi
call fcn.12fdee30
add esp, 0xc
test eax, eax
je 0x12fa14b3
pop edi
pop esi
mov eax, 1
pop ebx
ret
pop edi
pop esi
xor eax, eax
pop ebx
ret
Function at 0x12fa3400
Capabilities:
Get file size

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
push 0
lea eax, [esp + 8]
push 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push esi
push 0
mov dword [esp + 0x30], 0
call fcn.12fa19c0
add esp, 0x2c
test eax, eax
je 0x12fa34e8
mov eax, dword [esp + 4]
cmp eax, 4
jne 0x12fa3474
mov ecx, dword [esp + 0x10]
push ecx
push esi
call fcn.12fd40a0
mov edx, dword [0x131c96c0]
mov ecx, dword [0x131c96c4]
add esp, 8
mov dword [0x131c8e90], edx
mov edx, dword [0x131c96c8]
mov dword [0x131c8e94], ecx
mov dword [0x131c8e98], edx
pop esi
pop ecx
ret
cmp eax, 3
jne 0x12fa34ae
mov eax, dword [esp + 0x10]
push eax
push esi
call fcn.12fb9a30
mov ecx, dword [0x131c8f38]
mov edx, dword [0x131c8f3c]
add esp, 8
mov dword [0x131c8e90], ecx
mov ecx, dword [0x131c8f40]
mov dword [0x131c8e94], edx
mov dword [0x131c8e98], ecx
pop esi
pop ecx
ret
mov edx, dword [esp + 0x10]
cmp eax, 6
push edx
push esi
jne 0x12fa34ee
call fcn.12fe4fe0
mov ecx, dword [0x131c9cd0]
mov edx, dword [0x131c9cd4]
add esp, 8
mov dword [0x131c8e90], ecx
mov ecx, dword [0x131c9cd8]
mov dword [0x131c8e94], edx
mov dword [0x131c8e98], ecx
pop esi
pop ecx
ret
mov eax, dword [esp + 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
pop esi
pop ecx
ret
Function at 0x12fa6450
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebp
push esi
mov esi, dword [esp + 0x1c]
xor ebp, ebp
cmp esi, ebp
je 0x12fa65bb
cmp esi, 0xffffffff
je 0x12fa65bb
cmp dword [0x131c8ea0], ebp
je 0x12fa65bb
mov ecx, dword [0x131c8ea8]
cmp ecx, ebp
je 0x12fa65bb
mov eax, dword [0x131c8ea4]
cmp eax, ebp
jge 0x12fa6499
neg eax
cmp ecx, eax
ja 0x12fa65bb
push edi
push ecx
mov dword [esp + 0x14], ebp
call fcn.12f5bf8b
mov edi, eax
add esp, 4
cmp edi, ebp
mov dword [esp + 0x20], edi
je 0x12fa65b0
mov ecx, dword [0x131c8ea8]
xor eax, eax
mov edx, ecx
push ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 1
and ecx, 3
mov dword [esp + 0x14], ebp
rep stosb byte es:[edi], al
mov ebx, dword [0x131c8ea8]
mov edi, dword [0x131c8ea4]
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], ebp
push eax
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call ebp
xor ecx, ecx
mov dword [esp + 0x1c], eax
test edi, edi
setl cl
dec ecx
and ecx, 0xfffffffe
add ecx, 2
push ecx
push 0
push edi
push esi
call ebp
cmp eax, 0xffffffff
je 0x12fa65a2
mov eax, dword [esp + 0x28]
push 0
test eax, eax
je 0x12fa6535
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x14]
push 0
push edx
push ebx
push eax
push esi
call fcn.12fecef0
add esp, 0x18
jmp 0x12fa6547
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x14]
push ecx
push ebx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x1c]
mov edi, eax
lea eax, [esp + 0x18]
push 0
push eax
push ecx
push esi
call ebp
test edi, edi
je 0x12fa65a2
mov ebx, dword [0x131c8e4c]
xor edx, edx
test ebx, ebx
jle 0x12fa65a2
mov ebp, dword [0x131c8e48]
mov eax, dword [ebp]
mov esi, dword [esp + 0x10]
mov ecx, dword [eax + 4]
cmp esi, ecx
jb 0x12fa6588
mov edi, dword [eax]
mov esi, dword [esp + 0x24]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x12fa659a
inc edx
add ebp, 4
cmp edx, ebx
mov dword [esp + 0x14], 0
jge 0x12fa65a2
jmp 0x12fa656e
mov dword [esp + 0x14], 1
mov ecx, dword [esp + 0x24]
push ecx
call fcn.12f5bf80
add esp, 4
pop ebx
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
add esp, 0x10
ret
pop esi
xor eax, eax
pop ebp
add esp, 0x10
ret
Function at 0x12fb07f0
Capabilities:
Get file size

Disassembly:
sub esp, 0x4c
push ebx
push ebp
push esi
push edi
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x64]
push 0x40
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x20]
push eax
push ecx
call fcn.12faed50
push eax
call fcn.12ff0660
mov ebp, eax
add esp, 0x10
test ebp, ebp
jne 0x12fb0855
mov dword [0x131c8f38], 0xc
mov dword [0x131c8f3c], 0x14b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x4c
ret
mov ebx, dword [esp + 0x6c]
mov eax, dword [ebx + 0x70]
mov edi, dword [ebx + 0x6c]
add eax, edi
lea edx, [eax + eax*4]
mov eax, dword [ebx + 0x74]
lea ecx, [eax + edx*2]
mov edx, dword [ebp]
lea eax, [ecx + ecx + 0x7a]
mov ecx, ebp
push eax
mov dword [esp + 0x68], eax
call dword [edx + 8]
mov edi, eax
push edi
mov dword [esp + 0x14], edi
call fcn.12f5bf8b
mov esi, eax
add esp, 4
test esi, esi
jne 0x12fb08b9
mov dword [0x131c8f38], 0x21
mov dword [0x131c8f3c], 0x14bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x4c
ret
mov ecx, edi
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x10]
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x6c]
lea edi, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x68]
push ecx
push esi
push eax
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [ebp]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ebx
push ecx
lea ecx, [esp + 0x34]
push ecx
mov ecx, ebp
call dword [edx + 0x10]
test eax, eax
je 0x12fb09a3
mov edi, dword [esp + 0x68]
mov ebp, dword [esp + 0x60]
mov ebx, dword [edi + 0x378]
mov eax, dword [edi + 0x37c]
test ebx, ebx
mov dword [esp + 0x64], eax
jne 0x12fb093a
test eax, eax
jne 0x12fb093a
lea edx, [esp + 0x64]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
lea eax, [esp + 0x64]
push 0
push eax
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x6c]
lea ecx, [esp + 0x18]
push 0
push ecx
push edx
push esi
push ebp
mov dword [esp + 0x2c], 0
call fcn.12fecff0
add esp, 0x14
test eax, eax
je 0x12fb09b9
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x6c]
push edx
push esi
mov dword [edi + 0x378], ebx
mov dword [edi + 0x37c], eax
mov dword [edi + 0x380], ecx
call fcn.12fedaf0
add esp, 8
mov dword [edi + 0x384], eax
mov dword [esp + 0x14], 1
jmp 0x12fb09d8
mov dword [0x131c8f38], 0x11
mov dword [0x131c8f3c], 0x14cb
jmp 0x12fb09cd
mov dword [0x131c8f38], 0xe
mov dword [0x131c8f3c], 0x14da
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
push esi
call fcn.12f5bf80
mov eax, dword [esp + 0x18]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
Function at 0x12fb2860
Capabilities:
Get file size

Disassembly:
sub esp, 0x388
push esi
push edi
mov dword [0x131c8f38], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov ecx, 0xe1
xor eax, eax
lea edi, [esp + 9]
mov byte [esp + 8], 0
mov esi, dword [esp + 0x394]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 8]
push eax
push esi
call fcn.12faefe0
add esp, 8
test eax, eax
jne 0x12fb28c3
mov ecx, dword [esp + 0x398]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
pop edi
pop esi
add esp, 0x388
ret
mov eax, dword [esp + 0x398]
test eax, eax
je 0x12fb28d4
mov edx, dword [esp + 0x24]
mov dword [eax], edx
mov eax, dword [esp + 0x20]
pop edi
pop esi
add esp, 0x388
ret
Function at 0x12fb3860
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x3ec
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
push esi
xor ebp, ebp
push edi
mov dword [0x131c8f38], ebp
call ebx
mov dword [0x131c8f40], eax
mov ecx, 0xf7
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
mov esi, dword [esp + 0x41c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp esi, ebp
stosb byte es:[edi], al
je 0x12fb399c
mov ecx, 0xf8
lea edi, [esp + 0x1c]
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.12fba750
mov esi, dword [esp + 0x408]
mov ebx, dword [esp + 0x414]
mov ebp, dword [esp + 0x410]
mov edi, dword [esp + 0x40c]
add esp, 4
mov dword [esp + 0x10], eax
test esi, esi
jne 0x12fb3905
test edi, edi
jne 0x12fb3905
test ebp, ebp
jne 0x12fb3905
test ebx, ebx
jne 0x12fb3905
mov ecx, dword [esp + 0x414]
test ecx, ecx
jne 0x12fb3905
mov ecx, dword [esp + 0x418]
test ecx, ecx
je 0x12fb3991
cmp eax, 3
jne 0x12fb3991
mov ecx, dword [esp + 0x4c]
lea edx, [esp + 0x1c]
push ecx
push 0x30
push edx
call fcn.12fedaa0
add esp, 0xc
test eax, eax
je 0x12fb398d
mov eax, dword [esp + 0x40]
test esi, esi
je 0x12fb3935
mov ecx, eax
and ecx, 1
mov dword [esi], ecx
test edi, edi
je 0x12fb3940
mov edx, eax
and edx, 2
mov dword [edi], edx
test ebp, ebp
je 0x12fb394c
mov ecx, eax
and ecx, 4
mov dword [ebp], ecx
test ebx, ebx
je 0x12fb396b
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov dword [ebx], edx
mov edx, dword [esp + 0x34]
mov dword [ebx + 4], ecx
mov ecx, dword [esp + 0x38]
mov dword [ebx + 8], edx
mov dword [ebx + 0xc], ecx
mov ecx, dword [esp + 0x414]
test ecx, ecx
je 0x12fb397d
mov edx, eax
and edx, 8
mov dword [ecx], edx
mov ecx, dword [esp + 0x418]
test ecx, ecx
je 0x12fb398d
and eax, 0x10
mov dword [ecx], eax
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3ec
ret
mov esi, dword [esp + 0x400]
lea eax, [esp + 0x10]
push 1
push eax
mov dword [esp + 0x18], ebp
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call ebp
push 0
push 0
push 0
push esi
mov dword [esp + 0x28], eax
call ebp
cmp esi, 0xffffffff
je 0x12fb3a2d
lea ecx, [esp + 0x1c]
test ecx, ecx
je 0x12fb3a2d
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x12fb3a48
mov ecx, 0xd
xor eax, eax
lea edi, [esp + 0x1c]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
xor edi, edi
lea eax, [esp + 0x1c]
push edi
push edx
push 0x34
push eax
push esi
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x12fb3a26
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x29f7
call ebx
mov dword [0x131c8f40], eax
jmp 0x12fb3a4a
mov edi, 1
jmp 0x12fb3a4a
mov dword [0x131c8f38], 1
mov dword [0x131c8f3c], 0x29ea
call ebx
mov dword [0x131c8f40], eax
xor edi, edi
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push 0
push ecx
push edx
push esi
call ebp
test edi, edi
jne 0x12fb38ae
mov dword [0x131c8f38], 0xf
mov dword [0x131c8f3c], 0x1b63
call ebx
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x3ec
ret