joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401010
Capabilities:
Check if file exists
Delete file
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x430f98
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x43e0b0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp eax, ebx
je 0x401194
cmp word [eax], bx
je 0x401194
cmp edi, ebx
je 0x401194
cmp word [edi], bx
je 0x401194
push 0x2000
mov dword [ebp - 0x20], ebx
call fcn.0041e974
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x401194
mov eax, dword [0x43e060]
mov edx, dword [eax + 0xc]
mov ecx, 0x43e060
mov dword [ebp - 0x38], vtable.CWininetFile.0
call edx
add eax, 0x10
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], ebx
push edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4010d8
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4010d8
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
push 0x20
push 2
push ebx
push 2
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40116e
mov eax, dword [ebp + 8]
push ebx
push eax
lea ecx, [ebp - 0x38]
call fcn.00401230
test eax, eax
je 0x401167
lea ecx, [ebp - 0x14]
push ecx
push 0x2000
push esi
lea ecx, [ebp - 0x38]
call fcn.00401420
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x401159
lea ecx, [ecx]
add dword [ebp - 0x18], eax
push ebx
lea edx, [ebp - 0x1c]
push edx
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x1c]
jne 0x401167
push ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x14]
push ecx
push 0x2000
push esi
lea ecx, [ebp - 0x38]
call fcn.00401420
mov eax, dword [ebp - 0x14]
cmp eax, ebx
jne 0x401120
mov eax, dword [ebp - 0x18]
xor edx, edx
cmp eax, dword [ebp - 0x28]
sete dl
mov dword [ebp - 0x20], edx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.0041ea08
add esp, 4
lea ecx, [ebp - 0x38]
call fcn.00401200
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401230
Capabilities:
Check http status code
Check internet connectivity via wininet
Create http request
Get http content length
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x43b088
push 0x421660
mov eax, dword fs:[0]
push eax
sub esp, 0x264
mov eax, dword [0x43e0b0]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edx, ecx
mov dword [ebp - 0x54], edx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x4c], ecx
xor ebx, ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x40], ebx
mov ecx, 8
mov esi, str.Accept:___r_n_r_n
lea edi, [ebp - 0x3c]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
mov dword [ebp - 0x60], ecx
xor esi, esi
xor edi, edi
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x50], 4
cmp eax, ecx
jne 0x4012b2
xor eax, eax
jmp 0x401402
mov eax, dword [edx]
mov ecx, edx
mov edx, dword [eax + 0xc]
call edx
mov dword [ebp - 4], ebx
push 0
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test byte [ebp - 0x60], 0x20
je 0x4012dc
mov dword [ebp - 4], 0xfffffffe
jmp 0x4013f3
mov edx, dword [ebp - 0x4c]
test edx, edx
je 0x401308
mov eax, edx
lea ebx, [eax + 2]
jmp 0x4012f0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4012f0
sub eax, ebx
sar eax, 1
je 0x401308
mov esi, 3
mov edi, edx
push 0
push 0
push edi
push esi
push str.Mozilla_5.0__compatible__MSIE_8.0__Windows_NT_6.1__QQPCMgr7.0_
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
mov dword [ebp - 0x48], ebx
test ebx, ebx
je 0x4012d0
push 0
push 0x84000100
push 0xffffffffffffffff
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x64]
push edx
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
mov dword [ebp - 0x40], esi
test esi, esi
je 0x4013d0
xor eax, eax
mov word [ebp - 0x274], ax
push 0x208
push eax
lea ecx, [ebp - 0x272]
push ecx
call fcn.00420a30
add esp, 0xc
mov dword [ebp - 0x68], 0x208
push 0
lea edx, [ebp - 0x68]
push edx
mov eax, dword [ebp - 0x274]
push eax
push 0x2f
push esi
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
call edi
mov dword [ebp - 0x5c], 0
push 0
lea ecx, [ebp - 0x50]
push ecx
lea edx, [ebp - 0x5c]
push edx
push 0x20000013
push esi
call edi
test eax, eax
je 0x4013d0
cmp dword [ebp - 0x5c], 0xc8
jne 0x4013d0
push 0
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x58]
push ecx
push 0x20000005
push esi
call edi
test eax, eax
je 0x4013c9
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x54]
mov dword [eax + 0x10], edx
mov dword [ebp - 0x44], 1
mov dword [ebp - 4], 0xfffffffe
jmp 0x4013f6
mov esi, dword [ebp - 0x40]
mov eax, dword [ebp - 0x54]
mov dword [eax + 4], ebx
mov dword [eax + 8], esi
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0041e965
mov esp, ebp
pop ebp
ret 8
Function at 0x401b30
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 1
xor esi, esi
push esi
mov dword [0x44153c], 1
call dword [sym.imp.USER32.dll_KillTimer]
mov ecx, dword [0x441578]
cmp ecx, esi
je 0x401b70
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
mov ecx, dword [0x441578]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov dword [0x441578], esi
mov eax, dword [0x441540]
mov edi, dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, esi
je 0x401baf
cmp dword [0x441544], esi
jbe 0x401baf
push 0xbb8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x441540]
cmp eax, esi
je 0x401baf
push 1
push eax
call edi
mov eax, dword [0x441540]
push eax
call ebx
mov eax, dword [0x4415a4]
mov dword [0x441540], esi
mov dword [0x441544], esi
cmp eax, esi
je 0x401bf3
lea ecx, [ebp - 4]
push ecx
push eax
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp - 4], 0x103
jne 0x401be5
mov edx, dword [0x4415a4]
push esi
push edx
call edi
mov eax, dword [0x4415a4]
push eax
call ebx
mov dword [0x4415a4], esi
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4022f0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x431600
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x43e0b0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x10]
push eax
call fcn.00404800
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x10]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
mov esi, 0x104
sub eax, esi
or eax, ecx
jge 0x40234e
mov eax, esi
lea ecx, [ebp - 0x10]
call fcn.004055c0
mov edx, dword [ebp - 0x10]
mov eax, edx
cmp dword [edx - 8], esi
jge 0x40235f
push 0x80070057
call fcn.00401540
mov dword [edx - 0xc], esi
mov edx, dword [ebp - 0x10]
xor ecx, ecx
push 0x5c
push eax
mov word [edx + 0x208], cx
call fcn.0041ec30
add esp, 8
test eax, eax
jne 0x4023df
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.0041f064
add esp, 8
test eax, eax
js 0x402355
mov ecx, dword [ebp - 0x10]
cmp eax, dword [ecx - 8]
jg 0x402355
mov dword [ecx - 0xc], eax
mov edx, dword [ebp - 0x10]
xor ecx, ecx
mov word [edx + eax*2], cx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4023cb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor ecx, ecx
mov word [eax + 2], cx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.0041f064
add esp, 8
test eax, eax
js 0x402355
mov ecx, dword [ebp - 0x10]
cmp eax, dword [ecx - 8]
jg 0x402355
mov dword [ecx - 0xc], eax
mov ecx, dword [ebp - 0x10]
xor edx, edx
mov word [ecx + eax*2], dx
mov ecx, dword [0x44156c]
lea edi, [ebp - 0x14]
call fcn.00415840
mov byte [ebp - 4], 1
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ebx, [ebp - 0x10]
call fcn.00405500
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x402459
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40248b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405970
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
mov eax, dword [ebp + 8]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x405988
pop edi
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4059ba
mov ecx, dword [ebp + 8]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, esi
and edi, 0xf
jbe 0x4059b6
cmp esi, eax
jae 0x4059ba
dec edi
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x4059a8
cmp esi, eax
jb 0x4059c0
pop esi
xor eax, eax
pop edi
pop ebp
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebp
ret

Function at 0x405b10
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [edi]
lea ecx, [ebp - 4]
push ecx
mov ecx, dword [ebp + 8]
push esi
add eax, eax
lea edx, [ebp + 0xc]
push edx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push 0
mov dword [edi], 0
mov edx, dword [ecx]
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x405b7e
mov eax, dword [ebp + 0xc]
cmp eax, 1
je 0x405b4d
cmp eax, 2
jne 0x405b68
mov eax, dword [ebp - 4]
test esi, esi
je 0x405b78
test eax, eax
je 0x405b73
test al, 1
jne 0x405b68
mov ecx, eax
shr ecx, 1
cmp word [esi + ecx*2 - 2], 0
je 0x405b78
mov eax, 0xd
mov esp, ebp
pop ebp
ret 8
xor edx, edx
mov word [esi], dx
shr eax, 1
mov dword [edi], eax
xor eax, eax
mov esp, ebp
pop ebp
ret 8
Function at 0x405f10
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4318c8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x43e0b0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], 0
test eax, eax
jne 0x405f5a
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov edi, eax
test edi, edi
je 0x405f46
lea esi, [edi + 8]
push esi
call fcn.0041e543
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x405f46
push esi
push 0
push ebx
call fcn.00420a30
mov eax, dword [ebp + 8]
add esp, 0xc
push ebx
push edi
xor esi, esi
push esi
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x40604b
mov ecx, str.762A792A5E2A582A432A442A4D2A6C2A432A462A4F2A632A442A4C2A452A762A1A2A122A1A2A1E2A1A2A1E2A482A1A2A762A792A5A2A4F2A492A432A4B2A462A682A5F2A432A462A4E2A2A2A
lea edi, [ebp + 8]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], esi
call fcn.00415840
mov edi, eax
mov dword [ebp - 4], esi
mov eax, dword [edi]
cmp dword [eax - 4], 1
jle 0x405fc8
mov ecx, dword [eax - 0xc]
push ecx
push edi
call fcn.00405120
mov edi, dword [edi]
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x14]
push eax
push edi
push ebx
call dword [sym.imp.VERSION.dll_VerQueryValueW]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406000
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
cmp eax, esi
jbe 0x40604b
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041e543
mov ecx, dword [ebp - 0x14]
mov esi, eax
mov eax, dword [ebp - 0x10]
push eax
push ecx
inc eax
push eax
push esi
call fcn.0041f300
mov eax, dword [ebp - 0x10]
xor edx, edx
push esi
mov word [esi + eax*2], dx
call fcn.0041f3cd
push esi
mov dword [ebp - 0x18], eax
call fcn.0041f3ee
add esp, 0x1c
push ebx
call fcn.0041f3ee
mov eax, dword [ebp - 0x18]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4060f0
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov esi, ecx
test eax, eax
je 0x4061e0
cmp word [eax], 0
je 0x4061e0
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x4061e0
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [ebp - 4]
push ecx
push 0x40
lea edi, [esi + 4]
push edi
push eax
mov dword [ebp - 4], 0
call ebx
test eax, eax
je 0x4061e0
mov edx, 0x5a4d
cmp word [edi], dx
jne 0x4061e0
mov ecx, dword [esi + 0x40]
test ecx, ecx
jle 0x4061e0
mov eax, esi
call fcn.00406970
test eax, eax
je 0x4061e0
mov ecx, dword [esi]
push 0
lea eax, [ebp - 4]
push eax
push pe_nt_image_headers32
lea edi, [esi + 0x44]
push edi
push ecx
call ebx
test eax, eax
je 0x4061e0
cmp dword [edi], 0x4550
jne 0x4061e0
mov edx, 0x100
test word [esi + 0x48], dx
je 0x4061e0
mov eax, 0x10b
cmp word [esi + 0x5c], ax
jne 0x4061e0
mov ecx, esi
call fcn.004061f0
test eax, eax
je 0x4061e0
mov edi, esi
mov ebx, 1
call fcn.00406320
test eax, eax
je 0x4061d5
call fcn.004063e0
test eax, eax
je 0x4061d5
mov ecx, esi
call fcn.004067b0
test eax, eax
jne 0x4061d7
xor ebx, ebx
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4061f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x43e0b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
xor eax, eax
cmp dword [esi], 0xffffffff
push edi
mov dword [ebp - 0x30], esi
je 0x4062fb
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
cmp ax, word [esi + 0x4a]
jae 0x4062f6
xor eax, eax
push eax
lea ecx, [ebp - 0x38]
push ecx
push 0x28
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov eax, dword [esi]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x38], 0x28
jne 0x40630c
mov ecx, dword [esi + 0x7c]
mov eax, dword [ebp - 0x24]
xor edx, edx
div ecx
test edx, edx
je 0x406274
sub ecx, edx
add dword [ebp - 0x24], ecx
mov edi, dword [esi + 0x178]
lea ebx, [esi + 0x174]
lea ecx, [ebp - 0x2c]
cmp ecx, edi
jae 0x4062bf
mov eax, dword [ebx]
mov edx, ecx
cmp eax, edx
ja 0x4062bf
sub ecx, eax
mov eax, 0x66666667
imul ecx
sar edx, 4
mov esi, edx
shr esi, 0x1f
add esi, edx
cmp edi, dword [ebx + 8]
jne 0x4062ae
mov ecx, ebx
call fcn.00406cf0
mov edi, dword [ebx + 4]
mov ecx, dword [ebx]
lea eax, [esi + esi*4]
lea esi, [ecx + eax*8]
test edi, edi
je 0x4062dc
jmp 0x4062d5
cmp edi, dword [ebx + 8]
jne 0x4062cb
mov ecx, ebx
call fcn.00406cf0
mov edi, dword [ebx + 4]
test edi, edi
je 0x4062df
lea esi, [ebp - 0x2c]
mov ecx, 0xa
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x30]
add dword [ebx + 4], 0x28
mov eax, dword [ebp - 0x34]
movzx edx, word [esi + 0x4a]
inc eax
mov dword [ebp - 0x34], eax
cmp eax, edx
jl 0x406223
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e965
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0041e965
mov esp, ebp
pop ebp
ret
Function at 0x4063e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4313b8
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x43e0b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [esi + 0x164]
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov eax, dword [esi + 0x168]
cmp ecx, eax
je 0x406442
mov edx, dword [ebp - 0x40]
push edx
push eax
call fcn.00407450
mov edi, dword [esi + 0x168]
add esp, 8
mov ebx, eax
call fcn.00406f80
mov dword [esi + 0x168], ebx
mov ebx, dword [esi + 0x158]
mov eax, esi
call fcn.004069a0
cmp eax, 0xffffffff
jne 0x40645b
xor eax, eax
jmp 0x406526
mov ecx, dword [esi]
cmp ecx, 0xffffffff
je 0x406454
xor ebx, ebx
push ebx
push ebx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
cmp ecx, ebx
je 0x406454
xor edi, edi
cmp dword [esi + 0x150], ebx
jbe 0x406521
jmp 0x406490
mov dword [ebp - 0x28], 0xf
mov dword [ebp - 0x2c], ebx
mov byte [ebp - 0x3c], bl
push ebx
lea edx, [ebp - 0x44]
push edx
push 4
lea eax, [ebp - 0x40]
mov dword [ebp - 4], ebx
mov ecx, dword [esi]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x44], 4
jne 0x406454
mov eax, dword [ebp - 0x40]
cmp eax, ebx
jne 0x4064ca
mov dword [ebp - 4], 0xffffffff
jmp 0x406514
mov dword [ebp - 0x1c], eax
mov ebx, eax
mov eax, esi
mov dword [ebp - 0x14], edi
call fcn.004069a0
mov dx, word [esi + 0x14c]
mov dword [ebp - 0x20], eax
lea eax, [esi + 0x164]
add dx, di
push eax
lea ecx, [ebp - 0x3c]
mov word [ebp - 0x18], dx
call fcn.00406b00
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x28], 0x10
jb 0x406512
mov eax, dword [ebp - 0x3c]
push eax
call fcn.0041e95a
add esp, 4
xor ebx, ebx
inc edi
cmp edi, dword [esi + 0x150]
jb 0x406490
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041e965
mov esp, ebp
pop ebp
ret
Function at 0x4065f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x431098
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x43e0b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x34], edi
mov ebx, edx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], edi
mov byte [ebp - 0x2c], 0
mov dword [ebp - 4], edi
mov eax, dword [ebx]
mov dword [ebp - 0x34], edi
cmp eax, 0xffffffff
je 0x406659
push edi
push edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor edx, edx
cmp eax, 0xffffffff
setne dl
cmp edx, edi
jne 0x4066a0
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], 0xf
lea edi, [ebp - 0x2c]
mov byte [esi], 0
call fcn.00406c10
cmp dword [ebp - 0x18], 0x10
jb 0x406680
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0041e95a
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041e965
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx]
push edi
lea ecx, [ebp - 0x34]
push ecx
push 1
lea edx, [ebp - 0x2d]
push edx
push eax
mov byte [ebp - 0x2d], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406757
mov al, byte [ebp - 0x2d]
test al, al
je 0x406757
cmp dword [ebp - 0x34], 1
jne 0x406757
mov bl, al
mov eax, dword [ebp - 0x1c]
or ecx, 0xffffffff
sub ecx, eax
cmp ecx, 1
jbe 0x406796
lea edi, [eax + 1]
cmp edi, 0xfffffffe
ja 0x406796
mov ecx, dword [ebp - 0x18]
cmp ecx, edi
jae 0x40677f
push eax
push edi
lea edx, [ebp - 0x2c]
push edx
call fcn.00407150
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
test edi, edi
je 0x406735
cmp ecx, 0x10
mov ecx, dword [ebp - 0x2c]
jae 0x40671f
lea ecx, [ebp - 0x2c]
mov byte [ecx + eax], bl
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], edi
jae 0x406731
lea eax, [ebp - 0x2c]
mov byte [eax + edi], 0
mov edx, dword [ebp - 0x38]
push 0
lea eax, [ebp - 0x34]
push eax
mov eax, dword [edx]
push 1
lea ecx, [ebp - 0x2d]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor edi, edi
test eax, eax
jne 0x4066c0
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], 0xf
lea edi, [ebp - 0x2c]
mov byte [esi], 0
call fcn.00406c10
cmp dword [ebp - 0x18], 0x10
jb 0x406680
mov ecx, dword [ebp - 0x2c]
push ecx
jmp 0x406678
test edi, edi
jne 0x406714
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], edi
cmp ecx, 0x10
jae 0x406791
lea eax, [ebp - 0x2c]
mov byte [eax], 0
jmp 0x406735
push str.string_too_long
call fcn.0041e570
int3