joyce8/EMBER2024-capa huggingface dataset:
Function at 0x427115
Capabilities:
Query environment variable

Disassembly:
push ebx
xor eax, eax
push eax
push eax
push eax
push eax
call fcn.0048d6d0
push dword [esp + 0x1c]
call fcn.0042e610
mov edx, dword [esp + 0x18]
lea ecx, [esp]
call fcn.0042e000
push edx
call fcn.0048d530
pop edx
push eax
push edx
call fcn.0048d530
pop edx
push eax
push 0x3e8
call fcn.0048ad40
call fcn.0048d660
lea eax, [esp + 8]
push eax
call fcn.0048d5d0
push 0x3e8
mov eax, dword [esp + 8]
push eax
mov eax, 0x5d8c18
push eax
call sub.KERNEL32.dll_GetEnvironmentVariableW
mov edx, 0x5cf064
lea ecx, [esp + 8]
call fcn.0042e008
push edx
call fcn.0048d530
pop edx
push eax
push 0xe
mov edx, dword [esp + 0xc]
push edx
call fcn.0048d530
pop edx
push eax
push edx
call fcn.0048d570
mov edx, str.System32
push edx
call fcn.0048d570
call fcn.0048d660
push edx
call fcn.0048d530
pop edx
push eax
mov edx, 0x5d2c52
push edx
call fcn.0048d570
mov edx, dword [esp + 0x10]
push edx
call fcn.0048d570
call fcn.0048d660
mov edx, dword [esp + 0x14]
push edx
call fcn.0048d530
pop edx
push eax
push edx
call fcn.0048d570
mov edx, str.System32cmd.exe
push edx
call fcn.0048d570
call fcn.0042e5e2
add dword [esp], edx
call fcn.0042e5e2
add dword [esp + 4], edx
call fcn.0042e5e2
add dword [esp + 8], edx
call fcn.0044d0de
call fcn.0042e610
mov dword [esp + 0xc], eax
cmp dword [esp + 0xc], 0
je 0x4272a3
push dword [esp + 0xc]
call fcn.0044d643
and eax, eax
je 0x42729a
push dword [esp + 0xc]
call fcn.0044d68a
and eax, eax
je 0x427298
mov edx, dword [esp + 8]
push edx
call fcn.0048d530
pop edx
push eax
push edx
call fcn.0048d570
push edx
call fcn.0048d530
pop edx
push eax
push edx
call fcn.0048d530
pop edx
push eax
push edx
call fcn.0048d530
pop edx
push eax
push 0x18
push dword [esp + 0x20]
call fcn.0044d6b0
call fcn.0042e5e2
add dword [esp], edx
call fcn.00415ad9
pop eax
mov edx, 0x5dbb02
push edx
call fcn.0048d570
lea eax, [esp + 0xc]
push eax
call fcn.0048d5d0
jmp 0x427223
push dword [esp + 0xc]
call fcn.0044d71d
mov edx, dword [esp + 8]
push edx
call fcn.0048d530
pop edx
push eax
push edx
call fcn.0048d570
pop eax
push eax
call fcn.0042e5d0
pop edx
add eax, edx
jmp 0x4272cb
push dword [esp]
call fcn.0048d760
push dword [esp + 4]
call fcn.0048d760
push dword [esp + 8]
call fcn.0048d760
add esp, 0x10
pop ebx
ret 4
Function at 0x42fe98
Capabilities:
Create thread

Disassembly:
push ecx
push ebp
push esi
lea eax, [esp + 8]
xor esi, esi
push eax
push esi
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebp, eax
test ebp, ebp
je 0x42ff30
push edi
push 0x973f74
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0x8fa27c]
test edi, edi
je 0x42ff04
push ebx
push esi
lea ebx, [edi + 8]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x42fefd
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi]
push ebx
push 0x8fa27c
call fcn.0048d415
pop ecx
pop ecx
jmp 0x42feff
mov edi, dword [edi]
test edi, edi
jne 0x42fed4
pop ebx
mov eax, dword [0x8f40e8]
mov esi, eax
inc eax
push 0x10
push 0x8fa27c
mov dword [0x8f40e8], eax
call fcn.0048d455
pop ecx
pop ecx
push 0x973f74
mov dword [eax], ebp
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebp
pop ecx
ret 8
Function at 0x432b0e
Capabilities:
Enumerate gui resources

Disassembly:
cmp dword [esp + 4], 0
push ebx
push esi
push edi
je 0x432b63
push dword [esp + 0x10]
push 0x432a8d
call dword [sym.imp.USER32.dll_EnumWindows]
mov esi, dword [0x8fa498]
test esi, esi
je 0x432bbc
xor edi, edi
mov ebx, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 8], eax
jne 0x432b5b
cmp byte [esi + 0x10], 0
je 0x432b5b
push 3
push edi
push edi
push edi
push edi
push 0xfffffffffffffffe
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_SetWindowPos]
mov esi, ebx
test ebx, ebx
jne 0x432b37
jmp 0x432bbc
mov esi, dword [0x8fa498]
test esi, esi
je 0x432bbc
xor edi, edi
push ebp
mov ebx, dword [esi]
lea ebp, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp], eax
jne 0x432bb5
cmp byte [esi + 0x11], 0
je 0x432b91
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp byte [esi + 0x10], 0
je 0x432ba8
push 3
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_SetWindowPos]
push ebp
push 0x8fa498
call fcn.0048d415
pop ecx
pop ecx
mov esi, ebx
test ebx, ebx
jne 0x432b70
pop ebp
pop edi
pop esi
pop ebx
ret 4
Function at 0x44cea1
Capabilities:
Accept command line arguments

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
push edi
push dword [0x973fa0]
call fcn.0048caa6
mov ebp, eax
or ebx, 0xffffffff
xor eax, eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, dword [esp + 0x1c]
movzx edx, word [eax]
test dx, dx
je 0x44cfa1
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], 0x20
mov dword [esp + 0x14], 0x22
cmp dx, word [esp + 0x10]
jne 0x44cef7
push 0x20
pop edx
add eax, 2
cmp word [eax], dx
je 0x44ceef
movzx edx, word [eax]
mov dword [esp + 0x1c], 1
cmp dx, word [esp + 0x14]
jne 0x44cf37
add eax, 2
mov esi, eax
movzx ecx, word [eax]
test cx, cx
je 0x44cf79
push 0x22
pop edx
cmp cx, dx
je 0x44cf29
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x44cf19
xor ecx, ecx
cmp word [eax], cx
je 0x44cf79
mov ecx, eax
add eax, 2
jmp 0x44cf7b
test dx, dx
je 0x44cf81
push 0x20
mov esi, eax
pop ecx
cmp dx, cx
je 0x44cf29
add eax, 2
push 0x22
pop edx
cmp word [eax], dx
jne 0x44cf6f
add eax, 2
movzx ecx, word [eax]
test cx, cx
je 0x44cf79
cmp cx, dx
je 0x44cf6c
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x44cf5c
push 0x20
pop ecx
movzx edx, word [eax]
test dx, dx
jne 0x44cf41
jmp 0x44cf29
mov ecx, eax
mov edx, dword [esp + 0x1c]
jmp 0x44cf83
xor edx, edx
cmp dword [ebp], ebx
jne 0x44cf8c
test edi, edi
jne 0x44cfa9
test edx, edx
je 0x44cf91
inc ebx
xor edx, edx
mov esi, edx
movzx edx, word [eax]
test dx, dx
jne 0x44cee5
test edi, edi
jne 0x44cfba
mov eax, ebx
jmp 0x44cfbe
test esi, esi
je 0x44cfba
sub ecx, esi
mov eax, esi
sar ecx, 1
mov dword [edi], ecx
inc dword [ebp]
jmp 0x44cfbe
xor ecx, ecx
mov dword [edi], ecx
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
Function at 0x44d7b0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
mov eax, 0x1000
push ebx
push ebp
push esi
push edi
xor edi, edi
xor ebp, ebp
cmp dword [esp + 0x24], 0x18
mov ebx, eax
je 0x44d86f
cmp dword [esp + 0x24], 2
je 0x44d86f
push 0x2000
push ebp
push dword [0x8f9998]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
jmp 0x44d83e
cmp dword [esp + 0x18], 2
jne 0x44d85a
cmp dword [esp + 0x28], 0xffffffff
je 0x44d802
cmp ebp, dword [esp + 0x28]
jae 0x44d85a
add ebp, 2
test ebx, ebx
jne 0x44d827
lea eax, [edi*2 + 0x2000]
push eax
push esi
push 8
push dword [0x8f9998]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov esi, eax
mov ebx, 0x1000
mov ax, word [esp + 0x14]
cmp ax, 0xa
je 0x44d85a
cmp ax, 0xd
je 0x44d83e
mov word [esi + edi*2], ax
inc edi
dec ebx
push 0
lea eax, [esp + 0x1c]
push eax
push 2
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x44d7ee
push dword [esp + 0x2c]
xor eax, eax
push esi
mov word [esi + edi*2], ax
call fcn.0058e290
jmp 0x44d901
push eax
push 0
push dword [0x8f9998]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
cmp dword [esp + 0x28], 0xffffffff
je 0x44d88d
cmp ebp, dword [esp + 0x28]
jae 0x44d8e5
push 0
lea eax, [esp + 0x1c]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x44d8e5
cmp dword [esp + 0x18], 1
jne 0x44d8e5
inc ebp
test ebx, ebx
jne 0x44d8d2
lea eax, [edi + 0x1000]
push eax
push esi
push 8
push dword [0x8f9998]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov esi, eax
mov ebx, 0x1000
mov al, byte [esp + 0x13]
cmp al, 0xa
je 0x44d8e5
cmp al, 0xd
je 0x44d880
mov byte [esi + edi], al
inc edi
dec ebx
jmp 0x44d880
cmp dword [esp + 0x24], 0x18
push dword [esp + 0x2c]
mov byte [esi + edi], 0
push esi
jne 0x44d8fc
call fcn.0058e2e0
jmp 0x44d901
call fcn.0058e230
push esi
push 0
push dword [0x8f9998]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x10
Function at 0x44e2d1
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
push esi
push 0x44e220
push 0x10
push 0x2c
call fcn.0048d257
xor esi, esi
mov dword [0x8fa4b4], eax
push esi
push esi
push 8
call fcn.0048cb11
mov dword [0x973fc8], eax
cmp word [0x8fa4ac], si
jne 0x44e3ba
push edi
lea eax, [esp + 8]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
xor edi, edi
inc edi
test eax, eax
jne 0x44e329
mov word [0x8fa4ac], di
jmp 0x44e331
xor eax, eax
mov word [0x8fa4ac], ax
push 0x800
push esi
push str.ws2_32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [0x8fa4c8], eax
test eax, eax
je 0x44e3b9
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.getaddrinfo
push eax
call esi
push str.freeaddrinfo
push dword [0x8fa4c8]
mov dword [0x8fa4b8], eax
call esi
push str.getnameinfo
push dword [0x8fa4c8]
mov dword [0x8fa4bc], eax
call esi
push str.WSAStringToAddressA
push dword [0x8fa4c8]
mov dword [0x8fa4c0], eax
call esi
cmp dword [0x8fa4b8], 0
mov dword [0x8fa4c4], eax
je 0x44e3b9
cmp dword [0x8fa4bc], 0
je 0x44e3b9
cmp dword [0x8fa4c0], 0
je 0x44e3b9
test eax, eax
je 0x44e3b9
mov dword [0x8fa4b0], edi
pop edi
pop esi
add esp, 0x190
ret

Function at 0x44ebc8
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
push edi
xor edi, edi
mov ebp, edi
cmp dword [esp + 0x10], edi
je 0x44ec4e
push esi
push edi
push pe_nt_image_headers32
push 3
push edi
push 1
push closesocket
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
test esi, esi
je 0x44ec4d
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
push edi
push dword [0x8f9998]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x44ec45
push ebp
lea eax, [esp + 0x1c]
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x18], ebx
jne 0x44ec36
push ebx
push edi
push dword [esp + 0x1c]
call fcn.0044f072
mov ebp, eax
push edi
push 0
push dword [0x8f9998]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop esi
pop edi
mov eax, ebp
pop ebp
ret 8
Function at 0x44ec55
Capabilities:
Create thread

Disassembly:
push ecx
push ecx
push ebx
push ebp
push edi
push dword [esp + 0x18]
xor ebp, ebp
push dword [0x973fcc]
mov ebx, ebp
call fcn.0048d184
mov edi, eax
test edi, edi
je 0x44ed14
push esi
push dword [esp + 0x1c]
call fcn.0044edf5
mov esi, dword [edi + 8]
lea eax, [esp + 0x14]
push ebp
push ebp
push ebp
push eax
lea eax, [esp + 0x20]
mov dword [edi + 4], 1
mov ecx, dword [esi]
push eax
mov eax, dword [edi + 0xc]
cdq
sub eax, edx
sar eax, 1
push eax
push ebp
push esi
call dword [ecx + 0x2c]
pop esi
test eax, eax
jne 0x44ecd7
mov eax, dword [edi + 0xc]
cdq
sub eax, edx
sar eax, 1
push eax
push dword [esp + 0x10]
push dword [edi]
call fcn.0044eff0
mov eax, dword [edi + 8]
add esp, 0xc
mov ecx, dword [eax]
push ebp
push ebp
push dword [esp + 0x18]
push dword [esp + 0x18]
push eax
call dword [ecx + 0x4c]
lea eax, [esp + 0x18]
push eax
push ebp
push edi
push 0x44ed1e
push 0x2000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x44ecfd
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
inc ebx
mov eax, dword [edi + 8]
push ebp
push eax
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov ecx, dword [edi + 8]
push 1
push ebp
push ebp
mov edx, dword [ecx]
push ecx
call dword [edx + 0x30]
pop edi
pop ebp
mov eax, ebx
pop ebx
pop ecx
pop ecx
ret 4
Function at 0x46e190
Capabilities:
Get thread local storage value

Disassembly:
cmp dword [0x9725e4], 0
jne 0x46e19e
call fcn.0046e130
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
push dword [0x9725e8]
call esi
test eax, eax
jne 0x46e1c1
call fcn.0046e130
push dword [0x9725e8]
call esi
mov edx, dword [esp + 0x14]
lea esi, [eax + 8]
mov edi, 0x11
lea ecx, [ecx]
imul ecx, edx, 0x53a9b4fb
lea esi, [esi + 4]
mov edx, 1
sub edx, ecx
imul ecx, edx, 0x53a9b4fb
mov dword [esi + 0x40], edx
mov edx, 1
sub edx, ecx
mov dword [esi - 4], edx
dec edi
jne 0x46e1d0
mov dword [eax], edi
lea ebp, [edi + 0x1f]
mov dword [eax + 4], 0xa
mov ebx, dword [eax]
mov edi, dword [eax + 4]
mov edx, dword [eax + ebx*4 + 8]
mov ecx, dword [eax + ebx*4 + 0x4c]
mov esi, dword [eax + edi*4 + 8]
ror ecx, 0xd
add ecx, dword [eax + edi*4 + 0x4c]
dec edi
ror edx, 5
add edx, esi
mov dword [eax + ebx*4 + 8], ecx
mov dword [eax + ebx*4 + 0x4c], edx
dec ebx
jns 0x46e230
mov ebx, 0x10
test edi, edi
jns 0x46e239
mov edi, 0x10
mov dword [eax], ebx
mov dword [eax + 4], edi
dec ebp
jne 0x46e202
pop edi
pop esi
pop ebp
pop ebx
ret 4
Function at 0x46f2f0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x46f32c
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4

Function at 0x46f7e0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
mov dword [esp + 4], 0
test esi, esi
je 0x46f845
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x46f83d
push dword [esp + 0x10]
push dword [0x974314]
call fcn.0048d184
test eax, eax
je 0x46f833
cmp dword [eax + 4], 0
je 0x46f822
push edi
push esi
push eax
call fcn.0046fd40
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea ecx, [esp + 0xc]
push ecx
push edi
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
pop edi
xor eax, eax
pop esi
pop ecx
ret 0xc
xor eax, eax
pop esi
pop ecx
ret 0xc

Function at 0x46f8d0
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push esi
push dword [esp + 0x10]
mov dword [esp + 8], 0
push dword [0x974314]
call fcn.0048d184
mov esi, eax
test esi, esi
je 0x46f94f
cmp dword [esi + 4], 0
je 0x46f920
push 1
lea eax, [esp + 8]
push eax
push esi
call fcn.0046fe50
test eax, eax
je 0x46f914
inc dword [esi + 0xc]
xor eax, eax
pop esi
add esp, 8
ret 4
mov eax, 1
pop esi
add esp, 8
ret 4
push 0
lea eax, [esp + 0xc]
push eax
push 1
lea eax, [esp + 0x1c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46f95a
cmp dword [esp + 8], 0
je 0x46f95a
push 1
push 0
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret 4
or eax, 0xffffffff
pop esi
add esp, 8
ret 4
Function at 0x46fa80
Capabilities:
Write file on windows

Disassembly:
push ecx
mov edx, dword [esp + 0xc]
mov dword [esp], 0
test edx, edx
je 0x46fb88
cmp word [edx], 0
je 0x46fb88
mov ecx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0xc]
test ecx, ecx
jne 0x46faae
mov ecx, dword [esi + 0x18]
push edi
cmp ecx, 0x19
jne 0x46fb0d
cmp dword [esi + 4], 0
mov ecx, edx
lea edi, [ecx + 2]
je 0x46fae0
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46fac0
sub ecx, edi
sar ecx, 1
lea eax, [ecx + ecx]
push eax
push edx
push esi
call fcn.0046fd40
pop edi
pop esi
pop ecx
ret 0xc
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46fae0
sub ecx, edi
lea eax, [esp + 8]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
push edx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
xor eax, eax
cmp ecx, 2
lea ecx, [esp + 0x14]
setne al
push ecx
dec eax
and eax, 0xfde9
push edx
push eax
call fcn.00470420
mov edi, eax
test edi, edi
je 0x46fb03
cmp dword [esi + 4], 0
je 0x46fb5b
push dword [esp + 0x14]
push edi
push esi
call fcn.0046fd40
push edi
push 0
push dword [0x8f9998]
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x1c]
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
push 0
push dword [0x8f9998]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
xor eax, eax
pop ecx
ret 0xc
Function at 0x46ff70
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x8f9998]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x4700f4
mov cl, byte [esp + 3]
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x46ffbe
test ebp, ebp
je 0x470060
dec ebp
cmp dword [ebx + 4], 0
je 0x46ffd7
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.0046fe50
mov dword [esp + 0x14], eax
jmp 0x46fff1
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov cl, byte [esp + 0x13]
cmp eax, 1
jne 0x470060
test cl, cl
je 0x470005
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x13]
mov eax, dword [esp + 0x18]
mov edi, esi
mov edx, dword [esp + 0x20]
dec eax
sub edi, edx
cmp edi, eax
jle 0x470040
mov eax, dword [esp + 0x18]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x8f9998]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x20], edx
lea esi, [edi + edx]
test cl, cl
je 0x470060
cmp dword [esp + 0x2c], 0
jne 0x46ffb0
cmp cl, 0xd
je 0x470067
cmp cl, 0xa
jne 0x46ffb0
dec esi
jmp 0x4700d7
cmp dword [esp + 0x2c], 0
jne 0x4700d7
cmp cl, 0xa
jne 0x47006f
dec esi
jmp 0x4700d7
cmp cl, 0xd
jne 0x4700d7
dec esi
cmp dword [ebx + 4], 0
je 0x47008e
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.0046fe50
mov dword [esp + 0x14], eax
jmp 0x4700a4
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x4700d7
cmp dword [ebx + 4], 0
je 0x4700b6
inc dword [ebx + 0xc]
jmp 0x4700d7
push 1
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x20]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x470100
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push 0x1000
push 0
push dword [0x8f9998]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov dword [esp + 8], ecx
test ecx, ecx
je 0x4702ad
mov ax, word [esp]
push ebx
mov ebx, dword [esp + 0x20]
push ebp
mov ebp, dword [esp + 0x2c]
push esi
push edi
mov edi, ecx
mov dword [esp + 0x20], 0x1000
mov dword [esp + 0x1c], 0x7ff
cmp ebp, 0xffffffff
je 0x470154
test ebp, ebp
je 0x47020d
dec ebp
cmp dword [ebx + 4], 0
je 0x47016d
push 2
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.0046fe50
mov dword [esp + 0x14], eax
jmp 0x470187
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
cmp eax, 2
mov ax, word [esp + 0x10]
jne 0x47020d
test ax, ax
je 0x4701a1
mov word [edi], ax
add edi, 2
mov ax, word [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov esi, edi
mov edx, dword [esp + 0x1c]
sub esi, ecx
sar esi, 1
cmp esi, edx
jle 0x4701e8
mov eax, dword [esp + 0x20]
add edx, 0x800
add eax, 0x1000
mov dword [esp + 0x1c], edx
push eax
push ecx
push 8
push dword [0x8f9998]
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, eax
mov ax, word [esp + 0x10]
mov dword [esp + 0x18], ecx
lea edi, [ecx + esi*2]
test ax, ax
je 0x47020d
cmp dword [esp + 0x30], 0
jne 0x470146
cmp ax, 0xd
je 0x470214
cmp ax, 0xa
jne 0x470146
sub edi, 2
jmp 0x47028c
cmp dword [esp + 0x30], 0
jne 0x47028c
cmp ax, 0xa
jne 0x47021f
sub edi, 2
jmp 0x47028c
cmp ax, 0xd
jne 0x47028c
sub edi, 2
cmp dword [ebx + 4], 0
je 0x470241
push 2
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.0046fe50
mov dword [esp + 0x14], eax
jmp 0x470257
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x10], 0xa
je 0x47028c
cmp dword [ebx + 4], 0
je 0x47026b
add dword [ebx + 0xc], 2
jmp 0x47028c
push 1
lea eax, [esp + 0x28]
mov dword [esp + 0x24], 0xfffffffe
push eax
push 0xfffffffffffffffe
push dword [ebx]
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x38]
mov ecx, edi
sub ecx, dword [esp + 0x18]
sar ecx, 1
mov dword [eax], ecx
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
xor eax, eax
add esp, 0x18
ret 0x10
Function at 0x4702c0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x8f9998]
mov dword [esp + 0x10], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0xc], edx
test edx, edx
je 0x470410
mov eax, dword [esp + 0x1c]
mov cl, byte [esp + 3]
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, edx
cmp edi, 0xffffffff
je 0x47030c
test edi, edi
je 0x47037d
dec edi
push esi
push ebp
call fcn.00470490
mov dword [esp + 0x20], eax
test eax, eax
jne 0x47031f
xor cl, cl
jmp 0x470321
mov cl, byte [esi]
mov edx, dword [esp + 0x1c]
add esi, eax
mov eax, dword [esp + 0x14]
mov ebx, esi
sub ebx, edx
mov byte [esp + 0x13], cl
add eax, 0xfffffffb
cmp ebx, eax
jle 0x470364
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x8f9998]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [ebx + edx]
mov eax, dword [esp + 0x2c]
test cl, cl
je 0x47037d
test eax, eax
jne 0x470302
cmp cl, 0xd
je 0x470381
cmp cl, 0xa
jne 0x470302
dec esi
jmp 0x4703f3
test eax, eax
jne 0x4703f3
cmp cl, 0xa
jne 0x470389
dec esi
jmp 0x4703f3
cmp cl, 0xd
jne 0x4703f3
dec esi
cmp dword [ebp + 4], 0
je 0x4703a8
push 1
lea eax, [esp + 0x17]
push eax
push ebp
call fcn.0046fe50
mov dword [esp + 0x20], eax
jmp 0x4703bf
push 0
lea eax, [esp + 0x24]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x4703f3
cmp dword [ebp + 4], 0
je 0x4703d1
inc dword [ebp + 0xc]
jmp 0x4703f3
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebp]
mov dword [esp + 0x28], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x1c]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10