joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40bab9
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x1dc
push ebx
push ebp
push esi
mov esi, dword [esp + 0x1f0]
push edi
mov ebp, dword [esi + 0x3c]
mov eax, dword [esi + ebp + 0x78]
test eax, eax
je 0x40bbbe
lea edi, [eax + esi]
mov ebx, dword [edi + 0x18]
or ebx, ebx
je 0x40bbbe
mov eax, dword [edi + 0x1c]
xor edx, edx
add eax, esi
mov dword [esp + 0x10], edx
mov dword [esp + 0x24], eax
mov eax, dword [edi + 0x20]
add eax, esi
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x24]
add eax, esi
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0xc]
add eax, esi
mov cl, byte [eax]
test cl, cl
je 0x40bb3d
mov esi, dword [esp + 0x10]
lea edx, [esp + 0xe8]
sub edx, eax
or cl, 0x20
inc esi
mov byte [edx + eax], cl
inc eax
mov cl, byte [eax]
test cl, cl
jne 0x40bb20
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x1f4]
mov edx, dword [esp + 0x10]
push dword [esp + 0x204]
lea eax, [esp + 0xec]
mov byte [esp + edx + 0xec], 0
push dword [esp + 0x204]
push eax
call fcn.0040d9f7
mov dword [esp + 0x24], eax
add esp, 0xc
mov eax, dword [esp + 0x14]
add eax, 0xfffffffc
mov dword [esp + 0x1c], edx
lea eax, [eax + ebx*4]
mov dword [esp + 0x10], eax
push dword [esp + 0x204]
mov ecx, dword [eax]
push dword [esp + 0x204]
add ecx, esi
push ecx
call fcn.0040d9f7
xor eax, dword [esp + 0x24]
add esp, 0xc
xor edx, dword [esp + 0x1c]
cmp eax, dword [esp + 0x1f8]
jne 0x40bbae
cmp edx, dword [esp + 0x1fc]
je 0x40bbcb
mov eax, dword [esp + 0x10]
sub eax, 4
mov dword [esp + 0x10], eax
sub ebx, 1
jne 0x40bb79
sub eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1dc
ret
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
movzx eax, word [eax + ebx*2 - 2]
mov edx, dword [ecx + eax*4]
add edx, esi
cmp edx, edi
jb 0x40bc57
mov eax, dword [esi + ebp + 0x7c]
add eax, edi
cmp edx, eax
jae 0x40bc57
sub ecx, ecx
cmp byte [edx], cl
je 0x40bc0e
lea ebx, [esp + 0x28]
mov edi, edx
sub ebx, edx
cmp ecx, 0x3c
jae 0x40bc0e
mov al, byte [edi]
mov byte [ebx + edi], al
cmp al, 0x2e
je 0x40bc0e
inc ecx
inc edi
cmp byte [edi], 0
jne 0x40bbf9
inc edx
mov dword [esp + ecx + 0x29], 0x6c6c64
add ecx, edx
xor edx, edx
cmp byte [ecx], dl
je 0x40bc36
lea edi, [esp + 0x68]
sub edi, ecx
cmp edx, 0x7f
jae 0x40bc36
mov al, byte [ecx]
inc edx
mov byte [edi + ecx], al
inc ecx
cmp byte [ecx], 0
jne 0x40bc25
lea eax, [esp + 0x68]
mov byte [esp + edx + 0x68], 0
push eax
lea eax, [esp + 0x2c]
push eax
push esi
push dword [esp + 0x1fc]
call fcn.0040bc5e
add esp, 0x10
push eax
pop edx
mov eax, edx
jmp 0x40bbc0
Function at 0x40bc5e
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
push esp
pop ebp
mov eax, dword fs:[0x18]
sub ecx, ecx
push ebx
push esi
push edi
mov eax, dword [eax + 0x30]
mov edi, dword [ebp + 8]
mov eax, dword [eax + 0xc]
mov esi, dword [eax + 0xc]
cmp dword [esi + 0x18], ecx
je 0x40bca7
mov ebx, dword [ebp + 0xc]
or ecx, ecx
jne 0x40bcc3
cmp dword [esi + 0x18], ebx
je 0x40bc9b
push ecx
push dword [ebp + 0x14]
push dword [esi + 0x18]
push edi
call fcn.0040d859
add esp, 0x10
mov ecx, eax
mov esi, dword [esi]
cmp dword [esi + 0x18], 0
jne 0x40bc80
test ecx, ecx
jne 0x40bcc3
push dword [ebp + 0x10]
push edi
call fcn.0040d7bb
pop ecx
pop ecx
test eax, eax
je 0x40bcc1
push dword [ebp + 0x14]
push eax
call dword [edi + 0x34]
mov ecx, eax
jmp 0x40bcc3
sub ecx, ecx
pop edi
pop esi
push ecx
pop eax
pop ebx
pop ebp
ret
Function at 0x40d7bb
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
sub esp, 0x40
sub ecx, ecx
push ebx
push esi
or ebx, 0xffffffff
push edi
cmp byte [edx], cl
je 0x40d7e6
lea esi, [ebp - 0x40]
sub esi, edx
cmp ecx, 0x40
jae 0x40d7e6
mov al, byte [edx]
inc ecx
mov byte [esi + edx], al
inc edx
cmp byte [edx], 0
jne 0x40d7d5
cmp byte [ebp + ecx - 0x44], 0x2e
mov byte [ebp + ecx - 0x40], 0
je 0x40d7ff
mov dword [ebp + ecx - 0x40], 0x6c6c642e
mov byte [ebp + ecx - 0x3c], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0xc]
mov edi, dword [eax + 0xc]
mov esi, dword [edi + 0x18]
or esi, esi
je 0x40d846
mov eax, dword [esi + 0x3c]
mov ecx, dword [eax + esi + 0x78]
sub eax, eax
or ecx, ecx
je 0x40d83c
mov eax, dword [ecx + esi + 0xc]
add eax, esi
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.0040de89
mov ebx, eax
sub eax, eax
pop ecx
pop ecx
or ebx, ebx
je 0x40d855
mov edi, dword [edi]
test ebx, ebx
jne 0x40d80e
test eax, eax
jne 0x40d850
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp + 8]
call dword [eax + 0x30]
pop edi
pop esi
pop ebx
leave
ret
push esi
pop eax
jmp 0x40d850
Function at 0x40d859
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x90
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0xa8]
xor esi, esi
test edi, edi
je 0x40d9a7
mov ecx, dword [edi + 0x3c]
mov dword [esp + 0x18], ecx
mov eax, dword [ecx + edi + 0x78]
or eax, eax
je 0x40d9a7
lea ebx, [eax + edi]
mov eax, dword [ebx + 0x20]
mov edx, dword [ebx + 0x1c]
add eax, edi
mov dword [esp + 0x10], eax
add edx, edi
mov eax, dword [ebx + 0x24]
add eax, edi
mov dword [esp + 0x1c], edx
cmp dword [esp + 0xac], esi
je 0x40d993
mov ebp, dword [ebx + 0x18]
test ebp, ebp
je 0x40d9a7
lea eax, [eax + ebp*2]
add eax, 0xfffffffe
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
lea eax, [eax + ebp*4]
add eax, 0xfffffffc
mov dword [esp + 0x10], eax
mov eax, dword [eax]
push dword [esp + 0xac]
add eax, edi
push eax
call fcn.0040de62
pop ecx
pop ecx
or eax, eax
jne 0x40d8f8
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
movzx eax, word [eax]
mov esi, dword [ecx + eax*4]
add esi, edi
mov eax, dword [esp + 0x10]
sub dword [esp + 0x14], 2
sub eax, 4
mov dword [esp + 0x10], eax
sub ebp, 1
je 0x40d911
test esi, esi
je 0x40d8d1
mov ecx, dword [esp + 0x18]
cmp esi, ebx
jb 0x40d98f
mov eax, dword [ecx + edi + 0x7c]
add eax, ebx
cmp esi, eax
jae 0x40d98f
sub ecx, ecx
cmp byte [esi], cl
je 0x40d946
lea ebx, [esp + 0x20]
push esi
pop edx
sub ebx, esi
cmp ecx, 0x3c
jae 0x40d946
mov al, byte [edx]
mov byte [ebx + edx], al
cmp al, 0x2e
je 0x40d946
inc ecx
inc edx
cmp byte [edx], 0
jne 0x40d931
mov dword [esp + ecx + 0x21], 0x6c6c64
sub edx, edx
inc ecx
add ecx, esi
cmp byte [ecx], dl
je 0x40d96e
lea esi, [esp + 0x60]
sub esi, ecx
cmp edx, 0x3f
jae 0x40d96e
mov al, byte [ecx]
inc edx
mov byte [esi + ecx], al
inc ecx
cmp byte [ecx], 0
jne 0x40d95d
lea eax, [esp + 0x60]
mov byte [esp + edx + 0x60], 0
push eax
lea eax, [esp + 0x24]
push eax
push edi
push dword [esp + 0xb0]
call fcn.0040bc5e
add esp, 0x10
push eax
pop esi
mov eax, esi
jmp 0x40d9a9
mov eax, dword [esp + 0xb0]
sub eax, dword [ebx + 0x10]
mov esi, dword [edx + eax*4]
add esi, edi
jmp 0x40d915
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x90
ret

Function at 0x40d9b4
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
push esp
pop ebp
mov eax, dword fs:[0x18]
xor ecx, ecx
push esi
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0xc]
mov esi, dword [eax + 0xc]
jmp 0x40d9eb
or ecx, ecx
jne 0x40d9f2
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
push dword [ebp + 8]
call fcn.0040bab9
mov esi, dword [esi]
add esp, 0x18
push eax
pop ecx
mov eax, dword [esi + 0x18]
or eax, eax
jne 0x40d9cb
mov eax, ecx
pop esi
pop ebp
ret
Function at 0x40dabe
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x20]
sub ebx, ebx
push edi
lea edi, [esp + 0x10]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x10]
mov dword [esp + 0x28], ecx
push esi
pop ecx
ror eax, 8
mov esi, dword [esp + 0x28]
add eax, edx
ror esi, 8
xor eax, edi
add esi, edi
rol edx, 3
xor esi, ebx
rol edi, 3
xor edx, eax
mov dword [esp + 0x28], ebp
xor edi, esi
push ecx
pop ebp
inc ebx
cmp ebx, 0x1b
jb 0x40daef
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret

Function at 0x40db21
Capabilities:
Encode data using xor
Encrypt data using chaskey

Disassembly:
mov edx, dword [esp + 0x10]
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x20]
push ebp
mov ebp, dword [esp + 0x28]
or edx, edx
je 0x40dc26
xor eax, eax
lea ecx, [ebx + 0xf]
inc eax
mov dword [esp + 0x2c], ecx
sub eax, ebx
push esi
mov dword [esp + 0xc], eax
push edi
lea eax, [esp + 0x14]
cmp eax, ecx
ja 0x40db58
lea eax, [esp + 0x23]
push ebx
pop esi
lea edi, [esp + 0x14]
sub ecx, ecx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x28]
mov eax, dword [esi + ecx*4]
xor dword [esp + ecx*4 + 0x14], eax
inc ecx
cmp ecx, 4
jb 0x40db68
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x30], 0x10
add ecx, edi
add eax, esi
rol edi, 5
xor edi, ecx
rol esi, 8
xor esi, eax
rol ecx, 0x10
add eax, edi
add ecx, esi
rol edi, 7
rol esi, 0xd
xor edi, eax
xor esi, ecx
rol eax, 0x10
sub dword [esp + 0x30], 1
jne 0x40db8d
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x14], ecx
sub ecx, ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + ecx*4]
xor dword [esp + ecx*4 + 0x14], eax
inc ecx
cmp ecx, 4
jb 0x40dbcc
push 0x10
pop esi
cmp edx, esi
push edx
pop ecx
cmova ecx, esi
or ecx, ecx
je 0x40dbfc
lea edi, [esp + 0x14]
push ebp
pop esi
sub edi, ebp
mov ebx, ecx
mov al, byte [edi + esi]
xor byte [esi], al
inc esi
sub ebx, 1
jne 0x40dbf1
mov ebx, dword [esp + 0x10]
sub edx, ecx
add ebp, ecx
mov ecx, dword [esp + 0x34]
add byte [ecx], 1
jne 0x40dc15
dec ecx
lea eax, [ebx + ecx]
test eax, eax
jg 0x40dc08
mov ebx, dword [esp + 0x2c]
lea ecx, [ebx + 0xf]
or edx, edx
jne 0x40db4c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x40dc2c
Capabilities:
Decompress data using aplib

Disassembly:
sub esp, 0x14
mov ecx, dword [esp + 0x18]
and dword [esp + 0x10], 0
push ebx
push ebp
mov ebp, dword [esp + 0x24]
mov al, byte [ecx]
push esi
push edi
mov byte [ebp], al
or edi, 0xffffffff
lea eax, [ebp + 1]
sub esi, esi
mov dword [esp + 0x18], eax
sub ebx, ebx
lea eax, [ecx + 1]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
call fcn.0040ddcf
pop ecx
or eax, eax
je 0x40dda3
lea eax, [esp + 0x14]
push eax
call fcn.0040ddcf
or eax, eax
lea eax, [esp + 0x18]
pop ecx
push eax
je 0x40dd02
call fcn.0040ddcf
pop ecx
test eax, eax
je 0x40dcc6
push 4
xor esi, esi
pop ebx
lea eax, [esp + 0x14]
push eax
call fcn.0040ddcf
pop ecx
lea esi, [eax + esi*2]
sub ebx, 1
jne 0x40dc94
mov edx, dword [esp + 0x18]
test esi, esi
je 0x40dcb9
push edx
pop eax
sub eax, esi
mov al, byte [eax]
mov byte [edx], al
jmp 0x40dcbc
mov byte [edx], 0
mov ebx, dword [esp + 0x10]
inc edx
jmp 0x40ddb5
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
movzx edi, byte [eax]
inc eax
mov ecx, edi
mov dword [esp + 0x14], eax
and ecx, 1
add ecx, 2
shr edi, 1
je 0x40dcf6
mov esi, edx
sub esi, edi
mov al, byte [esi]
mov byte [edx], al
inc edx
inc esi
sub ecx, 1
jne 0x40dce6
jmp 0x40dd9a
xor ebx, ebx
inc ebx
mov dword [esp + 0x10], ebx
jmp 0x40dd9e
call fcn.0040de06
push eax
pop edx
pop ecx
test esi, esi
jne 0x40dd39
cmp edx, 2
jne 0x40dd39
lea eax, [esp + 0x14]
push eax
call fcn.0040de06
mov edx, dword [esp + 0x1c]
push eax
pop esi
pop ecx
or esi, esi
je 0x40dd9e
mov ecx, edx
sub ecx, edi
mov al, byte [ecx]
mov byte [edx], al
inc edx
inc ecx
sub esi, 1
jne 0x40dd2c
jmp 0x40dd9a
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x14]
xor esi, 1
sub edx, esi
shl edx, 8
movzx edi, byte [ecx]
add edi, 0xfffffe00
add edi, edx
inc ecx
push eax
mov dword [esp + 0x18], ecx
call fcn.0040de06
pop ecx
mov ecx, eax
cmp edi, 0x7d00
jb 0x40dd6b
inc ecx
mov edx, dword [esp + 0x18]
lea eax, [ecx + 1]
cmp edi, 0x500
cmovb eax, ecx
cmp edi, 0x80
lea esi, [eax + 2]
cmovae esi, eax
or esi, esi
je 0x40dd9e
mov ecx, edx
sub ecx, edi
mov al, byte [ecx]
mov byte [edx], al
inc edx
inc ecx
sub esi, 1
jne 0x40dd8f
mov dword [esp + 0x18], edx
xor esi, esi
inc esi
jmp 0x40ddbb
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov al, byte [ecx]
mov byte [edx], al
inc edx
inc ecx
mov dword [esp + 0x14], ecx
sub esi, esi
mov dword [esp + 0x18], edx
test ebx, ebx
je 0x40dc5e
pop edi
pop esi
sub edx, ebp
pop ebp
mov eax, edx
pop ebx
add esp, 0x14
ret

Function at 0x40ded0
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x14]
ret
Function at 0x40e480
Capabilities:
Enumerate pe sections
Read file via mapping

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0x80000000
push dword [esp + 0x50]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x40e68f
mov esi, eax
push 0
push 0
push 0
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
or eax, eax
je 0x40e86e
push eax
pop edi
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
je 0x40e872
push eax
pop ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], esi
mov edi, dword [eax + 0x3c]
push 4
push 0x3000
push dword [eax + edi + 0x50]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push eax
pop ebp
push dword [ebx + edi + 0x54]
push ebx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp word [ebx + edi + 6], 0
mov dword [esp + 0xc], ebx
mov dword [esp], ebp
je 0x40e56c
mov edx, dword [esp + 0xc]
mov eax, dword [edx + 0x3c]
lea esi, [eax + edx]
add esi, 0x10c
sub ebx, ebx
jmp 0x40e534
nop
nop
nop
nop
push eax
pop eax
jmp 0x40e53d
jmp 0x40e540
mov eax, dword [esi - 8]
add eax, ebp
mov ecx, dword [esi]
mov ebp, dword [esp + 0xc]
add ecx, ebp
push dword [esi - 4]
push ecx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
add ebx, 1
movzx eax, word [ebp + edi + 6]
mov ebp, dword [esp]
add esi, 0x28
cmp ebx, eax
jb 0x40e540
mov ebx, dword [ebp + 0x3c]
mov ecx, dword [ebp + ebx + 0x34]
mov eax, dword [ebp + ebx + 0xa4]
mov edx, dword [esp + 0x40]
mov dword [ebp + ebx + 0x34], edx
or eax, eax
je 0x40e696
jle 0x40e696
mov esi, dword [ebp + ebx + 0xa0]
lea edx, [esi + ebp]
push ecx
pop edi
shr edi, 0x10
mov dword [esp + 4], edi
mov edi, dword [esp + 0x40]
shr edi, 0x10
mov dword [esp + 0x10], edi
mov dword [esp + 8], ebx
jmp 0x40e5ea
mov edi, dword [edx + 4]
mov eax, dword [esp]
mov ebx, dword [esp + 8]
mov esi, dword [eax + ebx + 0xa0]
mov eax, dword [eax + ebx + 0xa4]
add edx, edi
mov ebp, dword [esp]
lea edi, [esi + ebp]
add edi, eax
cmp edx, edi
jae 0x40e696
mov edi, dword [edx + 4]
test edi, edi
je 0x40e696
lea ebp, [edi - 8]
cmp ebp, 2
jb 0x40e5d8
mov eax, dword [edx]
add eax, dword [esp]
shr ebp, 1
sub esi, esi
jmp 0x40e634
and ebx, 0xfff
sub word [ebx + eax], cx
movzx edi, word [edx + esi*2 + 8]
and edi, 0xfff
mov ebx, dword [esp + 0x40]
add word [edi + eax], bx
add esi, 1
cmp ebp, esi
je 0x40e5c0
movzx ebx, word [edx + esi*2 + 8]
mov edi, ebx
shr edi, 0xc
add edi, 0xffffffff
cmp di, 9
ja case.0x40e64a.3
movzx edi, di
jmp dword [edi*4 + 0x411004]
and ebx, 0xfff
sub dword [ebx + eax], ecx
movzx edi, word [edx + esi*2 + 8]
and edi, 0xfff
mov ebx, dword [esp + 0x40]
add dword [edi + eax], ebx
jmp case.0x40e64a.3
and ebx, 0xfff
mov edi, dword [esp + 4]
sub word [ebx + eax], di
movzx edi, word [edx + esi*2 + 8]
and edi, 0xfff
mov ebx, dword [esp + 0x10]
jmp 0x40e629
xor ebp, ebp
jmp 0x40e882
cmp dword [ebp + ebx + 0x84], 0
je 0x40e85a
mov eax, dword [ebp + ebx + 0x80]
cmp dword [ebp + eax], 0
je 0x40e85a
add eax, ebp
mov ecx, ebp
add ecx, 2
mov dword [esp + 0x10], ecx
jmp 0x40e6f0
sub ebp, ebp
jmp 0x40e87b
xor ebp, ebp
Function at 0x40e890
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x24]
mov eax, dword [ebp + 0x3c]
mov dword [esp], eax
mov esi, dword [ebp + eax + 0x54]
push esi
push ebx
push ebp
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
je 0x40e8e3
lea edi, [esp + 0xc]
push edi
push 0x40
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x40e8e3
push esi
push ebp
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
push edi
push dword [esp + 0x10]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [esp]
movzx eax, word [ebp + eax + 6]
test ax, ax
je 0x40e983
mov edx, ebp
mov ecx, dword [ebp + 0x3c]
add ebp, ecx
add ebp, 0x100
sub esi, esi
jmp 0x40e929
mov edx, dword [esp + 0x24]
mov eax, dword [esp]
movzx eax, word [edx + eax + 6]
add esi, 1
movzx ecx, ax
add ebp, 0x28
cmp esi, ecx
jae 0x40e983
cmp dword [ebp + 0x1c], 0
js 0x40e91c
mov edi, dword [ebp]
mov ebx, dword [ebp + 4]
lea eax, [edx + ebx]
add ebx, dword [esp + 0x28]
push edi
push ebx
mov dword [esp + 0x10], eax
push eax
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
je 0x40e910
lea eax, [esp + 4]
push eax
push 0x40
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x40e910
push edi
push dword [esp + 0xc]
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [esp + 4]
push eax
push dword [esp + 8]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x40e910
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x40e9f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov edi, dword [esp + 0x24]
sub eax, eax
test edi, edi
je 0x40eb96
mov esi, dword [esp + 0x28]
mov edx, dword [edi + 0x3c]
mov ecx, dword [edx + edi + 0x78]
mov ebx, dword [ecx + edi + 0x1c]
add ebx, edi
cmp esi, 0xffff
ja 0x40ea2f
movzx eax, si
sub eax, dword [edi + ecx + 0x10]
add edi, dword [ebx + eax*4]
mov eax, edi
jmp 0x40eb96
mov esi, dword [edi + ecx + 0x18]
or esi, esi
je 0x40eb96
mov dword [esp + 4], ebx
mov dword [esp], edx
mov ebx, dword [edi + ecx + 0x20]
add ebx, edi
mov dword [esp + 8], ecx
mov ebp, dword [edi + ecx + 0x24]
add ebp, edi
nop
nop
push edi
pop edi
push ecx
pop ecx
jmp 0x40ea5b
push ebx
pop ebx
nop
nop
nop
mov eax, dword [ebx]
add eax, edi
push dword [esp + 0x28]
push eax
call sub.msvcrt.dll_strcmp
add esp, 8
test eax, eax
je 0x40ea89
add esi, 0xffffffff
add ebx, 4
add ebp, 2
or esi, esi
jne 0x40ea60
sub eax, eax
jmp 0x40eb96
movzx eax, word [ebp]
mov ecx, dword [esp + 4]
mov esi, dword [ecx + eax*4]
mov eax, dword [esp + 8]
cmp eax, esi
ja 0x40eb92
mov ecx, dword [esp]
add eax, dword [edi + ecx + 0x7c]
cmp esi, eax
jae 0x40eb92
add esi, edi
push 0x2e
push esi
call sub.msvcrt.dll_strchr
add esp, 8
mov edi, eax
add edi, 1
push edi
pop ebp
sub ebp, esi
lea eax, [ebp + 4]
push 2
push eax
call sub.msvcrt.dll_calloc
add esp, 8
test eax, eax
je 0x40ea82
mov ebx, eax
lea eax, [ebp + 1]
push ebp
push esi
push eax
push ebx
push 0
call dword [sym.imp.msvcrt.dll_mbstowcs_s]
add esp, 0x14
mov eax, dword [0x411040]
mov dword [ebx + ebp*2], eax
movzx eax, word [0x411044]
mov word [ebx + ebp*2 + 4], ax
push 4
push 0x41102c
push ebx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
or eax, eax
je 0x40eb29
push 4
push str.ext_
push ebx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
or eax, eax
jne 0x40eb74
lea eax, [esp + 0xc]
push eax
push ebx
push dword [esp + 0x34]
call fcn.0040dee0
add esp, 0xc
test eax, eax
je 0x40eb74
push eax
pop ebp
push ebx
call sub.msvcrt.dll_free
add esp, 4
mov esi, dword [esp + 0xc]
lea eax, [esi + 1]
push 2
push eax
call sub.msvcrt.dll_calloc
add esp, 8
push eax
pop ebx
or eax, eax
pushfd
and eax, 0
popfd
je 0x40eb96
add esi, esi
push esi
push ebp
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push ebx
push edi
push eax
call fcn.0040e9f0
mov esi, eax
push ebx
call sub.msvcrt.dll_free
mov eax, esi
add esp, 4
jmp 0x40eb96
add esi, edi
mov eax, esi
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret 0xc

Function at 0x40ee70
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.0040fc10
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 sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.0040fc10
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]
Function at 0x40eed0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
push eax
pop ebx
sub esp, 0x30
mov esi, dword [0x41204c]
or esi, esi
jle 0x40eff0
mov eax, dword [0x412050]
sub ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp edx, ebx
ja 0x40ef04
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x40ef87
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x40eef0
mov dword [esp], ebx
call fcn.0040f860
mov edi, eax
test eax, eax
je 0x40f017
mov eax, dword [0x412050]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.0040f970
mov edx, dword [0x412050]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x40eff7
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x40ef80
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x40ef90
add dword [0x41204c], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 0x40
mov eax, 4
mov ecx, dword [esp + 0x20]
cmovne eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x412050]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x40ef80
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.0040ee70
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x40ef0e
mov eax, dword [0x412050]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.0040ee70
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.0040ee70
lea esi, [esi]
nop

Function at 0x40f4d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x412068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x412060]
sub esp, 4
test ebx, ebx
je 0x40f525
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
push eax
pop esi
call edi
or eax, eax
jne 0x40f51e
test esi, esi
je 0x40f51e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x40f500
mov dword [esp], 0x412068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret