joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10037e91
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006d06a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x64
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
movzx eax, byte [ebp + 8]
test eax, eax
je 0x10037f2a
lea eax, [ebp + 0xc]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x2c]
movzx eax, byte [eax]
test eax, eax
je 0x10037f00
mov byte [ebp - 0x11], 0
movzx eax, byte [ebp - 0x11]
test eax, eax
je 0x10037efe
push 1
push 1
push 0x58d8
push 0x2d9d
push 0x4301
call fcn.10037741
add esp, 0x14
jmp 0x10037f25
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
push dword [eax]
mov ecx, dword [ebp - 0x44]
call fcn.100389ee
jmp 0x1003805b
mov dword [ebp - 0x28], 0xb09
mov dword [ebp - 0x4c], 0x10008b54
cmp dword [ebp - 0x28], 0xe30
jle 0x10038003
push 0x239f
call dword [sym.imp.USER32.dll_IsWindow]
and dword [ebp - 0x18], 0
jmp 0x10037f5d
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0x56df
jge 0x10037ffb
and dword [ebp - 0x1c], 0
jmp 0x10037f77
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xa0d
jge 0x10037ff6
and dword [ebp - 0x20], 0
jmp 0x10037f8d
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x6be
jge 0x10037ff1
and dword [ebp - 0x24], 0
jmp 0x10037fa3
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0x9aa
jge 0x10037fef
mov eax, dword [ebp - 0x18]
imul eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
imul ecx, dword [ebp - 0x24]
shl eax, cl
cdq
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], edx
push dword [ebp - 0x58]
push dword [ebp - 0x5c]
lea ecx, [ebp - 0x74]
call fcn.1000a940
pop ecx
pop ecx
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x48]
call fcn.1002375f
push eax
call fcn.100551b6
pop ecx
lea ecx, [ebp - 0x74]
call fcn.10023755
jmp 0x10037f9c
jmp 0x10037f86
jmp 0x10037f70
jmp 0x10037f56
push 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x54], eax
and dword [ebp - 4], 0
cmp dword [ebp - 0x28], 0x8c1
jge 0x1003801f
push dword [ebp - 0x4c]
call fcn.100551b6
pop ecx
jmp 0x1003803b
or dword [ebp - 4], 0xffffffff
jmp 0x10038045
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x50], eax
push 1
push dword [ebp - 0x50]
push dword [ebp - 0x54]
call fcn.10030b4a
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10068535
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x10072740]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.10059428
mov dword [ebp - 0x14], eax
cmp dword [0x10616774], esi
jne 0x10068628
push 0x800
push esi
push 0x100075b0
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x100685b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x10068708
push esi
push esi
push 0x100075b0
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x10068708
push 0x100075c8
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x10068708
push eax
call ebx
push 0x100075d4
push edi
mov dword [0x10616774], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push 0x100075e4
push edi
mov dword [0x10616778], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push 0x100075f8
push edi
mov dword [0x1061677c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x10616784], eax
test eax, eax
je 0x10068625
push 0x10007614
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x10616780], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x1006864d
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x10068640
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x10068662
push 4
pop eax
jmp 0x1006870a
cmp dword [ebp - 0x14], esi
je 0x10068662
push dword [0x10616774]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x10068647
mov eax, dword [0x10616780]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x100686c0
cmp dword [0x10616784], edi
je 0x100686c0
push eax
call ebx
push dword [0x10616784]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x100686c0
test eax, eax
je 0x100686c0
call ecx
test eax, eax
je 0x100686b5
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x100686b5
test byte [ebp - 8], 1
jne 0x100686c0
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x100686f0
mov eax, dword [0x10616778]
cmp eax, edi
je 0x100686ed
push eax
call ebx
test eax, eax
je 0x100686ed
call eax
mov esi, eax
test esi, esi
je 0x100686ed
mov eax, dword [0x1061677c]
cmp eax, edi
je 0x100686ed
push eax
call ebx
test eax, eax
je 0x100686ed
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x10616774]
call ebx
test eax, eax
je 0x10068708
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x1006870a
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10056798
mov esp, ebp
pop ebp
ret
Function at 0x50b580
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x8000]
push edi
jmp 0x50b59a
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x50b5a1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x50b590
mov eax, 1
add ebx, ebx
jne 0x50b5b3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x50b5a8
jne 0x50b5c4
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x50b5a8
xor ecx, ecx
sub eax, 3
jb 0x50b5d8
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x50b64a
mov ebp, eax
add ebx, ebx
jne 0x50b5e3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x50b5f0
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x50b614
inc ecx
add ebx, ebx
jne 0x50b600
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x50b5f5
jne 0x50b611
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x50b5f5
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x50b634
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x50b625
jmp 0x50b596
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x50b634
add edi, ecx
jmp 0x50b596
pop esi
mov edi, esi
mov ecx, 0x1d
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x50b652
cmp byte [edi], 6
jne 0x50b652
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 0x50b657
lea edi, [esi + 0x9000]
mov eax, dword [edi]
or eax, eax
je 0x50b6c6
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0xdacc]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0xdb24]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x50b684
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0xdb2c]
or eax, eax
je 0x50b6c0
mov dword [ebx], eax
add ebx, 4
jmp 0x50b6a1
call dword [esi + 0xdb28]
mov ebp, dword [esi + 0xdb30]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x20f]
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 0x50b6fa
sub esp, 0xffffff80
jmp section.UPX0

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

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x40de38
nop
mov ecx, 0x40c65178
nop
test eax, eax
nop
nop
nop
nop
je 0x43304e
nop
nop
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x433024
nop
nop
nop
mov eax, section..data
nop
mov ebx, 0x4304d8
mov ecx, 0xeb6213a
nop
test eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
je 0x433084
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
nop
add eax, 4
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x43306c
nop
nop
nop
nop
nop
nop
nop
nop
popal
jmp 0x431219
Function at 0x4038fc
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x408398]
jne 0x403906
repz ret
jmp fcn.00403dae

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

Disassembly:
pushal
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x408ecc
nop
mov ecx, 0xc252f80
test eax, eax
nop
nop
nop
nop
nop
nop
nop
je 0x43004e
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
inc eax
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
jne 0x430024
nop
nop
nop
mov eax, section..rsrc
nop
mov ebx, 0x42e1d0
nop
mov ecx, 0x79826e7f
nop
test eax, eax
nop
nop
nop
nop
nop
nop
je 0x430084
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
add eax, 4
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x43006c
nop
nop
nop
popal
nop
nop
nop
jmp 0x401219
Function at 0x433000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x40de38
nop
mov ecx, 0x1f180a59
nop
nop
nop
test eax, eax
nop
nop
nop
je 0x43304e
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
jne 0x433024
nop
nop
nop
nop
mov eax, section..data
mov ebx, 0x4304d8
nop
nop
mov ecx, 0x73d35065
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x433084
nop
nop
nop
xor dword [eax], ecx
nop
nop
add eax, 4
nop
nop
nop
nop
nop
nop
nop
cmp eax, ebx
jne 0x43306c
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x10004510
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001870d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ebx
sub esp, 0x48
xor eax, eax
mov dword [ebp - 0x54], vtable.PictureFan::FileStream.0
push esi
xorps xmm0, xmm0
mov dword [ebp - 0x50], 0xffffffff
push edi
movups xmmword [ebp - 0x4c], xmm0
mov edi, edx
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 7
mov word [ebp - 0x4c], ax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x34], 0x1003bce0
mov dword [ebp - 0x28], 0x8000
mov dword [ebp - 0x24], eax
push 5
push ecx
lea ecx, [ebp - 0x54]
mov dword [ebp - 4], eax
call fcn.1000b3a0
test al, al
jne 0x1000459f
mov esi, 2
jmp 0x100046ab
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x10004689
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x100046a6
mov esi, dword [ebp - 0x20]
cmp esi, 0x10000000
ja 0x100046a6
test eax, eax
jne 0x1000460c
test esi, esi
jne 0x10004610
push 2
push esi
mov dword [edi + 4], esi
mov dword [edi + 0x14], esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [edi + 0x18], eax
test eax, eax
jne 0x100045fd
mov esi, 1
jmp 0x100046ab
xor ecx, ecx
xor esi, esi
mov word [eax], cx
mov dword [edi + 0x1c], ecx
jmp 0x100046ab
test esi, esi
je 0x100045f3
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x100045f3
cmp dword [ebp - 0x24], 0
jbe 0x1000464d
mov ecx, dword [ebp - 0x54]
mov eax, dword [ecx + 0x40]
lea ecx, [ebp - 0x54]
cmp eax, fcn.1000bae0
jne 0x10004644
call fcn.1000bae0
jmp 0x10004646
call eax
test al, al
je 0x10004673
mov eax, dword [ebp - 0x14]
push 0
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push ecx
push esi
push eax
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1000466d
xor al, al
jmp 0x10004673
cmp dword [ebp - 0x1c], esi
sete al
test al, al
jne 0x10004690
push dword [ebp - 0x14]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, 3
jmp 0x100046ab
mov ecx, dword [ebp - 0x14]
mov edx, esi
push edi
call fcn.10004260
mov esi, eax
add esp, 4
test esi, esi
jne 0x100046ab
jmp 0x100046ab
mov esi, 5
lea ecx, [ebp - 0x54]
call fcn.1000b2a0
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
Function at 0x1000b730
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
test edi, edi
je 0x1000b860
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x1000b860
cmp dword [ecx + 0x24], 0
push esi
je 0x1000b819
mov esi, dword [ecx + 0x28]
mov dword [ebp - 0xc], esi
mov edx, dword [ecx + 0x30]
cmp edx, esi
jne 0x1000b77d
mov eax, dword [ecx]
mov eax, dword [eax + 0x40]
call eax
test al, al
je 0x1000b7fe
mov ecx, dword [ebp - 4]
jmp 0x1000b7f6
test edx, edx
jne 0x1000b7ac
cmp ebx, esi
jb 0x1000b7ac
push edx
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], edx
push eax
push esi
push edi
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000b7fe
mov eax, dword [ebp + 0xc]
sub ebx, eax
cmp eax, esi
jb 0x1000b7fe
mov ecx, dword [ebp - 4]
add edi, eax
jmp 0x1000b7f6
mov eax, esi
mov esi, ebx
sub eax, edx
cmp eax, ebx
cmovb esi, eax
add edx, dword [ecx + 0x24]
cmp edx, 0x10000
jb 0x1000b7ec
mov eax, edx
not eax
cmp esi, eax
ja 0x1000b7ec
cmp edi, 0x10000
jb 0x1000b7ec
mov eax, edi
not eax
cmp esi, eax
ja 0x1000b7ec
test esi, esi
je 0x1000b7ec
push esi
push edi
push edx
call fcn.1000db80
mov ecx, dword [ebp - 4]
add esp, 0xc
add edi, esi
sub ebx, esi
add dword [ecx + 0x30], esi
mov esi, dword [ebp - 0xc]
test ebx, ebx
jne 0x1000b762
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
sub ecx, ebx
test ebx, ebx
pop esi
mov dword [eax], ecx
sete cl
pop edi
mov byte [eax + 4], cl
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [ebp + 8]
lea eax, [ebp - 8]
push 0
push eax
push ebx
push edi
push dword [ecx + 4]
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1000b848
mov dword [esi], eax
mov byte [esi + 4], al
mov eax, esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 8]
cmp eax, ebx
mov dword [esi], eax
sete al
mov byte [esi + 4], al
mov eax, esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 8]
pop edi
pop ebx
mov dword [eax], 0
mov byte [eax + 4], 0
mov esp, ebp
pop ebp
ret 0xc

Function at 0x1000ba10
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
lea eax, [ebp - 4]
push eax
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov dword [ebp - 8], ecx
cmp ecx, 0xffffffff
jne 0x1000ba3a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1000ba40
mov ecx, dword [ebp - 8]
cmp dword [ebp - 4], 0
je 0x1000ba51
mov eax, dword [ebp + 8]
mov dword [eax], 0
xor al, al
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp + 8]
mov dword [eax], ecx
mov al, 1
mov esp, ebp
pop ebp
ret 4
Function at 0x1000bae0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov ecx, dword [esi + 4]
cmp ecx, 0xffffffff
je 0x1000bb5a
mov eax, dword [esi + 0x30]
test eax, eax
je 0x1000bb61
cmp eax, dword [esi + 0x28]
ja 0x1000bb5a
push 0
lea edx, [ebp - 4]
mov dword [ebp - 4], 0
push edx
push eax
push dword [esi + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000bb5a
mov eax, dword [ebp - 4]
test eax, eax
je 0x1000bb5a
mov ecx, dword [esi + 0x30]
sub ecx, eax
mov dword [esi + 0x30], ecx
je 0x1000bb61
mov edx, dword [esi + 0x24]
lea esi, [edx + eax]
cmp edx, 0x10000
jb 0x1000bb5a
or eax, 0xffffffff
sub eax, edx
cmp ecx, eax
ja 0x1000bb5a
cmp esi, 0x10000
jb 0x1000bb5a
mov eax, esi
not eax
cmp ecx, eax
ja 0x1000bb5a
push ecx
push esi
push edx
call fcn.1000db80
add esp, 0xc
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x100104d7
Capabilities:
Parse pe header

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

Function at 0x10011d85
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10038eb8
push 0x10038eb0
push str.FlsAlloc
push 0x1f
call fcn.10011ca1
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10011db9
push dword [ebp + 8]
mov ecx, esi
call dword [0x10019254]
call esi
jmp 0x10011dbf
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x10011e03
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10038ec8
push 0x10038ec0
push str.FlsGetValue
push 0x21
call fcn.10011ca1
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10011e3a
push dword [ebp + 8]
mov ecx, esi
call dword [0x10019254]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x10011e42
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10038ed0
push 0x10038ec8
push str.FlsSetValue
push 0x22
call fcn.10011ca1
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10011e7c
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x10019254]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x10014517
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x100145b4
push ebx
push esi
call fcn.100144e0
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.100133b1
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x10014561
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x100145b3
push edi
push eax
call fcn.10011fa7
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x10014581
call fcn.10011909
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x100145b2
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.100133b1
add esp, 0x20
test eax, eax
jne 0x100145a0
push edi
call fcn.10011909
jmp 0x100145a8
push ebx
call fcn.10011909
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret
Function at 0x10018380
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x100183ad
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x100183ad
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x402f70
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
dec edi
not edx
sbb ebx, 0xc3
not eax
sbb esi, 0x72
and esi, 0xc3
rcr edi, 0x90
sub edx, 0xe
dec edi
sbb edi, 0x6e
and edi, 0xf4
inc edi
add edi, 0xa1
bswap esi
ror edi, 0x46
sub ebx, 0xad
imul edx
sub esi, 0x92
ror ebx, 0x58
mov edx, 0xff
neg esi
rol edi, 0xb7
and edx, 0xe7
bswap edi
and esi, 0xa7
and ebx, 0xa6
rcr ebx, 0x3f
rcr esi, 0xe2
add eax, 0x8d
mov edx, 0xc4
inc edx
bswap edi
add eax, 0x6a
imul edi
not edi
imul edx
add edi, 0x8d
not edi
rcr ebx, 0xa
rol eax, 0xdd
rol eax, 0x2e
imul edx
rcl edi, 0xd0
add edi, 0x69
not esi
inc edi
and edi, 0x69
add esi, 0xaf
imul esi
inc eax
xor ecx, ecx
xor edi, edi
imul eax
rol eax, 0x87
mov esi, 0x3a
bswap ebx
rcr eax, 0xba
ror edi, 0x17
neg eax
and edi, 0x4d
inc eax
dec edx
dec eax
and edi, 0x28
or edi, 0x3c
rcl ebx, 0xa2
rcr edi, 0xd4
inc esi
not edi
neg esi
or ebx, 0x5a
neg eax
rcr eax, 0xbc
inc edi
rol edi, 0x77
sub edi, 0xf1
dec edx
not ebx
imul eax
neg eax
inc eax
sub ebx, 0x80
dec edx
mov esi, 0xa4
imul ebx
and edx, 0xff
sbb esi, 0x9d
add esi, 0xd5
neg eax
dec eax
ror edi, 0x19
inc esi
rcl ebx, 0x33
dec ebx
rcl edi, 0x55
rcl eax, 0x47
neg edi
rol edi, 0x68
add ebx, 0x8d
add edx, 0x73
imul edi
rcl eax, 0x84
mov ecx, dword [ebp + 0xc]
sub edi, 0xd2
dec eax
sbb esi, 0xe1
or edi, 0x87
neg edi
imul edi
dec edi
add eax, 0x95
imul esi
inc ebx
sbb eax, 0xa3
imul eax
not ebx
inc edx
and edx, 0x9f
imul esi
rcl ebx, 0x91
sbb esi, 2
rcl eax, 0xfe
not edi
neg ebx
inc edi
ror eax, 0x10
mov ebx, 0xb4
neg edx
not edx
dec esi
not edx
imul eax
sbb ebx, 0x96
add edx, 0x33
ror eax, 0xc4
not edx
not edx
or ebx, 0x6d
inc edx
mov ebx, 0x26
rcr edi, 0x44
not esi
and edi, 0xc6
imul esi
neg eax
add ebx, 0x78
bswap esi
mov ebx, 0x73
not eax
not ebx
ror eax, 0xa3
or edi, 0x17
rol edi, 0x47
mov edi, dword [ebp + 8]
xor eax, ebx
mov esi, esi
mov ebx, esi
mov ebx, eax
mov esi, esi
mov eax, esi
xor ebx, ebx
mov ebx, esi
xor ebx, ebx
xor esi, ebx
mov ebx, eax
xor eax, esi
not byte [edi]
xor eax, esi
mov ebx, ebx
xor ebx, esi
mov eax, ebx
xor eax, esi
xor eax, eax
mov eax, ebx
mov ebx, esi
xor esi, esi
sub byte [edi], 0x36
xor ebx, ebx
mov ebx, ebx
mov esi, ebx
xor ebx, eax
mov ebx, eax
xor esi, ebx
xor esi, eax
mov ebx, eax
mov ebx, esi
add byte [edi], 0x87
mov eax, eax
xor ebx, eax
mov esi, eax
xor ebx, eax
mov ebx, ebx
xor ebx, esi
mov eax, eax
mov eax, ebx
xor eax, ebx
imul byte [edi]
inc edi
loop 0x403148
pop esi
pop edi
pop ebx
pop ebp
ret