joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402350
Capabilities:
Create directory
Print debug messages
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41372b
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x419050]
xor eax, esp
mov dword [esp + 0x11c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x419050]
xor eax, esp
push eax
lea eax, [esp + 0x134]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x144]
mov edi, ecx
lea eax, [edi + 0x120]
mov ebx, edx
push eax
lea esi, [esp + 0x1c]
call fcn.00403900
add esp, 4
xor esi, esi
mov dword [esp + 0x13c], esi
cmp dword [esp + 0x30], 8
mov eax, dword [esp + 0x1c]
jae 0x4023c1
lea eax, [esp + 0x1c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0xfc
lea ecx, [esp + 0x38]
push esi
push ecx
mov dword [esp + 0x20], esi
call fcn.0040a210
mov edx, dword [edi + 0x158]
add esp, 0xc
push esi
push esi
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [edi + 0x158]
push esi
lea eax, [esp + 0x18]
push eax
push 0xfc
lea ecx, [esp + 0x40]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
cmp ebx, esi
je 0x402452
mov edx, dword [edi]
mov edx, dword [edx + 4]
lea eax, [esp + 0x34]
push eax
mov ecx, edi
call edx
mov edx, dword [edi]
mov edx, dword [edx + 8]
sub eax, 0x100
push eax
mov eax, dword [edi + 0x158]
lea esi, [ebp + 0x100]
push esi
push eax
mov ecx, edi
call edx
cmp eax, dword [esp + 0x11c]
je 0x402460
push 0x4174c8
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [esp + 0x30], 8
jb 0x4024bd
mov eax, dword [esp + 0x1c]
push eax
jmp 0x4024b5
cmp dword [esp + 0x30], 8
mov eax, dword [esp + 0x1c]
jae 0x40246f
lea eax, [esp + 0x1c]
push eax
mov ecx, esi
call fcn.004024f0
mov ecx, dword [esp + 0x34]
lea edx, [ecx + ebp + 0x100]
push edx
push edi
call fcn.004028f0
mov eax, dword [esp + 0x1c]
mov esi, 8
cmp dword [esp + 0x30], esi
jae 0x40249c
lea eax, [esp + 0x1c]
lea ecx, [edi + 0x104]
push ecx
push eax
push edi
call fcn.00402ab0
cmp dword [esp + 0x30], esi
jb 0x4024bd
mov edx, dword [esp + 0x1c]
push edx
call fcn.00408b00
add esp, 4
mov eax, ebx
mov ecx, dword [esp + 0x134]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x11c]
xor ecx, esp
call fcn.004089cf
add esp, 0x12c
ret 4
Function at 0x4024f0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4136eb
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x419050]
xor eax, esp
mov dword [esp + 0x134], eax
push ebx
push ebp
push esi
mov eax, dword [0x419050]
xor eax, esp
push eax
lea eax, [esp + 0x148]
mov dword fs:[0], eax
mov edx, dword [edi + 0x158]
mov eax, dword [esp + 0x158]
xor ebp, ebp
push ebp
push ebp
push ecx
push edx
mov dword [esp + 0x24], eax
xor esi, esi
mov dword [esp + 0x20], ebp
mov dword [esp + 0x28], ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [edi + 0x158]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebp
lea eax, [esp + 0x14]
push eax
push 4
lea ecx, [esp + 0x24]
push ecx
push edx
call ebx
test eax, eax
je 0x402723
push 0x10c
lea eax, [esp + 0x3c]
push ebp
push eax
call fcn.0040a210
mov eax, dword [edi + 0x158]
add esp, 0xc
push ebp
lea ecx, [esp + 0x14]
push ecx
push pe_nt_image_headers32
lea edx, [esp + 0x44]
push edx
push eax
call ebx
push ebp
lea ecx, [esp + 0x14]
push ecx
push 4
mov esi, eax
mov eax, dword [edi + 0x158]
lea edx, [esp + 0x134]
push edx
push eax
and esi, 1
call ebx
push ebp
lea ecx, [esp + 0x14]
push ecx
push 8
lea edx, [esp + 0x144]
and esi, eax
mov eax, dword [edi + 0x158]
push edx
push eax
call ebx
push ebp
lea ecx, [esp + 0x14]
push ecx
push 4
lea edx, [esp + 0x14c]
and esi, eax
mov eax, dword [edi + 0x158]
push edx
push eax
call ebx
and esi, eax
mov eax, dword [esp + 0x130]
cmp eax, ebp
je 0x402612
push eax
call fcn.00408b0b
add esp, 4
mov dword [esp + 0x130], ebp
mov ecx, dword [esp + 0x128]
push ecx
call fcn.004088e8
mov edx, dword [esp + 0x12c]
push edx
push ebp
push eax
mov dword [esp + 0x140], eax
call fcn.0040a210
mov ecx, dword [esp + 0x138]
mov edx, dword [esp + 0x140]
add esp, 0x10
push ebp
lea eax, [esp + 0x14]
push eax
mov eax, dword [edi + 0x158]
push ecx
push edx
push eax
call ebx
test eax, eax
je 0x402723
mov esi, dword [esp + 0x14]
xor ecx, ecx
mov eax, esi
mov dword [esp + 0x34], 7
mov dword [esp + 0x30], ebp
mov word [esp + 0x20], cx
lea edx, [eax + 2]
jmp 0x402680
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x402680
sub eax, edx
sar eax, 1
push eax
mov eax, esi
lea esi, [esp + 0x20]
call fcn.004015d0
push 1
mov eax, 0x4174ac
mov ecx, esi
mov dword [esp + 0x154], ebp
call fcn.004014f0
lea eax, [esp + 0x38]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x4026b7
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x20]
call fcn.004014f0
lea edx, [esp + 0x1c]
push edx
lea ebx, [edi + 0x164]
call fcn.004030d0
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x3c]
call fcn.00402750
mov esi, eax
mov eax, dword [esp + 0x130]
cmp eax, ebp
je 0x40270f
push eax
call fcn.00408b0b
add esp, 4
mov dword [esp + 0x130], ebp
cmp dword [esp + 0x34], 8
jb 0x402723
mov ecx, dword [esp + 0x20]
push ecx
call fcn.00408b00
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x148]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x134]
xor ecx, esp
call fcn.004089cf
add esp, 0x144
ret 4
Function at 0x402750
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4134c8
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x419050]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
push edi
mov eax, dword [0x419050]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
mov eax, dword [esp + 0x44]
mov edi, ecx
xor ebx, ebx
cmp edi, ebx
je 0x4028e8
xor ecx, ecx
mov word [esp + 0x18], cx
mov ecx, eax
mov dword [esp + 0x2c], 7
mov dword [esp + 0x28], ebx
lea esi, [ecx + 2]
lea esp, [esp]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x4027b0
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x18]
call fcn.004015d0
push 1
mov eax, 0x4174ac
mov ecx, esi
mov dword [esp + 0x40], ebx
call fcn.004014f0
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4027e0
sub eax, edx
sar eax, 1
push eax
mov eax, edi
lea ecx, [esp + 0x18]
call fcn.004014f0
test byte [0x41aae0], 1
jne 0x402822
or dword [0x41aae0], 1
call fcn.00401bb0
push 0x413810
mov dword [0x41aadc], eax
call fcn.00409783
add esp, 4
mov eax, dword [esp + 0x18]
cmp dword [0x41aadc], ebx
je 0x402843
cmp dword [esp + 0x2c], 8
jae 0x402839
lea eax, [esp + 0x18]
push ebx
push 0x80
push 1
jmp 0x402856
cmp dword [esp + 0x2c], 8
jae 0x40284e
lea eax, [esp + 0x18]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, ebx
je 0x4028cd
cmp esi, 0xffffffff
je 0x4028cd
mov eax, dword [edi + 0xf0]
mov ecx, dword [edi + 0xf8]
push ebx
lea edx, [esp + 0x14]
push edx
push eax
push ecx
push esi
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x2c], 8
jb 0x4028ab
mov edx, dword [esp + 0x18]
push edx
call fcn.00408b00
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.004089cf
add esp, 0x30
ret 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x2c], 8
jb 0x4028e8
mov eax, dword [esp + 0x18]
push eax
call fcn.00408b00
add esp, 4
mov eax, ebx
jmp 0x4028ad
Function at 0x4028f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov edx, dword [edi]
lea eax, [edi + 0x104]
push eax
mov eax, dword [edx + 0xc]
mov ecx, edi
xor ebx, ebx
xor esi, esi
call eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [edi + 0x158]
push ebx
push ebx
push ecx
push edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [edi + 0x158]
push ebx
lea eax, [esp + 0x14]
push eax
push 4
lea ecx, [esp + 0x28]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402a9a
mov edx, dword [edi + 0x158]
mov esi, dword [esp + 0x10]
push ebx
lea eax, [esp + 0x14]
push eax
push 4
lea ecx, [esp + 0x20]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402a9a
add esi, dword [esp + 0x10]
cmp dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
jle 0x402a9a
jmp 0x402995
mov edi, dword [ebp + 8]
xor ebx, ebx
push 0x10c
mov dword [esp + 0x10], ebx
call fcn.00408bff
add esp, 4
push 0x10c
mov ebx, eax
push 0
push ebx
mov dword [esp + 0x2c], ebx
call fcn.0040a210
mov ecx, dword [edi + 0x158]
add esp, 0xc
push 0
lea eax, [esp + 0x10]
push eax
push pe_nt_image_headers32
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp + 8]
add esi, dword [esp + 0xc]
push 0
lea edx, [esp + 0x10]
push edx
mov edx, dword [ecx + 0x158]
mov edi, eax
push 4
lea eax, [ebx + 0xf0]
push eax
push edx
and edi, 1
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp + 8]
add esi, dword [esp + 0xc]
push 0
and edi, eax
lea eax, [esp + 0x10]
push eax
mov eax, dword [edx + 0x158]
push 8
lea ecx, [ebx + 0x100]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
add esi, dword [esp + 0xc]
push 0
lea ecx, [esp + 0x10]
push ecx
push 4
add ebx, 0x108
push ebx
mov ebx, dword [ebp + 8]
mov edx, dword [ebx + 0x158]
push edx
and edi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
add esi, dword [esp + 0xc]
and edi, eax
test edi, edi
je 0x402a87
mov edi, dword [ebx + 0x118]
mov ecx, dword [edi + 4]
lea eax, [ebx + 0x104]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x20]
push eax
push ecx
push edi
call fcn.004033b0
mov ecx, dword [esp + 0x24]
mov ebx, eax
call fcn.004033f0
mov dword [edi + 4], ebx
mov edx, dword [ebx + 4]
mov dword [edx], ebx
mov eax, dword [esp + 0x18]
inc eax
cmp eax, dword [esp + 0x14]
mov dword [esp + 0x18], eax
jl 0x402990
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x402ab0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x14]
mov edx, dword [ecx]
push ebx
push esi
xor ebx, ebx
push edi
mov edi, dword [eax]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x10], ebx
mov esi, dword [eax + 0x14]
mov eax, dword [eax]
cmp edi, ebx
je 0x402add
cmp edi, eax
je 0x402ae2
call fcn.0040964c
cmp dword [esp + 0x1c], esi
je 0x402beb
cmp edi, ebx
jne 0x402be0
call fcn.0040964c
xor eax, eax
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [eax + 0x14]
jne 0x402b09
call fcn.0040964c
mov edx, dword [esp + 0x1c]
mov esi, dword [edx + 8]
cmp esi, ebx
je 0x402bb5
mov eax, dword [esi + 0xf8]
cmp eax, ebx
je 0x402b31
push eax
call fcn.00408b0b
add esp, 4
mov dword [esi + 0xf8], ebx
mov eax, dword [esi + 0xf0]
push eax
call fcn.004088e8
mov ecx, dword [esi + 0xf0]
push ecx
push ebx
push eax
mov dword [esi + 0xf8], eax
call fcn.0040a210
mov eax, dword [esi + 0xf0]
mov ecx, dword [esi + 0xf8]
add esp, 0x10
push ebx
lea edx, [esp + 0x18]
push edx
mov edx, dword [ebp + 8]
push eax
mov eax, dword [edx + 0x158]
push ecx
push eax
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402beb
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, esi
call fcn.00402750
mov eax, dword [esi + 0xf8]
mov dword [esp + 0x10], 1
cmp eax, ebx
je 0x402bac
push eax
call fcn.00408b0b
add esp, 4
mov dword [esi + 0xf8], ebx
push esi
call fcn.00408b00
add esp, 4
cmp edi, ebx
jne 0x402be7
call fcn.0040964c
xor eax, eax
mov edx, dword [esp + 0x1c]
cmp edx, dword [eax + 0x14]
jne 0x402bce
call fcn.0040964c
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x1c], ecx
jmp 0x402ad0
mov eax, dword [edi]
jmp 0x402afb
mov eax, dword [edi]
jmp 0x402bc0
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x403900
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x4135a8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push edi
mov eax, dword [0x419050]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
xor edi, edi
xor eax, eax
push 0xffffffffffffffff
mov word [esp + 0x14], ax
mov eax, dword [esp + 0x3c]
push edi
lea ecx, [esp + 0x14]
mov dword [esp + 0x10], edi
mov dword [esp + 0x2c], 7
mov dword [esp + 0x28], edi
call fcn.00401740
mov eax, ebx
mov dword [esp + 0x30], edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x403956
sub eax, edx
sar eax, 1
push eax
mov eax, ebx
lea ecx, [esp + 0x10]
call fcn.004014f0
xor ecx, ecx
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], edi
push 0xffffffffffffffff
mov word [esi + 4], cx
push edi
mov ecx, esi
call fcn.00401740
cmp dword [esp + 0x24], 8
jb 0x40399f
mov edx, dword [esp + 0x10]
push edx
call fcn.00408b00
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
add esp, 0x2c
ret
Function at 0x406120
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
test ecx, ecx
jne 0x406127
xor eax, eax
ret
push esi
not eax
cmp edx, 8
jb 0x406204
mov esi, edx
shr esi, 3
push edi
lea esp, [esp]
movzx edi, byte [ecx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x417040]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x417040]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x417040]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x417040]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x417040]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x417040]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x417040]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x417040]
inc ecx
sub edx, 8
sub esi, 1
jne 0x406140
pop edi
test edx, edx
je 0x40622b
jmp 0x406210
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x417040]
inc ecx
sub edx, 1
jne 0x406210
not eax
pop esi
ret

Function at 0x406230
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [edx]
movsx ecx, cl
xor ecx, eax
shr eax, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x417040]
xor ecx, eax
movzx eax, cl
add eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edx + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x417040]
mov dword [edx + 8], ecx
ret

Function at 0x406280
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov ecx, dword [esi + 8]
push ebx
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov ebx, edx
xor ebx, 1
imul ebx, edx
mov edx, dword [esi]
shr ebx, 8
push edi
xor al, bl
movsx edi, al
xor edi, edx
shr edx, 8
and edi, 0xff
mov ebx, dword [edi*4 + 0x417040]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edx*4 + 0x417040]
pop edi
mov dword [esi + 8], ecx
pop ebx
ret

Function at 0x406a30
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ebx
imul esi, dword [esp + 8]
cmp byte [edi], 0
je 0x406a62
mov ecx, dword [edi + 4]
push 0
lea eax, [esp + 0xc]
push eax
push esi
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406a58
mov byte [edi + 8], 1
mov eax, dword [esp + 8]
xor edx, edx
div ebx
pop esi
ret
mov ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0x18]
push ebp
lea ebp, [ecx + esi]
cmp ebp, eax
pop ebp
jbe 0x406a75
sub eax, ecx
mov esi, eax
mov eax, dword [edi + 0x14]
push esi
add eax, ecx
push eax
push edx
call fcn.0040a290
add dword [edi + 0x1c], esi
mov eax, esi
add esp, 0xc
xor edx, edx
div ebx
pop esi
ret
Function at 0x406a90
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
cmp byte [esi], 0
push edi
mov edi, 1
je 0x406ac3
mov edx, dword [esi + 4]
push 0
lea eax, [esp + 0xc]
push eax
push edi
lea ecx, [esp + 0x13]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406abd
mov byte [esi + 8], 1
mov edi, dword [esp + 8]
jmp 0x406aef
mov eax, dword [esi + 0x18]
push ebx
mov ebx, dword [esi + 0x1c]
lea ecx, [ebx + 1]
cmp ecx, eax
jbe 0x406ad5
sub eax, ebx
mov edi, eax
mov edx, dword [esi + 0x14]
push edi
add edx, ebx
push edx
lea eax, [esp + 0x13]
push eax
call fcn.0040a290
add esp, 0xc
add ebx, edi
mov dword [esi + 0x1c], ebx
pop ebx
cmp edi, 1
pop edi
jne 0x406b06
movzx ecx, byte [esp + 3]
mov edx, dword [esp + 0xc]
mov dword [edx], ecx
xor eax, eax
add esp, 8
ret
cmp byte [esi], 0
je 0x406b00
cmp byte [esi + 8], 0
je 0x406b00
or eax, 0xffffffff
add esp, 8
ret
Function at 0x406ba0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
cmp byte [esi], 0
je 0x406be5
cmp byte [esi + 1], 0
je 0x406bed
mov eax, dword [esi + 4]
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [esi], 0
push ebp
je 0x406c02
cmp byte [esi + 1], 0
je 0x406bf4
mov edx, dword [esi + 4]
push 1
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, eax
sub ebp, dword [esi + 0xc]
mov dword [esp + 4], ebp
jmp 0x406c0b
mov ecx, dword [esi + 0x18]
mov dword [esi + 0x1c], ecx
jmp 0x406bbe
or eax, 0xffffffff
add esp, 0x18
ret
mov dword [esp + 4], 0
mov ebp, dword [esp + 4]
jmp 0x406c0b
mov eax, dword [esi + 0x1c]
mov dword [esp + 4], eax
mov ebp, eax
push edi
mov edi, 0xffff
mov dword [esp + 0xc], edi
cmp ebp, edi
jae 0x406c1f
mov dword [esp + 0xc], ebp
mov edi, ebp
push ebx
push 0x404
call fcn.004098b7
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x406c3d
pop ebx
pop edi
or eax, 0xffffffff
pop ebp
add esp, 0x18
ret
mov eax, 4
mov dword [esp + 0x18], 0xffffffff
cmp edi, eax
jbe 0x406d51
jmp 0x406c60
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0xc]
add eax, 0x400
mov dword [esp + 0x14], edi
cmp eax, edi
ja 0x406c71
mov dword [esp + 0x14], eax
mov eax, ebp
sub eax, dword [esp + 0x14]
sub ebp, eax
mov dword [esp + 0x20], eax
cmp ebp, 0x404
jbe 0x406c8a
mov ebp, 0x404
cmp byte [esi], 0
je 0x406caf
cmp byte [esi + 1], 0
je 0x406d51
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push 0
push 0
add ecx, eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x406cb2
mov dword [esi + 0x1c], eax
cmp byte [esi], 0
mov edi, ebp
je 0x406cda
mov ecx, dword [esi + 4]
push 0
lea eax, [esp + 0x20]
push eax
push ebp
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406cd4
mov byte [esi + 8], 1
mov eax, dword [esp + 0x1c]
jmp 0x406d00
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
lea edx, [eax + ebp]
cmp edx, ecx
jbe 0x406ceb
sub ecx, eax
mov edi, ecx
mov ecx, dword [esi + 0x14]
push edi
add ecx, eax
push ecx
push ebx
call fcn.0040a290
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div ebp
cmp eax, 1
jne 0x406d51
lea eax, [ebp - 3]
test eax, eax
jl 0x406d3c
dec eax
cmp byte [eax + ebx], 0x50
jne 0x406d2c
cmp byte [eax + ebx + 1], 0x4b
jne 0x406d2c
cmp byte [eax + ebx + 2], 5
jne 0x406d2c
cmp byte [eax + ebx + 3], 6
je 0x406d32
test eax, eax
jge 0x406d10
jmp 0x406d3c
mov edx, dword [esp + 0x20]
add eax, edx
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], 0
jne 0x406d51
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x14], eax
jb 0x406c54
push ebx
call fcn.004097da
mov eax, dword [esp + 0x1c]
add esp, 4
pop ebx
pop edi
pop ebp
add esp, 0x18
ret
Function at 0x407720
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push edi
mov edi, eax
xor ebx, ebx
cmp edi, ebx
jne 0x40773e
pop edi
pop ebp
mov eax, 0xffffff9a
pop ebx
add esp, 0xc
ret
cmp dword [edi + 0x18], ebx
je 0x407732
cmp dword [edi + 0x7c], ebx
je 0x40774d
call fcn.00407b10
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
call fcn.00407490
add esp, 0xc
test eax, eax
je 0x407774
pop edi
pop ebp
mov eax, 0xffffff99
pop ebx
add esp, 0xc
ret
push esi
push 0x84
call fcn.004098b7
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x4077b5
push 0x4000
call fcn.004098b7
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
add esp, 4
mov dword [esi], eax
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], edx
mov dword [esi + 0x4c], ebx
cmp eax, ebx
jne 0x4077c2
push esi
call fcn.004097da
add esp, 4
pop esi
pop edi
pop ebp
mov eax, 0xffffff98
pop ebx
add esp, 0xc
ret
mov dword [esi + 0x40], ebx
mov ecx, dword [edi + 0x3c]
xor eax, eax
cmp dword [edi + 0x34], ebx
mov dword [esi + 0x54], ecx
mov dword [esi + 0x50], ebx
mov edx, dword [edi + 0x34]
sete al
mov dword [esi + 0x64], edx
mov ecx, dword [edi]
mov dword [esi + 0x60], ecx
mov edx, dword [edi + 0xc]
mov dword [esi + 0x68], edx
mov dword [esi + 0x18], ebx
cmp eax, ebx
jne 0x40780a
lea eax, [esi + 4]
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
call fcn.00406540
test eax, eax
jne 0x40780a
mov dword [esi + 0x40], 1
mov eax, dword [edi + 0x40]
mov dword [esi + 0x58], eax
mov ecx, dword [edi + 0x44]
mov dword [esi + 0x5c], ecx
mov dl, byte [edi + 0x30]
and dl, 1
mov byte [esi + 0x6c], dl
mov eax, dword [edi + 0x30]
shr eax, 3
test al, 1
je 0x407834
mov cl, byte [edi + 0x39]
mov byte [esi + 0x80], cl
jmp 0x40783d
mov dl, byte [edi + 0x3f]
mov byte [esi + 0x80], dl
movzx eax, byte [esi + 0x6c]
neg eax
sbb eax, eax
and eax, 0xc
lea edx, [esi + 0x70]
mov dword [esi + 0x7c], eax
mov dword [edx], 0x12345678
mov dword [esi + 0x74], 0x23456789
mov dword [esi + 0x78], 0x34567890
cmp ebp, ebx
je 0x407877
mov cl, byte [ebp]
cmp cl, bl
je 0x407877
call fcn.00406230
add ebp, 1
jne 0x407866
mov ecx, dword [edi + 0x78]
mov edx, dword [esp + 0x18]
lea eax, [ecx + edx + 0x1e]
mov dword [esi + 0x3c], eax
mov dword [esi + 8], ebx
mov dword [edi + 0x7c], esi
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret