joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4e3330
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
jns 0x4e3348
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
push 0
lea ecx, [esp + 8]
push ecx
push dword [esp + 0x14]
push dword [esp + 0x14]
push eax
call dword [sym.imp.MSVCRT.dll__get_osfhandle]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4e3394
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x4e3387
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 9
or eax, 0xffffffff
ret
push eax
call fcn.004e2da0
add esp, 4
or eax, 0xffffffff
ret
mov eax, dword [esp + 4]
ret

Function at 0x501550
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x501570
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x501570
mov eax, dword [eax + 0x44]
test eax, eax
je 0x501570
push dword [esp + 8]
push eax
call ecx
add esp, 8
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x513800
Capabilities:
Query environment variable

Disassembly:
push ecx
push esi
push edi
mov edi, dword [esp + 0x10]
push edi
mov dword [edi + 4], 0
call fcn.00515920
push 0x54
push edi
mov dword [esp + 0x14], eax
call fcn.005158f0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x513847
push edi
call fcn.00515930
mov ecx, dword [edi]
push edi
mov dword [ecx + 0x14], 0x38
mov ecx, dword [edi]
mov dword [ecx + 0x18], esi
mov eax, dword [edi]
mov eax, dword [eax]
call eax
add esp, 8
mov dword [esi], fcn.00513490
mov dword [esi + 4], fcn.00513320
mov dword [esi + 8], fcn.005133f0
mov dword [esi + 0xc], fcn.00513270
mov dword [esi + 0x10], 0x513b60
mov dword [esi + 0x14], 0x513af0
mov dword [esi + 0x18], 0x513950
mov dword [esi + 0x1c], 0x513120
mov dword [esi + 0x20], 0x512fd0
mov dword [esi + 0x24], 0x513700
mov dword [esi + 0x28], 0x513bd0
mov dword [esi + 0x30], 0x3b9aca00
mov eax, dword [esp + 8]
mov dword [esi + 0x2c], eax
mov dword [esi + 0x38], 0
mov dword [esi + 0x40], 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0x54
push str.JPEGMEM
mov dword [edi + 4], esi
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
test eax, eax
je 0x51392a
lea ecx, [esp + 0x10]
mov byte [esp + 0x10], 0x78
push ecx
lea ecx, [esp + 0xc]
push ecx
push str._ld_c
push eax
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0x10
test eax, eax
jle 0x51392a
mov al, byte [esp + 0x10]
cmp al, 0x6d
je 0x513919
cmp al, 0x4d
mov eax, dword [esp + 8]
jne 0x513921
imul eax, dword [esp + 8], 0x3e8
imul eax, eax, 0x3e8
mov dword [esi + 0x2c], eax
pop edi
pop esi
pop ecx
ret
Function at 0x529e75
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0xc82878], 0
push ebx
push esi
mov esi, 0xc82880
jne 0x529ea1
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
mov dword [0xc82898], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0xc82878], 1
push dword [0xc82898]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x529f3e
push 0x14
push 8
push dword [0xc06444]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x529f68
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0xc8287c]
test eax, eax
je 0x529ee3
mov dword [eax], ebx
push edi
push esi
mov dword [ebx + 4], eax
mov dword [0xc8287c], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edi, [ebx + 0x10]
push 0
push 0
push 0x100000
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 8
push 0xffffffffffffffff
push ebx
push 0x529f6d
push dword [edi]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push ebx
push dword [0xc82898]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
push 0xc
push 0
push dword [0xc06444]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x529f68
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 8], ecx
mov ecx, dword [ebx + 8]
mov dword [eax], ecx
mov dword [ebx + 8], eax
pop esi
pop ebx
ret 8
Function at 0x1002af7
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
mov edi, 0x1000
push edi
mov esi, 0x1008320
push esi
call dword [sym.imp.msvcrt.dll__vsnwprintf]
add esp, 0x10
mov dword [ebp - 4], eax
test eax, eax
jl 0x1002b27
cmp eax, edi
jb 0x1002b2f
mov eax, 0xfff
mov dword [ebp - 4], eax
xor ecx, ecx
mov word [eax*2 + 0x1008320], cx
cmp dword [0x100a320], ecx
je 0x1002b5d
mov ecx, dword [0x100a324]
test ecx, ecx
je 0x1002b5d
cmp ecx, 0xffffffff
je 0x1002b5d
lea ecx, [ebp - 4]
push ecx
push eax
push esi
call fcn.01002ac5
jmp 0x1002b7f
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, 0xffffffff
je 0x1002b7f
and dword [ebp - 8], 0
push 0
lea ecx, [ebp - 8]
push ecx
push dword [ebp - 4]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
pop esi
leave
ret
Function at 0x10030a9
Capabilities:
Accept command line arguments
Manipulate console buffer

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
and dword [ebp - 0x10], 0
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea ecx, [ebp - 0x10]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
push 0x800
push 0
mov edi, 0x1007320
push edi
mov dword [ebp - 0xc], eax
call sub.msvcrt.dll_memset
mov esi, 0x3ff
push esi
push 0x20
mov ebx, 0x1007b20
push ebx
call dword [sym.imp.msvcrt.dll__wcsnset]
add esp, 0x18
xor eax, eax
push 0xffffffffffffffff
mov word [0x100831e], ax
call dword [sym.imp.KERNEL32.dll_AttachConsole]
mov dword [0x100a320], eax
test eax, eax
je 0x10031f6
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [0x100a324], eax
test eax, eax
je 0x10031e9
cmp eax, 0xffffffff
je 0x10031e9
push 0x100eaa0
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x10031e9
mov eax, dword [0x100eaa4]
mov dword [ebp - 8], eax
mov dword [0x100eae4], eax
movsx eax, word [ebp - 8]
mov dword [ebp - 4], eax
cmp eax, esi
jbe 0x1003161
mov eax, esi
mov dword [ebp - 4], eax
test eax, eax
je 0x10031da
xor ecx, ecx
mov word [ebp - 8], cx
lea ecx, [ebp - 4]
push ecx
push dword [ebp - 8]
push eax
push edi
push dword [0x100a324]
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterW]
test eax, eax
jne 0x1003189
and dword [ebp - 4], eax
jmp 0x10031da
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
xor eax, eax
mov word [0x100eae4], ax
push dword [0x100eae4]
push dword [0x100a324]
call esi
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push ebx
call fcn.01002ac5
dec word [0x100eae6]
movsx eax, word [0x100eae6]
test eax, eax
jns 0x10031cc
xor eax, eax
mov word [0x100eae6], ax
push dword [0x100eae4]
push dword [0x100a324]
call esi
mov ecx, dword [ebp - 4]
xor eax, eax
mov word [ecx*2 + 0x1007320], ax
jmp 0x10031f6
call dword [sym.imp.KERNEL32.dll_FreeConsole]
or dword [0x100a324], 0xffffffff
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call fcn.01002c0e
xor ebx, ebx
mov esi, eax
cmp dword [ebp - 0xc], ebx
je 0x1003213
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [0x100a320], ebx
je 0x1003259
mov eax, dword [0x100a324]
cmp eax, ebx
je 0x1003253
cmp eax, 0xffffffff
je 0x1003253
cmp word [0x1007320], bx
je 0x1003253
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1003237
sub eax, edx
lea ecx, [ebp - 4]
sar eax, 1
push ecx
push eax
push edi
mov dword [ebp - 4], eax
call fcn.01002ac5
call dword [sym.imp.KERNEL32.dll_FreeConsole]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0x10
Function at 0x1003e43
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
xor ebx, ebx
push 0x10019e8
mov edi, 0x10019e0
push edi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x10], ebx
call fcn.01003bbd
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call esi
mov dword [ebp - 0x14], eax
cmp eax, ebx
jne 0x1003e95
push 0x10019c0
push 0x100198c
call fcn.01002af7
pop ecx
pop ecx
jmp 0x1003fa0
push 0x1001abc
push edi
call fcn.01003bbd
push eax
call esi
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x1003e7f
push 0x1001a9c
push edi
call fcn.01003bbd
push eax
call esi
mov dword [ebp - 0x18], eax
cmp eax, ebx
je 0x1003e7f
push 0x1001934
push edi
call fcn.01003bbd
push eax
call esi
mov dword [ebp - 0xc], eax
cmp eax, ebx
je 0x1003e7f
push 0x1001a8c
push edi
call fcn.01003bbd
push eax
call esi
mov esi, eax
cmp esi, ebx
je 0x1003e7f
push dword [ebp + 0xc]
xor edi, edi
push 0x20000
push ebx
inc edi
push edi
push 9
call dword [ebp - 0x14]
mov dword [ebp - 4], eax
cmp eax, ebx
jne 0x1003f16
xor eax, eax
call fcn.01003ca6
push eax
push dword [ebp + 0xc]
push 0x10018e8
jmp 0x1003f98
push ebx
lea eax, [ebp - 0x20]
push eax
push ebx
push ebx
push 3
push dword [ebp + 8]
push edi
call esi
test eax, eax
je 0x1003f88
push dword [ebp - 0x20]
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x1003f88
push ebx
lea ecx, [ebp - 0x20]
push ecx
push eax
push ebx
push 3
push dword [ebp + 8]
push edi
call esi
test eax, eax
je 0x1003f88
mov esi, 0x20007
jmp 0x1003f71
push eax
call dword [ebp - 0x18]
push dword [ebp + 0xc]
call fcn.01003339
push eax
push dword [ebp + 8]
push 0x1001a30
call fcn.01002af7
add esp, 0xc
push ebx
lea eax, [ebp - 0x20]
push eax
push esi
push ebx
push edi
push dword [ebp - 4]
call dword [ebp - 8]
cmp eax, ebx
jne 0x1003f54
mov dword [ebp - 0x10], edi
jmp 0x1003fa0
xor eax, eax
call fcn.01003ca6
push eax
push dword [ebp + 8]
push 0x10019f8
call fcn.01002af7
add esp, 0xc
cmp dword [ebp - 0x1c], ebx
je 0x1003faf
push dword [ebp - 0x1c]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
cmp dword [ebp - 4], ebx
je 0x1003fbb
push ebx
push dword [ebp - 4]
call dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x1004561
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
push edi
xor ebx, ebx
push 0x10020e0
mov edi, 0x10019e0
push edi
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x34], 0x10020d8
mov dword [ebp - 0x30], 0x1001ad8
mov dword [ebp - 0x3c], 0xe
mov dword [ebp - 0x38], 0x10019d0
mov dword [ebp - 0xc], ebx
call fcn.01003bbd
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call esi
mov dword [ebp - 0x14], eax
cmp eax, ebx
jne 0x10045cc
push 0x10019c0
push 0x100198c
call fcn.01002af7
pop ecx
pop ecx
jmp 0x100471b
push 0x10019e8
push edi
call fcn.01003bbd
push eax
call esi
mov dword [ebp - 0x18], eax
cmp eax, ebx
je 0x10045b6
push 0x1001934
push edi
call fcn.01003bbd
push eax
call esi
mov dword [ebp - 0x28], eax
cmp eax, ebx
je 0x10045b6
push 0x10020b4
push edi
call fcn.01003bbd
push eax
call esi
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x10045b6
push 0x1001968
push edi
call fcn.01003bbd
push eax
call esi
mov dword [ebp - 0x20], eax
cmp eax, ebx
je 0x10045b6
push 0x1001aec
push edi
call fcn.01003bbd
push eax
call esi
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x10045b6
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 8]
push eax
push ebx
push 0x40
push dword [ebp + 8]
call dword [ebp - 0x14]
test eax, eax
jne 0x100465e
call fcn.01003ca6
push eax
push 0x1002084
jmp 0x10045c0
push 0x70
push 1
push ebx
push 0x1001ec0
lea eax, [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1004688
call fcn.01003ca6
push eax
push 0x1002040
call fcn.01002af7
pop ecx
pop ecx
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 4]
mov esi, dword [ebp + eax*4 - 0x34]
push esi
push 0x20000
push ebx
push 1
push 9
call dword [ebp - 0x18]
mov edi, eax
cmp edi, ebx
je 0x1004707
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp + 8]
push 3
push dword [eax + 8]
push dword [eax + 4]
push 1
push edi
call dword [ebp - 0x1c]
test eax, eax
jne 0x10046d9
call fcn.01003ca6
push eax
push esi
call fcn.01003339
push eax
push 0x1002004
call fcn.01002af7
add esp, 0xc
lea eax, [ebp - 0x3c]
push eax
push ebx
push 0xb
push dword [ebp - 0xc]
call dword [ebp - 0x20]
test eax, eax
jne 0x10046fc
call fcn.01003ca6
push eax
push 0x10018a8
call fcn.01002af7
pop ecx
pop ecx
push dword [ebp - 0xc]
call dword [ebp - 0x24]
push ebx
push edi
call dword [ebp - 0x28]
inc dword [ebp - 4]
cmp dword [ebp - 4], 2
jb 0x100468b
mov dword [ebp - 4], 1
cmp dword [ebp - 0x10], ebx
je 0x100472f
cmp dword [ebp - 8], ebx
je 0x100472f
push ebx
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x102926f
Capabilities:
Identify system language via api

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x104c17c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edi, edi
inc edi
mov esi, ecx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], edi
test ebx, ebx
je 0x102938f
push 0x10028d0
push ebx
call fcn.010329d3
test eax, eax
jne 0x1029310
push ebx
push dword [esi + 0x40]
call fcn.010329d3
test eax, eax
jne 0x102938f
mov eax, dword [esi + 0x40]
test eax, eax
je 0x10292cc
push eax
call fcn.0103d416
and dword [esi + 0x40], 0
pop ecx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
call ebx
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0103d496
pop ecx
mov dword [esi + 0x40], eax
test eax, eax
je 0x102930a
push dword [ebp - 0x4c]
push dword [ebp - 0x4c]
call ebx
inc eax
push eax
push dword [esi + 0x40]
call fcn.01011d82
or dword [esi + 0x68], 0x10
jmp 0x1029381
and dword [ebp - 0x48], 0
jmp 0x102938f
xor ebx, ebx
push 0x3c
lea eax, [ebp - 0x40]
push ebx
push eax
mov dword [ebp - 0x44], ebx
call sub.msvcrt.dll_memset
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultUILanguage]
movzx eax, ax
push eax
push 0x1005014
lea eax, [ebp - 0x44]
push 0x20
push eax
call fcn.01022a0f
add esp, 0x10
lea eax, [ebp - 0x44]
push eax
push dword [esi + 0x40]
call fcn.010329d3
test eax, eax
jne 0x102938f
mov eax, dword [esi + 0x40]
cmp eax, ebx
je 0x1029362
push eax
call fcn.0103d416
pop ecx
mov dword [esi + 0x40], ebx
push 0x40
call fcn.0103d496
pop ecx
mov dword [esi + 0x40], eax
cmp eax, ebx
je 0x102938c
and dword [esi + 0x68], 0xffffffef
lea ecx, [ebp - 0x44]
push ecx
push 0x20
push eax
call fcn.01011d82
mov dword [esi + 0x74], edi
mov dword [esi + 0x6c], edi
mov dword [esi + 0x70], edi
jmp 0x102938f
mov dword [ebp - 0x48], ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x48]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0103d865
leave
ret 4
Function at 0x102baf7
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
push 1
mov dword [ebp - 8], eax
call fcn.0102b6c3
mov ecx, eax
call fcn.01028fac
mov esi, dword [sym.imp.msvcrt.dll__wfopen]
mov edi, dword [sym.imp.msvcrt.dll_fclose]
mov ebx, eax
test ebx, ebx
je 0x102bba8
call fcn.01036be4
cmp eax, 1
jne 0x102bba8
push 0x100517c
push ebx
call esi
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
test eax, eax
je 0x102bb65
push eax
push 1
lea eax, [ebp - 4]
push 2
push eax
mov byte [ebp - 4], 0xff
mov byte [ebp - 3], 0xfe
call dword [sym.imp.msvcrt.dll_fwrite]
push dword [ebp - 0xc]
call edi
add esp, 0x14
push 0x1005174
push ebx
call esi
pop ecx
pop ecx
mov ecx, dword [ebp + 8]
test eax, eax
jne 0x102bb8d
push 0xac6e
call fcn.0102b6bb
mov ecx, eax
call fcn.010129b1
and dword [ebp - 8], 0
jmp 0x102bb9c
push 1
push eax
call fcn.0102b6c3
mov ecx, eax
call fcn.01028fce
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
jne 0x102bc8a
cmp dword [ebp + 0x10], 0
jne 0x102bc8a
mov ecx, dword [ebp + 8]
push 0
call fcn.0102b6c3
mov ecx, eax
call fcn.01028fac
mov dword [ebp + 0x10], eax
test eax, eax
je 0x102bc8a
call fcn.01036c4b
cmp eax, 1
jne 0x102bc8a
push 0x1005170
push dword [ebp + 0x10]
call esi
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x102bc10
push ebx
call fcn.01032d02
mov ecx, dword [ebp + 8]
push eax
call fcn.0102b6c3
mov ecx, eax
call fcn.0101299a
push ebx
call edi
mov dword [esp], 0x1005174
jmp 0x102bc56
push 0x100517c
push dword [ebp + 0x10]
call esi
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x102bc51
push ebx
push 1
lea eax, [ebp + 0xc]
push 2
push eax
mov byte [ebp + 0xc], 0xff
mov byte [ebp + 0xd], 0xfe
call dword [sym.imp.msvcrt.dll_fwrite]
mov ecx, dword [ebp + 8]
add esp, 0x10
push 1
call fcn.0102b6c3
mov ecx, eax
call fcn.0101299a
push ebx
call edi
pop ecx
push 0x1005174
push dword [ebp + 0x10]
call esi
pop ecx
pop ecx
mov ecx, dword [ebp + 8]
test eax, eax
jne 0x102bc7b
push 0xac6d
call fcn.0102b6bb
mov ecx, eax
call fcn.010129b1
and dword [ebp - 8], 0
jmp 0x102bc8a
push 0
push eax
call fcn.0102b6c3
mov ecx, eax
call fcn.01028fce
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x1032d02
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
push dword [ebp + 8]
xor eax, eax
mov byte [ebp - 4], 0
lea edi, [ebp - 3]
push 1
stosb byte es:[edi], al
lea eax, [ebp - 4]
push 2
push eax
xor esi, esi
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
test eax, eax
je 0x1032d6a
mov ax, word [ebp - 4]
mov ecx, 0x1005584
cmp ax, word [ecx]
jne 0x1032d3f
inc esi
jmp 0x1032d5a
mov ecx, 0x1005580
cmp ax, word [ecx]
jne 0x1032d4d
push 2
jmp 0x1032d59
mov ecx, 0x100557c
cmp ax, word [ecx]
jne 0x1032d5a
push 3
pop esi
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
pop edi
mov eax, esi
pop esi
leave
ret 4
Function at 0x103313e
Capabilities:
Manipulate console buffer

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
and dword [ebp - 4], 0
push 0x800
call fcn.0103d496
pop ecx
mov dword [ebp - 8], eax
test eax, eax
je 0x103320d
push esi
push edi
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
mov esi, dword [ebp + 8]
movsx ecx, word [esi + 6]
movsx eax, word [ebp - 0x1a]
sub eax, ecx
movsx ecx, word [ebp - 0xe]
imul eax, ecx
movsx ecx, word [esi + 4]
sub eax, ecx
movsx ecx, word [ebp - 0x1c]
add eax, ecx
mov ecx, 0x400
mov dword [ebp - 4], eax
cmp eax, ecx
jbe 0x10331a8
mov eax, ecx
mov dword [ebp - 4], eax
add eax, eax
push eax
push 0
push dword [ebp - 8]
call sub.msvcrt.dll_memset
add esp, 0xc
cmp edi, 0xffffffff
je 0x10331c9
movsx eax, word [esi + 0x10]
movsx ecx, word [esi + 0xc]
sub eax, ecx
jmp 0x10331cb
xor eax, eax
test eax, eax
jle 0x1033202
xor eax, eax
mov word [ebp + 8], ax
mov ax, word [esi + 6]
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
mov word [ebp + 0xa], ax
push dword [ebp + 8]
push edi
call esi
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
push dword [ebp + 8]
push edi
call esi
push dword [ebp - 8]
call fcn.0103d416
pop ecx
pop edi
pop esi
leave
ret 4
Function at 0x10333c5
Capabilities:
Resolve dns

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0x10]
and dword [ebp - 4], 0
mov dword [eax], 1
mov eax, dword [ebp + 8]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x10333e0
sub eax, ecx
push ebx
sar eax, 1
push esi
lea esi, [eax + eax + 2]
push esi
call fcn.0103d496
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x103340b
mov eax, 0x80041006
jmp 0x10334d0
push esi
push dword [ebp + 8]
push ebx
call dword [sym.imp.msvcrt.dll_wcstombs]
add esp, 0xc
cmp eax, 0xffffffff
jne 0x1033427
push ebx
call fcn.0103d416
pop ecx
jmp 0x1033401
push edi
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x24]
rep stosd dword es:[edi], eax
inc eax
push 0x17
pop edi
cmp dword [ebp + 0x14], eax
jne 0x1033444
mov dword [ebp - 0x20], 2
jmp 0x1033453
cmp dword [ebp + 0x14], 2
jne 0x103344f
mov dword [ebp - 0x20], edi
jmp 0x1033453
and dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
push 0
push ebx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
push ebx
mov esi, eax
call fcn.0103d416
pop ecx
test esi, esi
je 0x1033478
mov eax, esi
jmp 0x10334cf
mov eax, dword [ebp - 4]
xor esi, esi
test eax, eax
je 0x10334b6
mov ecx, dword [eax + 4]
cmp ecx, edi
je 0x1033496
cmp ecx, 2
je 0x10334a9
mov eax, dword [eax + 0x1c]
test eax, eax
jne 0x1033481
jmp 0x10334b6
mov ecx, dword [ebp + 0x10]
and dword [ecx], 0
mov esi, dword [eax + 0x18]
mov edi, dword [ebp + 0xc]
push 7
pop ecx
rep movsd dword es:[edi], dword [esi]
jmp 0x10334b3
mov esi, dword [eax + 0x18]
mov edi, dword [ebp + 0xc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor esi, esi
inc esi
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov eax, esi
neg eax
sbb eax, eax
and eax, 0xfffffb18
add eax, 0x4e8
pop edi
pop esi
pop ebx
leave
ret 0x10