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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00401db6
mov eax, dword [0x692228]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00405eb1
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x492740
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x49289c
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00406014
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x695ea0]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00403279
mov ecx, dword [esi*4 + 0x695ea0]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x492895
cmp eax, dword [edi + ecx + 0x24]
jne 0x492895
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x492895
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00403279
add esp, 0x14
test edx, edx
jl 0x492895
jg 0x49280b
test eax, eax
jb 0x492895
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x492895
jl 0x492825
cmp dword [ebp - 0x1008], eax
ja 0x492895
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x492843
test ebx, ebx
je 0x49287c
cmp ecx, edi
jae 0x49287c
mov al, byte [ecx]
cmp al, 0xd
jne 0x49285d
lea eax, [edi - 1]
cmp ecx, eax
jae 0x492869
cmp byte [ecx + 1], 0xa
jne 0x492869
inc ecx
jmp 0x492869
movzx eax, al
movsx eax, byte [eax + 0x692d98]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x492843
cmp edx, ebx
jne 0x492843
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x49289a
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040306c
leave
ret
Function at 0x498fd1
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x692228]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x49901c
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.00499493
test al, al
jne 0x499016
sub edx, 2
cmp edx, edi
jne 0x498ffc
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x49903e
lea eax, [edi + 2]
cmp edx, eax
je 0x49903e
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.00498bca
add esp, 0x10
jmp 0x499138
push esi
lea ecx, [ebp - 0x255]
call fcn.00499493
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x499081
push dword [ebp - 0x25c]
jmp 0x49902e
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x4990be
cmp word [ebp - 0x226], 0
je 0x4990df
cmp word [ebp - 0x226], ax
jne 0x4990be
cmp word [ebp - 0x224], 0
je 0x4990df
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.00498bca
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x49912b
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x499098
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x499113
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x499138
push 0x4985b2
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.0040556a
add esp, 0x10
jmp 0x499108
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040306c
leave
ret
Function at 0x4a11fc
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x695ea0]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4a123c
cmp byte [ebx], 0xa
jne 0x4a123c
or byte [eax + edi + 0x28], 4
jmp 0x4a1241
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4a133f
mov al, byte [edx]
cmp al, 0x1a
je 0x4a1321
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x4a1270
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4a1295
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4a129f
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x4a1252
jmp 0x4a133f
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4a131c
cmp dword [ebp - 0xc], 0
je 0x4a131c
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x695ea0]
test byte [eax + edi + 0x28], 0x48
je 0x4a12f6
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4a12e1
mov byte [esi], dl
jmp 0x4a12f2
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x695ea0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4a133f
cmp byte [ebp - 1], 0xa
jne 0x4a1305
cmp esi, ebx
jne 0x4a1305
mov byte [esi], 0xa
jmp 0x4a133e
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040194c
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4a133f
mov byte [esi], 0xd
jmp 0x4a133e
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x695ea0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a133b
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a133f
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4a139b
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x695ea0]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4a13de
cmp word [esi], dx
jne 0x4a13de
or byte [edi + eax + 0x28], 4
jmp 0x4a13e3
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x4a1536
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x4a1516
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4a1425
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4a145b
cmp eax, edx
jae 0x4a1467
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x4a13fd
jmp 0x4a1536
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4a1512
cmp dword [ebp - 0x14], 0
je 0x4a1512
mov eax, dword [ebx*4 + 0x695ea0]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4a14ea
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x4a14b3
mov word [esi], cx
jmp 0x4a14e6
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x695ea0]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x695ea0]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x695ea0]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4a1536
pop ebx
cmp word [ebp - 4], bx
jne 0x4a14fb
cmp esi, dword [ebp + 0xc]
jne 0x4a14fb
mov word [esi], bx
jmp 0x4a1533
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0040194c
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4a1536
push 0xd
jmp 0x4a152f
mov ecx, dword [ebx*4 + 0x695ea0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a152d
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a1536
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
nop
nop
push 4
nop
nop
nop
nop
pop edi
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x430072
nop
nop
nop
mov ebx, 0x408ecc
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
pop eax
nop
nop
nop
nop
nop
mov esi, 0x28a84f51
xor dword [eax], esi
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
loop 0x430060
nop
nop
mov eax, section..data
nop
cmp eax, 0
nop
nop
nop
je 0x4300d2
nop
nop
nop
mov ebx, 0x42e1d0
nop
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
pop eax
nop
nop
nop
nop
mov esi, 0x1a1e608b
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
nop
nop
add eax, edi
nop
loop 0x4300c0
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x401219
Function at 0x407010
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 0x40704e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x407046
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x407050
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x407036
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x407120
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 0x407151
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x407151
mov ecx, 0x10b
cmp word [eax + 0x18], cx
jne 0x407151
mov eax, 1
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x431000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43100c
nop
nop
nop
nop
pop eax
nop
add eax, 0x403e6a
nop
sub eax, 0x403e10
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
nop
mov edx, dword [eax + 8]
xor dword [ebx], edx
nop
nop
nop
nop
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
jl 0x431030
nop
nop
add eax, 0xc
nop
cmp dword [eax], 0
nop
nop
nop
nop
jne 0x43101e
nop
nop
nop
nop
popal
nop
nop
nop
nop
jmp loc.00401219
Function at 0x405b10
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x60
mov esi, esp
mov dword [esi + 0x48], ebp
mov dword [esi + 0x4c], esp
mov dword [esi + 0x58], 0xffffffff
mov dword [esi + 0x54], 0x405c80
lea ebx, [esi + 8]
lea eax, [esi + 0x50]
mov edi, esi
lea edx, [esi + 0x28]
mov ecx, dword fs:[0]
mov dword [esi + 0x50], ecx
lea ecx, [esi + 0x20]
mov dword fs:[0], eax
mov dword [esi + 0x20], edi
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 2
mov dword [esi + 0x30], 2
mov dword [esi + 0x38], 0x20
mov dword [esi + 0x3c], 0
mov dword [esi + 0x40], 0
mov dword [esi + 8], 0x42d6a8
mov dword [esi + 0xc], 2
mov dword [esi + 0x18], edx
mov dword [esi + 0x1c], 1
mov dword [esi + 4], 0x40590000
mov dword [esi], 0
mov dword [esi + 0x24], 0x4297e0
mov byte [esi + 0x44], 3
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], 1
push ebx
call fcn.0040d4d0
add esp, 4
call fcn.0040ca90
mov dword [esi], eax
push edi
push ebx
call fcn.0040cab0
add esp, 8
cmp byte [esi + 8], 4
jne 0x405be8
mov eax, dword [esi + 0x50]
mov dword fs:[0], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
movsd xmm0, qword [esi + 8]
mov dword [esi + 0x58], 0
movsd qword [esi + 0x28], xmm0
push 0x42d6c4
push 0x42d60c
lea eax, [esi + 0x28]
push eax
push 0x2b
push 0x42d5e0
call fcn.0042cb00
add esp, 0x14
ud2
Function at 0x40b170
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x43c
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x41a340
mov esi, 0x200
lea eax, [ebp - 0x18]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 2
mov dword [ebp - 0x2c], 0
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov dword [ebp - 0x38], 2
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
cmp esi, 0x201
jae 0x40b200
jmp 0x40b1ee
jbe 0x40b294
cmp esi, 0x201
jae 0x40b200
mov dword [ebp - 0x28], 0x200
lea ebx, [ebp - 0x448]
mov edi, esi
jmp 0x40b23b
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x2c]
sub esi, edi
sub eax, edi
cmp eax, esi
jae 0x40b22c
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x38]
mov edx, edi
push esi
call fcn.0042bba0
add esp, 4
mov eax, dword [ebp - 0x38]
mov edi, dword [ebp - 0x34]
mov dword [ebp - 0x24], eax
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x20], edi
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, eax
test eax, eax
jne 0x40b25f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40b2f7
cmp esi, edi
jne 0x40b1e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40b313
lea esi, [edi + edi]
test edi, edi
mov eax, 0xffffffff
cmovs esi, eax
cmp esi, 0x201
jb 0x40b1ee
jmp 0x40b200
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x10], 0
cmp esi, eax
ja 0x40b330
lea eax, [ebp - 0x48]
push esi
push ebx
push eax
call fcn.0040e830
add esp, 0xc
movsd xmm0, qword [ebp - 0x48]
mov esi, dword [ebp + 8]
movsd xmm1, qword [ebp - 0x40]
movsd qword [esi + 8], xmm1
movsd qword [esi], xmm0
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40b2e1
add eax, eax
push 2
push eax
push dword [ebp - 0x24]
call fcn.004080a0
add esp, 0xc
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, esi
add esp, 0x43c
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp + 8]
mov byte [esi], 0
mov dword [esi + 4], eax
mov byte [esi + 0xc], 2
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x40b2d1
jmp 0x40b2e1
mov dword [ebp - 0x10], 0
push 0x42fcec
push 0x28
push str.internal_error:_entered_unreachable_code_rustc_5680fa18feaa87f3ff04063800aec256c3d4b4belibrary_alloc_src_vecmod.rs
call fcn.0042c800
add esp, 0xc
jmp 0x40b33f
push 0x42fcdc
push eax
push esi
call fcn.0042cbf0
add esp, 0xc
ud2
Function at 0x416300
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x40
mov esi, ecx
mov ecx, dword [ebp + 0xc]
cmp dword [ebp + 0x10], 0
mov edi, edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x103
je 0x416344
mov eax, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x18]
lea edx, [esp + 0x20]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], eax
xor eax, eax
mov ebx, 1
jmp 0x41634a
xor ebx, ebx
xor eax, eax
xor edx, edx
mov dword [esp + 0x1c], eax
lea eax, [esp + 8]
mov dword [esp + 0x18], ebx
push 0
push edx
push ecx
push dword [ebp + 8]
push eax
push 0
push 0
push 0
push edi
call dword [sym.imp.ntdll.dll_NtReadFile]
cmp eax, 0x103
jne 0x41637f
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 8]
cmp eax, 0xc0000011
jne 0x41638f
mov dword [esi + 4], 0
jmp 0x4163a1
cmp eax, 0x103
je 0x4163bb
test eax, eax
js 0x4163ac
mov eax, dword [esp + 0xc]
mov dword [esi + 4], eax
mov byte [esi], 4
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov byte [esi], 0
mov dword [esi + 4], eax
jmp 0x4163a4
lea eax, [esp + 4]
mov dword [esp + 0x18], 0x42f750
mov dword [esp + 0x1c], 1
mov dword [esp + 0x28], 0
mov dword [esp + 0x10], 0
mov byte [esp + 0x14], 0
lea ecx, [esp + 0x10]
lea edx, [esp + 0x34]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x18]
mov dword [esp + 0x24], 0
push eax
push ecx
push edx
call fcn.0040e300
add esp, 0xc
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
call fcn.00409030
mov ecx, 7
int 0x29
ud2
Function at 0x416420
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x40
mov esi, ecx
mov ecx, dword [ebp + 0xc]
cmp dword [ebp + 0x10], 0
mov edi, edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x103
je 0x416464
mov eax, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x18]
lea edx, [esp + 0x20]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], eax
xor eax, eax
mov ebx, 1
jmp 0x41646a
xor ebx, ebx
xor eax, eax
xor edx, edx
mov dword [esp + 0x1c], eax
lea eax, [esp + 8]
mov dword [esp + 0x18], ebx
push 0
push edx
push ecx
push dword [ebp + 8]
push eax
push 0
push 0
push 0
push edi
call dword [sym.imp.ntdll.dll_NtWriteFile]
cmp eax, 0x103
jne 0x4164a6
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 8]
cmp eax, 0x103
je 0x4164cb
test eax, eax
js 0x4164b5
mov eax, dword [esp + 0xc]
mov dword [esi + 4], eax
mov al, 4
jmp 0x4164c1
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov dword [esi + 4], eax
xor eax, eax
mov byte [esi], al
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [esp + 4]
mov dword [esp + 0x18], 0x42f750
mov dword [esp + 0x1c], 1
mov dword [esp + 0x28], 0
mov dword [esp + 0x10], 0
mov byte [esp + 0x14], 0
lea ecx, [esp + 0x10]
lea edx, [esp + 0x34]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x18]
mov dword [esp + 0x24], 0
push eax
push ecx
push edx
call fcn.0040e300
add esp, 0xc
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
call fcn.00409030
mov ecx, 7
int 0x29
ud2
Function at 0x4180f0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x14
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x41a6f0
lea ecx, [ebp - 0x18]
mov edx, dword fs:[0]
cmp eax, 3
mov dword [ebp - 0x18], edx
mov dword fs:[0], ecx
je 0x41812e
test eax, eax
jne 0x4182aa
mov ebx, dword [0x43618c]
test ebx, ebx
je 0x4182aa
mov dword [ebp - 0x20], 0
jmp 0x418157
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x418188
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x4182fb
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x418150
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x418150
test byte [ebp - 0x20], 1
je 0x4182aa
mov ebx, dword [0x43618c]
test ebx, ebx
je 0x4182aa
mov dword [ebp - 0x20], 0
jmp 0x4181b7
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x4181e8
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x4182fb
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4181b0
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x4181b0
test byte [ebp - 0x20], 1
je 0x4182aa
mov ebx, dword [0x43618c]
test ebx, ebx
je 0x4182aa
mov dword [ebp - 0x20], 0
jmp 0x418217
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x418248
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x4182fb
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x418210
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x418210
test byte [ebp - 0x20], 1
je 0x4182aa
mov ebx, dword [0x43618c]
test ebx, ebx
je 0x4182aa
mov dword [ebp - 0x20], 0
jmp 0x418277
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x4182a4
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x4182fb
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x418270
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
mov al, 1
mov dword [ebp - 0x20], eax
jmp 0x418270
test byte [ebp - 0x20], 1
jne 0x4182c4
movzx eax, byte [0x433100]
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret 0xc
mov ebx, dword [0x43618c]
jmp 0x4182cf
mov ebx, dword [ebx + 8]
test ebx, ebx
je 0x4182aa
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
test edi, edi
je 0x4182fb
dec esi
push esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4182cc
push 0
push esi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
call edi
add esp, 4
jmp 0x4182cc
mov dword [ebp - 0x10], 0
push 0x42fbdc
push 0x2b
push str.called__Option::unwrap____on_a__None__value
call fcn.0042c800
add esp, 0xc
ud2
Function at 0x419d30
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push esi
mov eax, dword [0x436038]
mov esi, ecx
test eax, eax
je 0x419d56
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jbe 0x419d6f
cmp dword [eax + 4], 0
je 0x419d6f
add eax, 8
pop esi
pop edi
ret
push 0x436038
call fcn.0042c030
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
ja 0x419d4a
mov eax, dword [0x436038]
test eax, eax
je 0x419e06
dec eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
je 0x419e23
mov edi, eax
test eax, eax
jne 0x419dcf
movzx eax, byte [0x4360f9]
push 4
push 0x10
call fcn.00408090
add esp, 8
test eax, eax
je 0x419e37
mov dword [eax], 0x436038
mov dword [eax + 4], 0
mov edi, eax
mov eax, dword [0x436038]
test eax, eax
je 0x419e28
dec eax
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test esi, esi
je 0x419def
mov eax, dword [esi]
xor ecx, ecx
mov edx, 0
mov dword [esi], 0
cmp eax, 1
jne 0x419df3
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
jmp 0x419df3
xor ecx, ecx
xor edx, edx
mov dword [edi + 4], 1
mov dword [edi + 8], ecx
lea eax, [edi + 8]
mov byte [edi + 0xc], dl
pop esi
pop edi
ret
push 0x436038
call fcn.0042c030
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 1
jne 0x419d8d
xor eax, eax
pop esi
pop edi
ret
push 0x436038
call fcn.0042c030
add esp, 4
jmp 0x419dc7
push 0x10
push 4
call fcn.0042c6c0
add esp, 8
ud2