joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5a35e8
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe84
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x178], ecx
mov dword [ebp - 0x17c], ecx
mov dword [ebp - 0x174], ecx
mov dword [ebp - 0x16c], ecx
mov dword [ebp - 0x170], ecx
mov dword [ebp - 0x168], ecx
mov dword [ebp - 0x164], ecx
mov dword [ebp - 0x160], ecx
mov dword [ebp - 0x15c], ecx
mov edi, edx
mov esi, eax
lea eax, [ebp - 0x158]
mov edx, dword [0x407ca0]
call fcn.00404e2c
xor eax, eax
push ebp
push 0x5a3875
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 0x15c]
mov ecx, 0x5a3890
mov edx, esi
call fcn.00404740
mov eax, dword [ebp - 0x15c]
lea ecx, [ebp - 0x158]
mov edx, 0x3f
call fcn.00409634
test eax, eax
jne 0x5a3844
mov eax, dword [ebp - 0x14c]
mov edx, 0x5a38a0
call fcn.00404840
je 0x5a3826
mov eax, dword [ebp - 0x14c]
mov edx, 0x5a38ac
call fcn.00404840
je 0x5a3826
test byte [ebp - 0x150], 0x10
je 0x5a37a0
push esi
push 0x5a38b8
push dword [ebp - 0x14c]
lea eax, [ebp - 0x160]
mov edx, 3
call fcn.004047b4
mov eax, dword [ebp - 0x160]
call fcn.00409440
test al, al
je 0x5a37a0
push edi
push 0x5a38b8
push dword [ebp - 0x14c]
lea eax, [ebp - 0x164]
mov edx, 3
call fcn.004047b4
mov eax, dword [ebp - 0x164]
call fcn.00409440
test al, al
jne 0x5a3743
push edi
push 0x5a38b8
push dword [ebp - 0x14c]
lea eax, [ebp - 0x168]
mov edx, 3
call fcn.004047b4
mov eax, dword [ebp - 0x168]
call fcn.00409acc
test al, al
je 0x5a3846
mov eax, dword [ebp + 8]
push eax
push edi
push 0x5a38b8
push dword [ebp - 0x14c]
lea eax, [ebp - 0x16c]
mov edx, 3
call fcn.004047b4
mov eax, dword [ebp - 0x16c]
push eax
push esi
push 0x5a38b8
push dword [ebp - 0x14c]
lea eax, [ebp - 0x170]
mov edx, 3
call fcn.004047b4
mov eax, dword [ebp - 0x170]
pop edx
call fcn.005a35e8
pop ecx
test al, al
je 0x5a3846
jmp 0x5a3826
push esi
push 0x5a38b8
push dword [ebp - 0x14c]
lea eax, [ebp - 0x174]
mov edx, 3
call fcn.004047b4
mov eax, dword [ebp - 0x174]
call fcn.00409430
test al, al
je 0x5a3826
push 0
push edi
push 0x5a38b8
push dword [ebp - 0x14c]
lea eax, [ebp - 0x178]
mov edx, 3
call fcn.004047b4
mov eax, dword [ebp - 0x178]
call fcn.004048f4
push eax
push esi
push 0x5a38b8
push dword [ebp - 0x14c]
lea eax, [ebp - 0x17c]
mov edx, 3
call fcn.004047b4
mov eax, dword [ebp - 0x17c]
call fcn.004048f4
push eax
call sub.kernel32.dll_CopyFileA
test eax, eax
je 0x5a3846
lea eax, [ebp - 0x158]
call fcn.00409684
test eax, eax
je 0x5a3681
lea eax, [ebp - 0x158]
call fcn.004096a8
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5a387c
lea eax, [ebp - 0x17c]
mov edx, 9
call fcn.00404458
lea eax, [ebp - 0x158]
mov edx, dword [0x407ca0]
call fcn.00404efc
ret
Function at 0x3893700
Capabilities:
Decompress data using aplib

Disassembly:
pushal
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
cld
mov dl, 0x80
xor ebx, ebx
movsb byte es:[edi], byte [esi]
mov bl, 2
call fcn.0389378f
jae 0x389370e
xor ecx, ecx
call fcn.0389378f
jae 0x389373d
xor eax, eax
call fcn.0389378f
jae 0x389374d
mov bl, 2
inc ecx
mov al, 0x10
call fcn.0389378f
adc al, al
jae 0x389372f
jne 0x3893779
stosb byte es:[edi], al
jmp 0x3893711
call fcn.0389379b
sub ecx, ebx
jne 0x3893756
call fcn.03893799
jmp 0x3893775
lodsb al, byte [esi]
shr eax, 1
je 0x3893783
adc ecx, ecx
jmp 0x3893772
xchg ecx, eax
dec eax
shl eax, 8
lodsb al, byte [esi]
call fcn.03893799
cmp eax, 0x7d00
jae 0x3893772
cmp ah, 5
jae 0x3893773
cmp eax, 0x7f
ja 0x3893774
inc ecx
inc ecx
xchg ebp, eax
mov eax, ebp
mov bl, 1
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x3893711
sub edi, dword [esp + 0x28]
mov dword [esp + 0x1c], edi
popal
ret 8
Function at 0x4010d4
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
jmp 0x4010e6
mov eax, dword [0x44108b]
shl eax, 2
mov dword [0x44108f], eax
push edx
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
mov edx, eax
call fcn.00404f60
pop edx
call fcn.004042fc
call fcn.00404f64
push 0
call fcn.004064b4
pop ecx
push 0x441034
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [0x441093], eax
push 0
jmp fcn.0040cbc0

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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffddc
mov eax, dword [0x490c21]
mov edx, dword [0x490c29]
lea ecx, [ebp - 0x224]
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [0x490c25]
mov dword [ebp - 8], eax
mov dword [ebp - 0x1c], edx
mov edx, dword [0x490c2d]
mov dword [0x4acd24], 1
mov dword [ebp - 0x18], edx
push 0x208
push ecx
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x224]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov ebx, eax
cmp ebx, 0xffffffff
je 0x401750
push 0
push ebx
call sub.KERNEL32.DLL_GetFileSize
mov edi, eax
push 2
push 0
push 0xfffffffffffffff8
push ebx
call sub.KERNEL32.DLL_SetFilePointer
lea eax, [ebp - 4]
push 0
push eax
lea edx, [ebp - 0x14]
push 8
push edx
push ebx
call sub.KERNEL32.DLL_ReadFile
test eax, eax
jne 0x4016bb
push ebx
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x401752
push 8
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0xc]
push ecx
call fcn.004054d8
add esp, 0xc
test eax, eax
je 0x4016d5
xor eax, eax
jmp 0x401752
push 2
push 0
push 0xfffffffffffffff4
push ebx
call sub.KERNEL32.DLL_SetFilePointer
push 0
lea edx, [ebp - 4]
push edx
push 4
push esi
push ebx
call sub.KERNEL32.DLL_ReadFile
test eax, eax
jne 0x4016fe
push ebx
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x401752
push 4
push 0x1000
mov edx, dword [esi]
push edx
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [0x49016c], eax
mov eax, edi
sub eax, dword [esi]
sub eax, 0xc
push 0
push 0
push eax
push ebx
call sub.KERNEL32.DLL_SetFilePointer
lea edx, [ebp - 4]
push 0
push edx
mov eax, dword [0x49016c]
mov ecx, dword [esi]
push ecx
push eax
push ebx
call sub.KERNEL32.DLL_ReadFile
test eax, eax
jne 0x401749
push ebx
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
jmp 0x401752
mov eax, 1
jmp 0x401752
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402bf0
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
movzx eax, word [eax + 0x14]
add eax, dword [ebp + 0xc]
add eax, 0x18
xor ecx, ecx
jmp 0x402c24
mov edx, dword [eax + 8]
test edx, edx
jne 0x402c13
mov edx, dword [eax + 0x10]
mov esi, dword [eax + 0xc]
cmp ebx, esi
jb 0x402c20
add edx, esi
cmp ebx, edx
jb 0x402c31
inc ecx
add eax, 0x28
mov edx, dword [ebp + 0xc]
movzx edx, word [edx + 6]
cmp ecx, edx
jb 0x402c09
xor eax, eax
pop esi
pop ebx
pop ebp
ret
Function at 0x402c6c
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
cmp word [edi], 0x5a4d
je 0x402c86
xor eax, eax
jmp 0x402e06
mov ebx, dword [edi + 0x3c]
add ebx, edi
cmp dword [ebx], 0x4550
je 0x402c9a
xor eax, eax
jmp 0x402e06
cmp word [ebx + 0x14], 0xe0
jne 0x402caa
cmp word [ebx + 0x18], 0x10b
je 0x402cb1
xor eax, eax
jmp 0x402e06
mov dword [0x4a89c0], edi
mov ebx, dword [edi + 0x3c]
mov esi, edi
add ebx, esi
mov eax, dword [ebx + 0x78]
mov dword [ebp - 0x18], eax
push ebx
mov edx, dword [ebp - 0x18]
push edx
call fcn.00402bf0
add esp, 8
test eax, eax
jne 0x402cdc
xor eax, eax
jmp 0x402e06
mov edx, dword [0x4a89c0]
push edx
push ebx
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00402c38
add esp, 0xc
mov ebx, dword [ebx + 0x78]
test ebx, ebx
jne 0x402d0e
push 0x10
push 0
push str.Error_in_GetProcAddressDirectly__
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x402e06
add ebx, esi
mov edx, dword [ebx + 0x24]
add edx, esi
mov dword [ebp - 4], edx
mov ecx, dword [ebx + 0x20]
add ecx, esi
mov dword [ebp - 0xc], ecx
mov eax, dword [ebx + 0x1c]
add eax, esi
mov dword [ebp - 8], eax
mov edx, dword [ebp + 0xc]
mov ecx, edx
shr ecx, 0x10
test cx, cx
je 0x402dd8
xor esi, esi
mov eax, dword [ebp - 8]
mov edx, eax
mov dword [ebp - 0x28], edx
jmp 0x402dca
mov ecx, dword [ebp - 8]
mov eax, dword [ecx]
test eax, eax
je 0x402dc5
xor edx, edx
mov dword [ebp - 0x14], edx
mov ecx, dword [ebp - 0x28]
mov eax, ecx
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0xc]
mov ecx, edx
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 4]
mov edx, eax
mov dword [ebp - 0x1c], edx
jmp 0x402dbc
mov ecx, dword [ebp - 0x1c]
movzx eax, word [ecx]
cmp esi, eax
jne 0x402db1
mov edx, dword [ebp - 0x20]
mov ecx, dword [edx]
add ecx, edi
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
mov cl, byte [eax]
cmp cl, byte [edx]
jne 0x402db1
test cl, cl
je 0x402da6
mov cl, byte [eax + 1]
cmp cl, byte [edx + 1]
jne 0x402db1
add eax, 2
add edx, 2
test cl, cl
jne 0x402d8a
jne 0x402db1
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
add eax, edi
jmp 0x402e06
inc dword [ebp - 0x14]
add dword [ebp - 0x20], 4
add dword [ebp - 0x1c], 2
mov edx, dword [ebx + 0x18]
dec edx
cmp edx, dword [ebp - 0x14]
jae 0x402d70
inc esi
add dword [ebp - 0x28], 4
mov ecx, dword [ebx + 0x14]
dec ecx
cmp esi, ecx
jbe 0x402d48
jmp 0x402e04
xor esi, esi
mov eax, dword [ebp - 8]
jmp 0x402dfc
mov ecx, dword [ebx + 0x10]
add ecx, esi
cmp edx, ecx
jne 0x402df8
cmp dword [eax], 0
je 0x402df8
mov edx, dword [eax]
shl edx, 6
add edi, edx
mov eax, edi
jmp 0x402e06
inc esi
add eax, 4
mov ecx, dword [ebx + 0x14]
dec ecx
cmp esi, ecx
jbe 0x402ddf
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x402e10
Capabilities:
Create process on windows
Get common file path
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffba8
push ebx
push esi
cmp dword [ebp + 0xc], 0
je 0x402e36
lea eax, [ebp - 0x458]
push eax
call fcn.00401794
pop ecx
test eax, eax
jne 0x402ed6
push 0x400
push 0
lea edx, [ebp - 0x458]
push edx
call fcn.00405280
add esp, 0xc
lea ecx, [ebp - 0x458]
push ecx
push 0x1ff
call sub.KERNEL32.DLL_GetTempPathA
push str.YShow3D.exe
lea eax, [ebp - 0x458]
push eax
call sub.KERNEL32.DLL_lstrcatA
push 4
push 0x1000
push 0xf000
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov ebx, eax
test ebx, ebx
jne 0x402e8e
xor eax, eax
jmp 0x402f54
push ebx
push 0x4810a4
call fcn.0040f4f8
add esp, 8
push 0
push 0
push 2
push 0
push 3
push 0xc0000000
lea edx, [ebp - 0x458]
push edx
call sub.KERNEL32.DLL_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
je 0x402ed6
push 0
lea eax, [ebp - 4]
push eax
push 0xf000
push ebx
push esi
call sub.KERNEL32.DLL_WriteFile
push esi
call sub.KERNEL32.DLL_CloseHandle
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x458]
push ecx
call sub.KERNEL32.DLL_lstrcatA
push 0x44
push 0
lea eax, [ebp - 0x48]
push eax
call fcn.00405280
add esp, 0xc
mov dword [ebp - 0x48], 0x44
mov dword [ebp - 0x1c], 1
mov word [ebp - 0x18], 1
push 0x10
push 0
lea edx, [ebp - 0x58]
push edx
call fcn.00405280
add esp, 0xc
lea ecx, [ebp - 0x58]
lea eax, [ebp - 0x48]
lea edx, [ebp - 0x458]
push ecx
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push edx
push 0
call sub.KERNEL32.DLL_CreateProcessA
test eax, eax
jne 0x402f44
xor eax, eax
jmp 0x402f54
push 0xffffffffffffffff
mov edx, dword [ebp - 0x58]
push edx
call sub.KERNEL32.DLL_WaitForSingleObject
mov eax, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403110
Capabilities:
Check for software breakpoints
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push ebx
push esi
push edi
mov eax, fcn.00401bcc
mov dword [ebp - 4], eax
mov esi, dword [ebp - 4]
mov al, byte [esi]
cmp al, 0xcc
je 0x4031c3
mov eax, fcn.00401828
mov dword [ebp - 8], eax
mov esi, dword [ebp - 8]
mov al, byte [esi]
cmp al, 0xcc
je 0x4031c3
mov eax, fcn.00403340
mov dword [ebp - 0xc], eax
mov esi, dword [ebp - 0xc]
mov al, byte [esi]
cmp al, 0xcc
je 0x4031c3
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
xor ebx, ebx
mov edi, 0x20
mov ecx, dword [eax + 4]
mov eax, dword [ebp + 0xc]
mov edx, dword [edx]
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x1c], eax
jmp 0x4031c3
add ebx, 0x9e3779b9
mov eax, ecx
shl eax, 4
add eax, dword [ebp - 0x10]
lea esi, [ebx + ecx]
xor eax, esi
mov esi, ecx
shr esi, 5
add esi, dword [ebp - 0x14]
xor eax, esi
add edx, eax
mov eax, edx
shl eax, 4
add eax, dword [ebp - 0x18]
lea esi, [ebx + edx]
xor eax, esi
mov esi, edx
shr esi, 5
add esi, dword [ebp - 0x1c]
xor eax, esi
add ecx, eax
mov eax, edi
add edi, 0xffffffff
test eax, eax
jg 0x40318b
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov edx, dword [ebp + 8]
mov dword [edx + 4], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4031e0
Capabilities:
Check for software breakpoints
Decrypt data using tea

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push ebx
push esi
push edi
mov eax, fcn.00401bcc
mov dword [ebp - 4], eax
mov esi, dword [ebp - 4]
mov al, byte [esi]
cmp al, 0xcc
je 0x403296
mov eax, fcn.00401828
mov dword [ebp - 8], eax
mov esi, dword [ebp - 8]
mov al, byte [esi]
cmp al, 0xcc
je 0x403296
mov eax, fcn.004031e0
mov dword [ebp - 0xc], eax
mov esi, dword [ebp - 0xc]
mov al, byte [esi]
cmp al, 0xcc
je 0x403296
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ebx, 0xc6ef3720
mov edi, 0x20
mov ecx, dword [edx]
mov edx, dword [eax + 4]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x1c], eax
jmp 0x403296
mov eax, ecx
shl eax, 4
add eax, dword [ebp - 0x18]
lea esi, [ebx + ecx]
xor eax, esi
mov esi, ecx
shr esi, 5
add esi, dword [ebp - 0x1c]
xor eax, esi
sub edx, eax
mov eax, edx
shl eax, 4
add eax, dword [ebp - 0x10]
lea esi, [ebx + edx]
xor eax, esi
mov esi, edx
shr esi, 5
add esi, dword [ebp - 0x14]
xor eax, esi
sub ecx, eax
sub ebx, 0x9e3779b9
mov eax, edi
add edi, 0xffffffff
test eax, eax
jg 0x40325e
mov eax, dword [ebp + 8]
mov dword [eax], ecx
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403390
Capabilities:
Check for software breakpoints
Decrypt data using tea

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push ebx
push esi
push edi
mov eax, fcn.00401bcc
mov dword [ebp - 4], eax
mov esi, dword [ebp - 4]
mov al, byte [esi]
cmp al, 0xcc
je 0x403446
mov eax, fcn.00401828
mov dword [ebp - 8], eax
mov esi, dword [ebp - 8]
mov al, byte [esi]
cmp al, 0xcc
je 0x403446
mov eax, fcn.00403340
mov dword [ebp - 0xc], eax
mov esi, dword [ebp - 0xc]
mov al, byte [esi]
cmp al, 0xcc
je 0x403446
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ebx, 0xc6ef3720
mov edi, 0x20
mov ecx, dword [edx]
mov edx, dword [eax + 4]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x1c], eax
jmp 0x403446
mov eax, ecx
shl eax, 4
add eax, dword [ebp - 0x18]
lea esi, [ebx + ecx]
xor eax, esi
mov esi, ecx
shr esi, 5
add esi, dword [ebp - 0x1c]
xor eax, esi
sub edx, eax
mov eax, edx
shl eax, 4
add eax, dword [ebp - 0x10]
lea esi, [ebx + edx]
xor eax, esi
mov esi, edx
shr esi, 5
add esi, dword [ebp - 0x14]
xor eax, esi
sub ecx, eax
sub ebx, 0x9e3779b9
mov eax, edi
add edi, 0xffffffff
test eax, eax
jg 0x40340e
mov eax, dword [ebp + 8]
mov dword [eax], ecx
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x404c54
Capabilities:
Get memory capacity

Disassembly:
add esp, 0xffffffe0
mov dword [esp], 0x20
push esp
call sub.KERNEL32.DLL_GlobalMemoryStatus
mov eax, dword [esp + 0xc]
add esp, 0x20
ret

Function at 0x40671c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x406738
call fcn.00407ae8
pop ebx
pop ebp
ret
test byte [ebp + 0xc], 2
je 0x406753
test bl, 1
je 0x406753
mov dword [0x4930ec], 5
or eax, 0xffffffff
pop ebx
pop ebp
ret
xor eax, eax
pop ebx
pop ebp
ret
Function at 0x406900
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
test byte [ebp + 0xd], 0xc0
jne 0x40691f
mov eax, dword [0x492214]
mov edx, dword [eax]
and edx, 0xc000
or dword [ebp + 0xc], edx
test byte [ebp + 0xd], 0x80
jne 0x40692c
or dword [ebp + 0xc], 0x4000
mov ecx, dword [ebp + 0xc]
and ecx, 0x700
cmp ecx, 0x500
jg 0x406959
je 0x40696b
sub ecx, 0x100
je 0x406979
sub ecx, 0x100
je 0x406980
sub ecx, 0x100
je 0x406972
jmp 0x406987
sub ecx, 0x600
je 0x406980
sub ecx, 0x100
je 0x40696b
jmp 0x406987
mov edi, 1
jmp 0x40698c
mov edi, 2
jmp 0x40698c
mov edi, 4
jmp 0x40698c
mov edi, 5
jmp 0x40698c
mov edi, 3
test byte [ebp + 0xd], 1
je 0x4069b3
lea eax, [ebp + 0x10]
add eax, 4
mov eax, dword [eax - 4]
and eax, dword [0x491c8c]
test al, 0x80
je 0x4069ac
mov ebx, 0x80
jmp 0x4069c5
mov ebx, 1
jmp 0x4069c5
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x4069c5
xor ebx, ebx
mov eax, dword [ebp + 0xc]
and eax, 3
sub eax, 1
jb 0x4069d7
je 0x4069e0
dec eax
je 0x4069e9
jmp 0x4069f2
mov dword [ebp - 4], 0x80000000
jmp 0x406a01
mov dword [ebp - 4], 0x40000000
jmp 0x406a01
mov dword [ebp - 4], 0xc0000000
jmp 0x406a01
push 1
call fcn.00407a84
pop ecx
mov ebx, eax
jmp 0x406af1
mov eax, dword [ebp + 0xc]
and eax, 0x70
sub eax, 0x10
je 0x406a1d
sub eax, 0x10
je 0x406a24
sub eax, 0x10
je 0x406a2d
sub eax, 0x10
je 0x406a36
jmp 0x406a36
xor edx, edx
mov dword [ebp - 8], edx
jmp 0x406a3d
mov dword [ebp - 8], 1
jmp 0x406a3d
mov dword [ebp - 8], 2
jmp 0x406a3d
mov dword [ebp - 8], 3
mov dword [ebp - 0x14], 0xc
xor ecx, ecx
mov dword [ebp - 0x10], ecx
lea ecx, [ebp - 0x14]
mov eax, dword [ebp + 0xc]
and eax, 0x80
cmp eax, 1
sbb edx, edx
neg edx
mov dword [ebp - 0xc], edx
push 0
push ebx
push edi
push ecx
mov eax, dword [ebp - 8]
push eax
mov edx, dword [ebp - 4]
push edx
mov ecx, dword [ebp + 8]
push ecx
call sub.KERNEL32.DLL_CreateFileA
mov esi, eax
cmp eax, 0xffffffff
jne 0x406aaa
call sub.KERNEL32.DLL_GetLastError
mov ebx, eax
and ebx, 0xffff
cmp ebx, 0x6e
jne 0x406a9f
test byte [ebp + 0xd], 1
je 0x406a9a
mov ebx, 0x50
jmp 0x406a9f
mov ebx, 2
push ebx
call fcn.00407a84
pop ecx
mov ebx, eax
jmp 0x406af1
mov edi, esi
push edi
call fcn.00406870
pop ecx
test eax, eax
je 0x406abe
or dword [ebp + 0xc], 0x2000
test bl, 1
jne 0x406aca
or dword [ebp + 0xc], 0x100
and dword [ebp + 0xc], 0xfffff8ff
mov eax, dword [ebp + 0xc]
push eax
push edi
call fcn.004077c8
add esp, 8
mov ebx, eax
inc eax
jne 0x406af1
push 4
call fcn.00407a84
pop ecx
push esi
call sub.KERNEL32.DLL_CloseHandle
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40b9ac
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov ebx, eax
test eax, eax
je 0x40ba0e
call fcn.0040b95c
mov esi, eax
lea eax, [ebp - 4]
push 0
push eax
push esi
call fcn.00405400
pop ecx
push eax
push esi
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea edx, [ebp - 4]
push edx
push edi
call fcn.00405400
pop ecx
push eax
push edi
push ebx
call sub.KERNEL32.DLL_WriteFile
push ebx
call sub.KERNEL32.DLL_CloseHandle
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret

Function at 0x40ba74
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff7c
cmp dword [0x4930f4], 0
push ebx
push esi
mov esi, dword [ebp + 8]
jne 0x40bb4e
cmp dword [0x4930f0], 0
jne 0x40bb4e
cmp dword [0x4932e4], 0
je 0x40bb08
push 0x80
lea eax, [ebp - 0x84]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0x5c
lea edx, [ebp - 0x84]
push edx
call fcn.0040b85c
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40baee
push 0x3a
lea edx, [ebp - 0x84]
push edx
call fcn.0040b85c
add esp, 8
mov ebx, eax
test eax, eax
jne 0x40baee
lea ebx, [ebp - 0x84]
jmp 0x40baef
inc ebx
call fcn.0040ba30
or eax, 0x10010
push eax
push ebx
push esi
push 0
call sub.USER32.DLL_MessageBoxA
jmp 0x40bb89
push 0xfffffffffffffff4
call sub.KERNEL32.DLL_GetStdHandle
mov ebx, eax
lea eax, [ebp - 4]
push 0
push eax
push 2
push 0x4930f8
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea edx, [ebp - 4]
push edx
push esi
call fcn.00405400
pop ecx
push eax
push esi
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea ecx, [ebp - 4]
push ecx
push 2
push 0x4930fb
push ebx
call sub.KERNEL32.DLL_WriteFile
jmp 0x40bb89
cmp dword [0x4930f0], 0
je 0x40bb68
cmp dword [0x4930f0], 0xffffffff
je 0x40bb89
push esi
call dword [0x4930f0]
pop ecx
mov eax, dword [0x4930f4]
test eax, eax
je 0x40bb89
cmp dword [0x4930f4], 0xffffffff
je 0x40bb89
cmp byte [eax], 0
je 0x40bb89
push esi
push eax
call fcn.0040b9ac
add esp, 8
pop esi
pop ebx
mov esp, ebp
pop ebp
ret