joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4074c5
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x4153b0], ebx
push esi
push edi
jne 0x407545
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x407580
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x4153b0], eax
je 0x407580
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x4153b4], eax
call esi
cmp dword [0x415258], 2
mov dword [0x4153b8], eax
jne 0x407545
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x4153c0], eax
je 0x407545
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x4153bc], eax
mov eax, dword [0x4153bc]
test eax, eax
je 0x40758a
call eax
test eax, eax
je 0x407571
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x4153c0]
test eax, eax
je 0x407571
test byte [ebp - 8], 1
jne 0x40758a
cmp dword [0x415264], 4
jb 0x407584
or byte [ebp + 0x12], 0x20
jmp 0x4075a9
xor eax, eax
jmp 0x4075b9
or byte [ebp + 0x12], 4
jmp 0x4075a9
mov eax, dword [0x4153b4]
test eax, eax
je 0x4075a9
call eax
mov ebx, eax
test ebx, ebx
je 0x4075a9
mov eax, dword [0x4153b8]
test eax, eax
je 0x4075a9
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x4153b0]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4077e4
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x407812
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x407819
cmp ebx, dword [eax + 4]
jae 0x407819
xor eax, eax
jmp 0x407a09
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40782a
xor eax, eax
inc eax
jmp 0x407a08
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x407840
cmp ecx, edx
jae 0x407985
cmp dword [eax + 4], 0
je 0x407849
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x407831
cmp dword [ebp + 8], 0
je 0x40786b
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x407985
cmp eax, esi
jae 0x407985
mov eax, dword [0x4153c8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x407890
cmp dword [esi*4 + 0x4153d0], edi
je 0x407989
inc esi
cmp esi, eax
jl 0x40787e
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x407a05
cmp dword [ebp - 8], 0x1000000
jne 0x407a05
test byte [ebp - 0xc], 0xcc
je 0x40790e
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x407a05
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x407a05
cmp word [eax + 0x18], 0x10b
jne 0x407a05
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x407a05
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40790e
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40790e
test byte [ecx + 0x27], 0x80
jne 0x407985
push 1
push 0x415410
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x407822
mov ecx, dword [0x4153c8]
test ecx, ecx
mov edx, ecx
jle 0x407942
lea eax, [ecx*4 + 0x4153cc]
cmp dword [eax], edi
je 0x407942
dec edx
sub eax, 4
test edx, edx
jg 0x407936
test edx, edx
jne 0x407973
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40794f
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x407967
lea eax, [edx*4 + 0x4153d0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x407955
cmp ecx, 0x10
jge 0x407973
inc ecx
mov dword [0x4153c8], ecx
push 0
push 0x415410
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x407822
xor eax, eax
jmp 0x407a08
test esi, esi
jle 0x407822
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x415410
call ebx
test eax, eax
jne 0x407822
cmp dword [esi*4 + 0x4153d0], edi
je 0x4079df
mov eax, dword [0x4153c8]
lea esi, [eax - 1]
test esi, esi
jl 0x4079cd
cmp dword [esi*4 + 0x4153d0], edi
je 0x4079c9
dec esi
jns 0x4079bd
test esi, esi
jge 0x4079dd
cmp eax, 0x10
jge 0x4079d8
inc eax
mov dword [0x4153c8], eax
lea esi, [eax - 1]
jmp 0x4079df
je 0x4079f7
xor ecx, ecx
test esi, esi
jl 0x4079f7
lea eax, [ecx*4 + 0x4153d0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4079e5
push 0
push 0x415410
call ebx
jmp 0x407822
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40b8ee
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00406d60
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40b989
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x415258]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x40b989
cmp eax, 1
je 0x40b9aa
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40b989
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40b956
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40b985
xor eax, eax
inc eax
jmp 0x40b9c9
cmp edi, eax
jae 0x40b98d
xor eax, eax
jmp 0x40b9c9
cmp eax, esi
jae 0x40b994
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x415258]
jmp 0x40b9ad
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40c0d3
Capabilities:
Get geographical location

Disassembly:
push 0x18
push 0x4122e0
call fcn.00404604
xor edi, edi
xor ebx, ebx
inc ebx
cmp dword [0x415578], edi
jne 0x40c117
push edi
push edi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x40c102
mov dword [0x415578], ebx
jmp 0x40c117
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x40c117
mov dword [0x415578], 2
mov eax, dword [0x415578]
cmp eax, ebx
jne 0x40c137
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
jmp 0x40c1fa
cmp eax, 2
je 0x40c140
cmp eax, edi
jne 0x40c168
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], edi
cmp dword [ebp + 0x18], edi
jne 0x40c153
mov eax, dword [0x415470]
mov dword [ebp + 0x18], eax
push edi
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov dword [ebp - 0x20], eax
cmp eax, edi
jne 0x40c16f
xor eax, eax
jmp 0x40c1fa
mov dword [ebp - 4], edi
add eax, 3
and eax, 0xfffffffc
call fcn.00406d60
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [ebp - 0x28], esi
or dword [ebp - 4], 0xffffffff
jmp 0x40c1a2
cmp esi, edi
jne 0x40c1b8
push dword [ebp - 0x20]
call fcn.0040337e
pop ecx
mov esi, eax
cmp esi, edi
je 0x40c168
mov dword [ebp - 0x24], ebx
push dword [ebp - 0x20]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x40c1eb
cmp dword [ebp + 0x14], edi
jne 0x40c1d5
push edi
push edi
jmp 0x40c1db
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push esi
push ebx
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x24], edi
je 0x40c1f7
push esi
call fcn.00404759
pop ecx
mov eax, dword [ebp - 0x1c]
lea esp, [ebp - 0x34]
call fcn.0040463f
ret
Function at 0x40c203
Capabilities:
Get geographical location

Disassembly:
push 0x18
push 0x4122f0
call fcn.00404604
xor esi, esi
cmp dword [0x41557c], esi
jne 0x40c247
push esi
push esi
xor edi, edi
inc edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x40c232
mov dword [0x41557c], edi
jmp 0x40c247
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x40c247
mov dword [0x41557c], 2
mov eax, dword [0x41557c]
cmp eax, 2
je 0x40c328
cmp eax, esi
je 0x40c328
cmp eax, 1
jne 0x40c28c
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], esi
cmp dword [ebp + 0x18], esi
jne 0x40c275
mov eax, dword [0x415470]
mov dword [ebp + 0x18], eax
push esi
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov ebx, eax
mov dword [ebp - 0x24], ebx
cmp ebx, esi
jne 0x40c293
xor eax, eax
jmp 0x40c33a
mov dword [ebp - 4], esi
lea eax, [ebx + ebx]
add eax, 3
and eax, 0xfffffffc
call fcn.00406d60
mov dword [ebp - 0x18], esp
mov edi, esp
mov dword [ebp - 0x28], edi
or dword [ebp - 4], 0xffffffff
jmp 0x40c2c9
cmp edi, esi
jne 0x40c2e4
lea eax, [ebx + ebx]
push eax
call fcn.0040337e
pop ecx
mov edi, eax
cmp edi, esi
je 0x40c28c
mov dword [ebp - 0x20], 1
push ebx
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x40c317
push esi
push esi
cmp dword [ebp + 0x14], esi
jne 0x40c301
push esi
push esi
jmp 0x40c307
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push edi
push esi
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], esi
je 0x40c323
push edi
call fcn.00404759
pop ecx
mov eax, dword [ebp - 0x1c]
jmp 0x40c33a
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
lea esp, [ebp - 0x34]
call fcn.0040463f
ret
Function at 0x40f25d
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x40f431
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x4169e0]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40f431
test cl, 0x48
je 0x40f2c8
cmp byte [eax + 5], 0xa
je 0x40f2c8
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40f31a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40f302
call fcn.00407aa8
mov dword [eax], 9
call fcn.00407ab1
mov dword [eax], esi
jmp 0x40f312
cmp eax, 0x6d
je 0x40f431
push eax
call fcn.00407aba
pop ecx
or eax, 0xffffffff
jmp 0x40f433
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x40f42c
test eax, eax
je 0x40f341
cmp byte [ebx], 0xa
jne 0x40f341
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40f34a
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x40f426
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40f416
cmp al, 0xd
je 0x40f37c
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40f408
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x40f396
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40f391
add dword [ebp + 0x10], 2
jmp 0x40f3ea
mov dword [ebp + 0x10], eax
jmp 0x40f404
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40f3be
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40f404
cmp dword [ebp - 0xc], 0
je 0x40f404
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40f3df
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40f3ea
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40f407
cmp ebx, dword [ebp + 0xc]
jne 0x40f3ef
cmp byte [ebp - 1], 0xa
jne 0x40f3ef
mov byte [ebx], 0xa
jmp 0x40f407
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00406d9d
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40f408
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40f360
jmp 0x40f426
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40f426
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x40f433
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x409931
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x417344]
jne 0x40993b
repz ret
jmp fcn.0040e3dc

Function at 0x41260c
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x417344]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.0040c1d2
and dword [ebp - 0x14], 0
cmp dword [0x46832c], 0
mov dword [ebp - 0x18], eax
jne 0x4126bf
push 0x403754
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x412767
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x403748
push ebx
call edi
test eax, eax
je 0x412767
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push 0x403738
push ebx
mov dword [0x46832c], eax
call edi
push eax
call esi
push 0x403724
push ebx
mov dword [0x468330], eax
call edi
push eax
call esi
push 0x403708
push ebx
mov dword [0x468334], eax
call edi
push eax
call esi
mov dword [0x46833c], eax
test eax, eax
je 0x4126bf
push 0x4036f0
push ebx
call edi
push eax
call esi
mov dword [0x468338], eax
mov eax, dword [0x468338]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x412718
cmp dword [0x46833c], ecx
je 0x412718
push eax
call esi
push dword [0x46833c]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x412718
test ebx, ebx
je 0x412718
call edi
test eax, eax
je 0x41270f
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x41270f
test byte [ebp - 8], 1
jne 0x412718
or dword [ebp + 0x10], 0x200000
jmp 0x41274b
mov eax, dword [0x468330]
cmp eax, dword [ebp - 0x18]
je 0x41274b
push eax
call esi
test eax, eax
je 0x41274b
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x41274b
mov eax, dword [0x468334]
cmp eax, dword [ebp - 0x18]
je 0x41274b
push eax
call esi
test eax, eax
je 0x41274b
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x46832c]
call esi
test eax, eax
je 0x412767
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x412769
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409931
leave
ret
Function at 0x4145a0
Capabilities:
Delete directory
Delete file
Get disk information
Read .ini file

Disassembly:
mov eax, 0x1400
call fcn.00413be0
cmp dword [0x808484], 0x37
jne 0x414623
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x403f58
call edi
push 0
lea eax, [esp + 0x808]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x40401c
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea ecx, [esp + 4]
push ecx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetTapePosition]
push 0x404048
call edi
push 0
lea edx, [esp + 0xc08]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_FindNextVolumeMountPointW]
pop edi
mov eax, dword [0x809068]
mov edx, dword [0x8054e4]
mov cl, byte [eax + esi + 0x38d6]
mov byte [edx + esi], cl
add esp, 0x1400
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x406054], 1
mov dword [0x406050], 1
mov dword [0x40604c], 1
jne 0x401056
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010b0
mov dword [0x40600c], eax
mov eax, dword [0x406060]
test eax, eax
je 0x4010a0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x406074]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x40605c]
mov dword [eax], edx
call dbg._setargv
cmp dword [0x403018], 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 0x401790
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 0x4017f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x406068]
test esi, esi
jle 0x401910
mov eax, dword [0x40606c]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x401824
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x4018a7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x401810
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x401937
mov eax, dword [0x40606c]
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 [0x40606c]
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 0x401917
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x4018a0
lea edx, [eax - 0x40]
and edx, 0xffffffbf
jne 0x4018b0
add dword [0x406068], 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 [0x40606c]
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 0x4018a0
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 0x40182e
mov eax, dword [0x40606c]
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 0x401e60
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x406084
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x40607c]
sub esp, 4
test ebx, ebx
je 0x401eb5
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 0x401eae
test eax, eax
jne 0x401eae
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401e90
mov dword [esp], 0x406084
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4021f0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x402215
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x402220
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x402215
push esi
push ebx
mov ebx, dword [esp + 0xc]
movzx eax, word [ecx + 0x400014]
movzx esi, word [ecx + 0x400006]
sub ebx, 0x400000
lea eax, [edx + eax + 0x18]
test si, si
je 0x402268
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40225e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40226a
add ecx, 1
add eax, 0x28
cmp esi, ecx
jne 0x402250
xor eax, eax
pop ebx
pop esi
ret
Function at 0x40b890
Capabilities:
Decompress data using quicklz

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x40ba5e
sub esp, 0x38
mov eax, dword [esp + 0x3c]
cmp eax, 0x7000000
jle 0x40b8bb
mov eax, 0x7000000
jmp 0x40b8c3
test eax, eax
je 0x40ba39
mov dword [esp + 0x14], eax
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
mov ecx, dword [ecx + 0x18]
mov edx, dword [ecx + 0x94]
mov ebx, dword [ecx + 0x98]
mov dword [ecx + 0x94], ebx
mov ebp, edx
shl edx, 0x11
xor edx, ebp
mov ebp, ebx
xor ebx, edx
shr edx, 7
xor edx, ebx
mov ebx, ebp
shr ebp, 0x10
xor ebp, edx
mov dword [ecx + 0x98], ebp
lea ecx, [ebp + ebx]
shr ecx, 6
inc ecx
mov dword [esp], ecx
call fcn.00461500
movsd xmm0, qword [esp + 4]
movsd qword [esp + 0x28], xmm0
mov eax, dword [esp + 0x2c]
mov ecx, eax
shr eax, 0x14
and eax, 0x7ff
mov edx, eax
add eax, 0xfffffc01
mov ebx, ecx
shr ecx, 0xf
and ecx, 0x1f
mov ebp, ecx
add ecx, 1
mov esi, 0
adc esi, 0
shl ebx, 5
mov edi, dword [esp + 0x28]
shr edi, 0x1b
or edi, ebx
lea ebx, [0x5d71e0]
movsd xmm0, qword [ebx + ebp*8]
test esi, esi
jne 0x40ba51
cmp ecx, 0x21
jae 0x40ba45
movsd qword [esp + 0x18], xmm0
mov dword [esp + 0x10], edi
add edx, 0xfffffc01
mov edx, 0xffffffff
adc edx, 0
movsd xmm0, qword [ebx + ecx*8]
movsd qword [esp + 0x20], xmm0
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0045b160
movsd xmm0, qword [esp + 8]
movsd qword [esp + 0x30], xmm0
mov dword [esp + 4], 0
mov eax, dword [esp + 0x10]
and eax, 0xfffff
mov dword [esp], eax
call fcn.0045b230
movsd xmm0, qword [esp + 0x30]
movsd xmm1, qword [esp + 0x18]
addsd xmm0, xmm1
movsd xmm2, qword [esp + 0x20]
subsd xmm2, xmm1
movsd xmm1, qword [esp + 8]
mulsd xmm1, xmm2
movsd xmm2, qword [0x5403e0]
mulsd xmm2, xmm1
addsd xmm0, xmm2
movsd xmm1, qword [0x540448]
subsd xmm0, xmm1
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jbe 0x40ba14
xorps xmm0, xmm0
mov eax, dword [esp + 0x14]
cvtsi2sd xmm1, eax
movsd xmm2, qword [0x540490]
mulsd xmm1, xmm2
mulsd xmm0, xmm1
cvttsd2si eax, xmm0
inc eax
mov dword [esp + 0x40], eax
add esp, 0x38
ret
mov dword [esp + 0x40], 0
add esp, 0x38
ret
mov eax, ecx
mov ecx, 0x21
call fcn.004615e0
mov eax, ecx
mov ecx, 0x21
call fcn.00461690
nop
call fcn.00460140
jmp fcn.0040b890