joyce8/EMBER2024-capa huggingface dataset:
Function at 0x466d0c
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
mov dl, 0xb5
mov ebx, eax
xor eax, eax
mov ecx, eax
mov esi, ebx
shr esi, cl
mov ecx, esi
and cl, 0xff
xor dl, cl
inc eax
cmp eax, 4
jne 0x466d14
mov eax, edx
pop esi
pop ebx
ret

Function at 0x491930
Capabilities:
Suspend thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0xf]
mov byte [ebp - 5], al
xor eax, eax
push ebp
push 0x49197e
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov byte [eax + 0xf], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
push eax
call sub.kernel32.dll_SuspendThread
test eax, eax
setge dl
mov eax, dword [ebp - 4]
call fcn.004913f4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x491997
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret

Function at 0x4a0d04
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
mov ecx, 4
push 0
push 0
dec ecx
jne 0x4a0d0c
push ecx
push ebx
push esi
mov esi, eax
xor eax, eax
push ebp
push 0x4a0df9
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
call fcn.00422c64
mov edx, dword [ebp - 8]
mov ecx, 0x4a0e14
xor eax, eax
call fcn.004a0be8
push 0
mov eax, dword [ebp - 4]
call fcn.004084c8
push eax
call sub.kernel32.dll_CreateDirectoryW
test eax, eax
jne 0x4a0dc7
call sub.kernel32.dll_GetLastError
mov ebx, eax
cmp ebx, 0xb7
je 0x4a0d26
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp - 4]
mov al, 0x3b
call fcn.00426dfc
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
mov eax, ebx
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x20]
call fcn.00419f38
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x24]
mov eax, ebx
call fcn.004231e0
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x18]
mov ecx, 2
mov al, 0x70
call fcn.00426dcc
mov ecx, dword [ebp - 0xc]
mov dl, 1
mov eax, dword [0x414ecc]
call fcn.0041f384
call fcn.004070f0
jmp 0x4a0d26
mov eax, esi
mov edx, dword [ebp - 4]
call fcn.00407dd4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a0e00
lea eax, [ebp - 0x24]
mov edx, 3
call fcn.00407a54
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00407a54
ret

Function at 0x4a0ecc
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
mov esi, ecx
dec esi
test esi, esi
jl 0x4a0f26
inc esi
xor edi, edi
cmp edi, 1
jne 0x4a0ef2
mov eax, dword [ebp + 0xc]
push eax
call sub.kernel32.dll_Sleep
jmp 0x4a0f00
cmp edi, 1
jle 0x4a0f00
mov eax, dword [ebp + 8]
push eax
call sub.kernel32.dll_Sleep
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.00427040
test eax, eax
jne 0x4a0f26
call sub.kernel32.dll_GetLastError
cmp eax, 2
je 0x4a0f26
call sub.kernel32.dll_GetLastError
cmp eax, 3
je 0x4a0f26
inc edi
dec esi
jne 0x4a0ee2
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 8
Function at 0x4a0f30
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, eax
push 2
lea eax, [ebp - 4]
push eax
push 0x20001004
movzx eax, bx
push eax
call sub.kernel32.dll_GetLocaleInfoW
test eax, eax
jle 0x4a0f54
mov eax, dword [ebp - 4]
jmp 0x4a0f57
or eax, 0xffffffff
pop ebx
pop ecx
pop ebp
ret

Function at 0x4a0f5c
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, ecx
mov byte [ebp - 1], dl
mov edi, eax
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [eax], edx
mov byte [ebp - 2], 0
test esi, esi
je 0x4a0fa9
xor ebx, ebx
jmp 0x4a0f9e
mov eax, dword [ebp - 8]
mov edx, dword [eax]
mov eax, esi
call fcn.004198cc
test eax, eax
jne 0x4a0f9d
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 2
jmp 0x4a1054
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call edi
test al, al
jne 0x4a0f7f
movzx eax, byte [ebp - 1]
sub al, 1
jb 0x4a0fb5
je 0x4a0fbe
jmp 0x4a0fc7
call fcn.00422f10
mov esi, eax
jmp 0x4a0fc9
call sub.kernel32.dll_GetUserDefaultLangID
mov esi, eax
jmp 0x4a0fc9
xor esi, esi
test si, si
je 0x4a1054
xor ebx, ebx
jmp 0x4a0fef
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x28]
movzx edx, si
cmp eax, edx
jne 0x4a0fee
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 1
jmp 0x4a1054
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call edi
test al, al
jne 0x4a0fd6
xor ebx, ebx
jmp 0x4a1049
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x28]
and eax, 0x3ff
mov dx, 0x3ff
and dx, si
movzx edx, dx
cmp eax, edx
jne 0x4a1048
mov ax, 0x3ff
and ax, si
cmp ax, 4
jne 0x4a103d
mov eax, dword [ebp - 8]
movzx eax, word [eax + 0x28]
call fcn.004a0f30
push eax
mov eax, esi
call fcn.004a0f30
pop edx
cmp edx, eax
jne 0x4a1048
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 1
jmp 0x4a1054
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call edi
test al, al
jne 0x4a0ffe
movzx eax, byte [ebp - 2]
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 4
Function at 0x1102f108
Capabilities:
Decompress data using aplib

Disassembly:
call 0x1102f258
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x1102f12e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x1102f11a
add dl, dl
jne 0x1102f139
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x1102f18c
xor eax, eax
add dl, dl
jne 0x1102f146
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x1102f22d
add dl, dl
jne 0x1102f155
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1102f160
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1102f16b
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1102f176
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x1102f182
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x1102f125
mov eax, 1
add dl, dl
jne 0x1102f19a
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x1102f1a5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x1102f191
sub eax, ebx
mov ebx, 1
jne 0x1102f1d8
mov ecx, 1
add dl, dl
jne 0x1102f1be
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1102f1c9
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x1102f1b5
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1102f125
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x1102f1ef
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x1102f1fa
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x1102f1e6
cmp eax, 0x7d00
jae 0x1102f21d
cmp eax, 0x500
jb 0x1102f218
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1102f125
cmp eax, 0x7f
ja 0x1102f220
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x1102f125
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x1102f24e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x1102f125
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x1000da10
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 4]
mov eax, dword [esp + 8]
cmp edx, 1
jle 0x1000da2e
push esi
lea ecx, [esp + 0x18]
dec edx
mov esi, dword [ecx]
add ecx, 0xc
xor eax, esi
dec edx
jne 0x1000da23
pop esi
ret

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
nop
nop
push 4
nop
nop
nop
nop
nop
pop edi
nop
nop
nop
cmp eax, 0
nop
nop
je 0x433072
nop
nop
nop
mov ebx, 0x40de38
nop
mov ecx, ebx
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
div edi
nop
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
pop eax
nop
nop
mov esi, 0x15a94225
nop
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
loop 0x433060
nop
nop
nop
mov eax, section..data
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x4330d2
nop
mov ebx, 0x4304d8
nop
mov ecx, ebx
nop
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
xor edx, edx
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x51756590
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
loop 0x4330c0
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x401801
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 8]
cmp eax, dword [esi + 0xc]
jae 0x401814
xor eax, eax
jmp 0x40184a
mov eax, dword [esi + 4]
push edi
mov dword [esi + 0xc], eax
mov dword [esi + 8], eax
mov edi, 0x10000
push 0
lea eax, [ebp - 4]
push eax
push edi
push dword [esi + 0xc]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40184d
mov eax, dword [ebp - 4]
test eax, eax
je 0x401855
add dword [esi + 0xc], eax
sub edi, eax
jne 0x401823
xor eax, eax
pop edi
pop esi
leave
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x401849
mov eax, dword [esi + 8]
cmp eax, dword [esi + 0xc]
sbb eax, eax
and eax, 0xffffffda
add eax, 0x26
jmp 0x401849

Function at 0x40193e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 4]
push edi
mov edi, dword [esi + 8]
mov dword [esi + 8], eax
jmp 0x401971
push 0
lea eax, [ebp - 4]
push eax
push edi
push dword [esi + 8]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401981
mov eax, dword [ebp - 4]
test eax, eax
je 0x401989
add dword [esi + 8], eax
sub edi, eax
jne 0x401951
mov eax, dword [esi + 4]
mov dword [esi + 8], eax
xor eax, eax
pop edi
pop esi
leave
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40197d
push 0x27
pop eax
jmp 0x40197d
Function at 0x401a3f
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
push edi
mov esi, ecx
test esi, esi
mov edi, edx
mov dword [ebp - 0xc], edi
je 0x401c05
test edi, edi
je 0x401c05
mov eax, dword [esi + 0x54]
test eax, eax
push ebx
mov ebx, dword [sym.imp.USER32.dll_PostMessageW]
je 0x401a92
push dword [ebp + 8]
push 0
push 0x1400
push eax
call ebx
lea eax, [edi + 0x10]
push eax
push 0
push 0x1401
push dword [esi + 0x54]
call ebx
mov eax, dword [esi + 0x58]
test eax, eax
je 0x401a92
call eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401aad
and eax, 0xfffffffa
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edx, 0x10000
lea ecx, [ebp - 0x2c]
call fcn.004018f5
xor eax, eax
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x2c], eax
jne 0x401aea
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x401bf8
mov ecx, dword [edi + 0x14]
test ecx, ecx
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x1c], 0x4018b9
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x10], ecx
ja 0x401b5a
test eax, eax
ja 0x401b5a
lea eax, [edi + 0x20]
push eax
push 0
push 0
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
lea ecx, [ebp - 0x2c]
call fcn.00401915
test eax, eax
mov dword [ebp - 4], eax
jne 0x401b31
push dword [edi + 0x28]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esi + 0x54]
test eax, eax
je 0x401b4e
push dword [ebp - 4]
push 0
push 0x1403
push eax
call ebx
mov esi, dword [esi + 0x58]
test esi, esi
je 0x401b4e
call esi
mov eax, dword [ebp - 4]
pop ebx
jmp 0x401c08
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp - 0x20]
sub edi, dword [ebp - 0x24]
xor ecx, ecx
cmp ecx, dword [ebp - 0x10]
jb 0x401b6f
ja 0x401b6d
cmp edi, eax
jbe 0x401b6f
mov edi, eax
sub eax, edi
sbb dword [ebp - 0x10], 0
mov dword [ebp - 0x14], eax
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp - 0x24]
lea eax, [ebp - 0x1c]
push eax
push dword [esi + 0x50]
call fcn.00401f95
add esp, 0x14
test eax, eax
jne 0x401bdf
cmp dword [ebp - 8], edi
jne 0x401be8
add dword [ebp - 0x24], edi
lea ecx, [ebp - 0x2c]
call fcn.0040193e
test eax, eax
mov dword [ebp - 4], eax
jne 0x401bf8
mov eax, dword [esi + 0x54]
test eax, eax
je 0x401bc9
push edi
push 0
push 0x1402
push eax
call ebx
mov eax, dword [esi + 0x58]
test eax, eax
je 0x401bc9
call eax
test eax, eax
je 0x401bf1
cmp dword [ebp - 0x10], 0
ja 0x401b57
jb 0x401bd7
cmp dword [ebp - 0x14], 0
ja 0x401b57
mov edi, dword [ebp - 0xc]
jmp 0x401b05
mov dword [ebp - 4], 0x1e
jmp 0x401bf8
mov dword [ebp - 4], 0x26
jmp 0x401bf8
mov dword [ebp - 4], 0x4c7
lea ecx, [ebp - 0x2c]
call fcn.00401915
jmp 0x401b31
push 0x57
pop eax
pop edi
pop esi
leave
ret 4
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x505058], 1
mov dword [0x505054], 1
mov dword [0x505050], 1
jne 0x401056
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010b0
mov dword [0x50500c], eax
mov eax, dword [0x505064]
test eax, eax
je 0x4010a0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x505078]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x505060]
mov dword [eax], edx
call dbg._setargv
cmp dword [0x4b807c], 1
je 0x4010e0
xor eax, eax
add esp, 0x1c
ret
mov dword [esp], 1
call sym.___set_app_type
jmp 0x401070
movzx edx, word [ecx + 0x18]
cmp dx, 0x10b
je 0x4010f8
cmp dx, 0x20b
jne 0x401056
cmp dword [ecx + 0x84], 0xe
jbe 0x401056
mov edx, dword [ecx + 0xf8]
xor eax, eax
test edx, edx
setne al
jmp 0x401056
mov dword [esp], dbg._matherr
call dbg.__mingw_setusermatherr
xor eax, eax
add esp, 0x1c
ret
cmp dword [ecx + 0x74], 0xe
jbe 0x401056
mov ecx, dword [ecx + 0xe8]
xor eax, eax
test ecx, ecx
setne al
jmp 0x401056

Function at 0x40b300
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 0x40b360
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x50506c]
test esi, esi
jle 0x40b480
mov eax, dword [0x505070]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x40b394
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x40b417
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x40b380
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x40b4a7
mov eax, dword [0x505070]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
mov edx, dword [0x505070]
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 0x40b487
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x40b410
lea edx, [eax - 0x40]
and edx, 0xffffffbf
jne 0x40b420
add dword [0x50506c], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x505070]
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 0x40b410
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
lea esi, cs:[esi]
nop
xor esi, esi
jmp 0x40b39e
mov eax, dword [0x505070]
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 dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, cs:[esi]
nop

Function at 0x40b9d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x505088
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x505080]
sub esp, 4
test ebx, ebx
je 0x40ba25
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
mov esi, eax
sub esp, 4
call edi
test esi, esi
je 0x40ba1e
test eax, eax
jne 0x40ba1e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x40ba00
mov dword [esp], 0x505088
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x40bd60
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x40bd85
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x40bd90
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x40bd85
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x40bdd8
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40bdce
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40bdda
add ecx, 1
add eax, 0x28
cmp esi, ecx
jne 0x40bdc0
xor eax, eax
pop ebx
pop esi
ret
Function at 0x41a8a0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], str.msvcrt.dll
mov esi, dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
sub esp, 4
mov dword [esp + 4], str.rand_s
mov dword [esp], eax
call ebx
sub esp, 8
test eax, eax
je 0x41a8e8
mov dword [esp + 0x20], esi
mov dword [dbg.init_rand_s], eax
add esp, 0x14
pop ebx
pop esi
jmp eax
mov dword [esp], str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
sub esp, 4
mov dword [esp + 4], str.SystemFunction036
mov dword [esp], eax
call ebx
mov dword [0x505ac4], eax
sub esp, 8
mov eax, dbg.mingw_rand_s
jmp 0x41a8d3

Function at 0x41d470
Capabilities:
Read file on windows

Disassembly:
push esi
push ebx
mov ebx, ecx
sub esp, 0x14
mov eax, dword [ecx + 0x20]
mov esi, dword [esp + 0x20]
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x24]
mov dword [esp], esi
mov dword [esp + 8], eax
call sym._fread
mov edx, 0xffffffff
test eax, eax
jle 0x41d4a8
movzx edx, byte [esi + eax - 1]
mov dword [ebx + 0x24], edx
add esp, 0x14
pop ebx
pop esi
ret 8

Function at 0x41d4c0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1c
mov eax, dword [ecx + 0x20]
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sym._fwrite
add esp, 0x1c
ret 8

Function at 0x41e080
Capabilities:
Write file on windows

Disassembly:
push edi
push esi
push ebx
sub esp, 0x20
cmp byte [0x4b9dc4], 0
jne 0x41e1a6
mov byte [0x4b9dc4], 1
call sym.___cxa_current_exception_type
test eax, eax
je 0x41e174
mov ebx, dword [eax + 4]
xor eax, eax
cmp byte [ebx], 0x2a
mov dword [esp + 8], 0
sete al
mov dword [esp + 4], 0
add ebx, eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call sym.___cxa_demangle
mov dword [esp], 2
mov esi, dword [dbg.__acrt_iob_func]
mov edi, eax
call esi
mov dword [esp + 8], 0x30
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.terminate_called_after_throwing_an_instance_of_
call sym._fwrite
mov edx, dword [esp + 0x1c]
mov dword [esp], 2
test edx, edx
je 0x41e164
call esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._fputs
mov dword [esp], 2
call esi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4ba721
call sym._fwrite
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x4af79c
jmp 0x4af794
call esi
mov dword [esp], edi
mov dword [esp + 4], eax
call sym._fputs
jmp 0x41e12a
mov dword [esp], 2
call dword [0x4b8218]
mov dword [esp + 8], 0x2d
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.terminate_called_without_an_active_exception_n
call sym._fwrite
jmp 0x4af78f
mov dword [esp], 2
call dword [0x4b8218]
mov dword [esp + 8], 0x1d
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.terminate_called_recursively_n
call sym._fwrite
call sym._abort
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x42cab0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov eax, dword [esp + 0x70]
mov esi, dword [esp + 0x80]
mov dword [esp + 0x38], ecx
mov ecx, 0x4b965c
mov ebx, dword [esp + 0x74]
mov edi, dword [esp + 0x78]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x34], eax
call method.std::locale::id._M_id___const
mov edx, dword [esi + 0x6c]
mov ecx, dword [edx + 4]
cmp eax, dword [edx + 8]
jae 0x42cc3d
mov eax, dword [ecx + eax*4]
test eax, eax
je 0x42cc3d
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x4c06e4
mov dword [esp + 4], 0x4c03e8
mov dword [esp], eax
call sym.___dynamic_cast
test eax, eax
je 0x42cc3d
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x88]
lea ebp, [esp + 0x44]
mov ecx, dword [esp + 0x38]
mov eax, dword [eax + 8]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x84]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], ebx
mov dword [esp + 0x14], edx
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
call fcn.0042e720
mov ecx, ebp
sub esp, 0x24
mov esi, eax
mov ebx, edx
mov eax, dword [esp + 0x88]
mov dword [esp], eax
call method.std::__time_get_state._M_finalize_state_tm_
sub esp, 4
cmp ebx, 0xffffffff
sete dl
test esi, esi
setne al
and al, dl
mov ebp, eax
jne 0x42cc10
cmp dword [esp + 0x34], 0xffffffff
sete al
test edi, edi
je 0x42cbc6
test al, al
jne 0x42cbe8
cmp dl, al
jne 0x42cbd4
mov eax, dword [esp + 0x84]
or dword [eax], 2
add esp, 0x5c
mov eax, esi
mov edx, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 0x1c
mov ecx, dword [edi + 0xc]
xor eax, eax
cmp dword [edi + 8], ecx
jb 0x42cbc6
mov eax, dword [edi]
mov byte [esp + 0x34], dl
mov ecx, edi
call dword [eax + 0x24]
movzx edx, byte [esp + 0x34]
cmp eax, 0xffffffff
sete al
jmp 0x42cbc6
mov eax, dword [esi + 0xc]
xor edx, edx
cmp dword [esi + 8], eax
jb 0x42cbb6
mov eax, dword [esi]
mov byte [esp + 0x38], dl
mov ecx, esi
call dword [eax + 0x24]
movzx edx, byte [esp + 0x38]
cmp eax, 0xffffffff
mov eax, 0
cmove edx, ebp
cmove esi, eax
jmp 0x42cbb6
call method.std.__throw_bad_cast__
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop