joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46dc48
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 4
push 0
push 0
dec ecx
jne 0x46dc50
push ecx
push ebx
mov ebx, eax
xor eax, eax
push ebp
push 0x46ddfe
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebx + 0x30c]
mov edx, 0x46de14
call fcn.004045fc
lea ecx, [ebp - 0xc]
lea edx, [ebp - 1]
mov eax, ebx
call fcn.0046e0b8
cmp byte [ebp - 1], 0
je 0x46dcb2
mov eax, dword [0x4710f4]
mov eax, dword [eax]
mov eax, dword [eax + 0x2f0]
mov edx, 0x46de20
call fcn.00435dc0
mov edx, dword [ebp - 0xc]
mov eax, ebx
call fcn.0046e63c
jmp 0x46ddc5
push dword [ebx + 0x30c]
push 0x46de3c
push 0x46de48
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.00404920
mov eax, dword [ebp - 0x14]
call fcn.00404a58
mov edx, eax
lea eax, [ebp - 0x10]
call fcn.00404798
mov eax, dword [ebp - 0x10]
call fcn.00408c74
test al, al
je 0x46dd1f
push 5
push dword [ebx + 0x30c]
push 0x46de3c
push 0x46de48
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.00404920
mov eax, dword [ebp - 0x18]
call fcn.00404a58
push eax
call sub.kernel32.dll_WinExec
jmp 0x46ddc5
lea eax, [ebp - 0x1c]
push eax
mov edx, 0x46de48
mov eax, 0x46de14
call fcn.00404b9c
push eax
mov eax, 0x46de48
mov edx, 1
pop ecx
call fcn.00404ab8
mov edx, dword [ebp - 0x1c]
lea eax, [ebp - 8]
mov ecx, 0x46de5c
call fcn.004048ac
push 0
push 0x46de68
push dword [ebx + 0x30c]
push 0x46de3c
push dword [ebp - 8]
push 0x46de7c
lea eax, [ebp - 0x20]
mov edx, 5
call fcn.00404920
mov eax, dword [ebp - 0x20]
call fcn.00404a58
push eax
call sub.kernel32.dll_WinExec
mov dword [ebp - 0xc], eax
mov eax, 0x3e8
call fcn.00458288
push 5
push dword [ebx + 0x30c]
push 0x46de3c
push 0x46de48
lea eax, [ebp - 0x24]
mov edx, 3
call fcn.00404920
mov eax, dword [ebp - 0x24]
call fcn.00404a58
push eax
call sub.kernel32.dll_WinExec
mov dword [ebp - 0xc], eax
push 0
push 0
push 0x10
mov eax, dword [0x4713d4]
mov eax, dword [eax]
mov eax, dword [eax + 0x30]
push eax
call sub.user32.dll_PostMessageA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46de05
lea eax, [ebp - 0x24]
mov edx, 6
call fcn.004045cc
lea eax, [ebp - 8]
call fcn.004045a8
ret
Function at 0x4033c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
push 0x419dac
call fcn.00408100
mov eax, dword [esp + 0x10]
mov byte [0x419eaf], 0
mov dword [0x419da8], 0x172
mov ecx, dword [eax + 0x18]
add esp, 0xc
cmp ecx, 8
jb 0x403409
mov eax, dword [eax + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
ret
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
ret

Function at 0x403420
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x278
mov eax, dword [0x4191b4]
push esi
push edi
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
push 0x419dac
mov dword [esp + 0x288], eax
mov dword [esp + 0x18], str.ExecuteFile
call fcn.00408100
push str.ExecuteFile
push str._s:_Enter
push 0x419da0
mov byte [0x419eaf], 0
mov dword [0x419da8], 0x182
call fcn.00403010
mov edx, dword [0x419da4]
xor esi, esi
xor eax, eax
add esp, 0x18
inc edx
mov ecx, 0x82
lea edi, [esp + 0x6a]
mov word [esp + 0x68], si
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
mov dword [0x419da4], edx
mov ecx, dword [eax + 0x18]
mov edx, 8
cmp ecx, edx
jb 0x4034b3
mov eax, dword [eax + 4]
jmp 0x4034b6
add eax, 4
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x18], edx
jb 0x4034c3
mov ecx, dword [ecx + 4]
jmp 0x4034c6
add ecx, 4
push eax
push ecx
push str._s__s
lea eax, [esp + 0x74]
push 0x105
push eax
call fcn.004086ad
add esp, 0x14
xor eax, eax
mov ecx, 0x11
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
xor ecx, ecx
mov dword [esp + 0x10], ecx
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
lea eax, [esp + 0x24]
push eax
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
mov dword [esp + 0x3c], ecx
lea ecx, [esp + 0x88]
push ecx
push 0
mov dword [esp + 0x48], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x403552
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x403542
mov edx, dword [esp + 0x10]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x403547
mov esi, 1
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
push 0x419dac
call fcn.00408100
add esp, 0xc
lea ecx, [esp + 0xc]
mov byte [0x419eaf], 0
mov dword [0x419da8], 0x1a2
call fcn.00403110
mov ecx, dword [esp + 0x27c]
mov eax, esi
call fcn.00407a34
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4035a0
Capabilities:
Enumerate process modules

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x434
mov eax, dword [0x4191b4]
push ebx
push esi
mov dword [esp + 0x438], eax
mov eax, dword [ebp + 8]
push edi
push eax
push 8
mov dword [esp + 0x14], 0
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
cmp ebx, 0xffffffff
je 0x403643
xor eax, eax
mov ecx, 0x10a
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
push ecx
push ebx
mov dword [esp + 0x18], 0x428
call sub.KERNEL32.dll_Module32FirstW
test eax, eax
je 0x40363c
mov esi, dword [ebp + 0xc]
lea esp, [esp]
cmp dword [esi + 0x18], 8
jb 0x40360b
mov eax, dword [esi + 4]
jmp 0x40360e
lea eax, [esi + 4]
lea edx, [esp + 0x230]
push edx
push eax
call fcn.00408600
add esp, 8
test eax, eax
je 0x403634
lea eax, [esp + 0x10]
push eax
push ebx
call sub.KERNEL32.dll_Module32NextW
test eax, eax
jne 0x403600
jmp 0x40363c
mov dword [esp + 0xc], 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
push 0x419dac
call fcn.00408100
mov ecx, dword [esp + 0x448]
mov eax, dword [esp + 0x18]
add esp, 0xc
mov byte [0x419eaf], 0
mov dword [0x419da8], 0x23a
call fcn.00407a34
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x403690
Capabilities:
Enumerate processes

Disassembly:
sub esp, 0x234
mov eax, dword [0x4191b4]
push edi
push 0
push 2
mov dword [esp + 0x23c], eax
mov dword [esp + 0xc], 0
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov edi, eax
cmp edi, 0xffffffff
je 0x40374b
lea eax, [esp + 8]
push eax
push edi
mov dword [esp + 0x10], 0x22c
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x403744
push ebx
mov ebx, dword [esp + 0x244]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push esi
mov esi, dword [esp + 0x248]
lea ecx, [ecx]
cmp dword [esi + 0x18], 8
jb 0x4036fb
mov eax, dword [esi + 4]
jmp 0x4036fe
lea eax, [esi + 4]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.00408600
add esp, 8
test eax, eax
jne 0x403728
call ebp
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
je 0x403728
push ebx
push ecx
call fcn.004035a0
add esp, 8
test eax, eax
jne 0x403739
lea edx, [esp + 0x14]
push edx
push edi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x4036f0
jmp 0x403741
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
pop esi
pop ebp
pop ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
push 0x419dac
call fcn.00408100
mov ecx, dword [esp + 0x240]
mov eax, dword [esp + 0x10]
add esp, 0xc
mov byte [0x419eaf], 0
mov dword [0x419da8], 0x25f
pop edi
call fcn.00407a34
add esp, 0x234
ret
Function at 0x403790
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x94
mov eax, dword [0x4191b4]
push ebx
push esi
push edi
xor ebx, ebx
push ebx
mov dword [esp + 0xa0], eax
xor edi, edi
call fcn.004089d7
mov esi, dword [ebp + 8]
mov ecx, dword [esi + 0x14]
mov dword [esp + 0x14], eax
sub eax, ecx
mov ecx, dword [esi + 4]
imul ecx, ecx, 0x15180
add esp, 4
cmp eax, ecx
jle 0x4037d6
mov edi, 1
cmp edi, ebx
mov dword [esp + 0xc], ebx
je 0x403970
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
push 0x419dac
call fcn.00408100
push str.Time_is_used_up__ouc_will_check_if_delay_time_is_ok
push 0x419da0
mov byte [0x419eaf], bl
mov dword [0x419da8], 0x37b
call fcn.00403010
mov eax, dword [esi + 8]
add esp, 0x14
cmp eax, 3
jb 0x40385b
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
push 0x419dac
call fcn.00408100
push str.DelayTimes___3
push 0x419da0
mov byte [0x419eaf], bl
mov dword [0x419da8], 0x37f
call fcn.00403010
add esp, 0x14
jmp 0x403968
mov eax, dword [esi + 0x10]
cmp eax, ebx
jne 0x403962
mov eax, dword [0x41911c]
xor edi, edi
cmp eax, 8
mov eax, dword [0x419108]
jae 0x40387c
mov eax, 0x419108
push eax
push 0x2d0
push str.TimeRandomRange
push str.UpdateSetting
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov esi, dword [esi + 8]
cmp esi, 1
je 0x4038a1
cmp esi, 2
jne 0x4038a3
shr eax, 1
mov edi, eax
call fcn.004089b5
imul eax, edi
imul eax, eax, 0x3c
cdq
and edx, 0x7fff
add eax, edx
mov edx, dword [esp + 0x10]
sar eax, 0xf
lea edx, [eax + edx + 1]
xor eax, eax
mov word [esp + 0x18], bx
mov ecx, 0x1f
lea edi, [esp + 0x1a]
rep stosd dword es:[edi], eax
push edx
push 0x415500
stosw word es:[edi], ax
lea eax, [esp + 0x20]
push 0x3f
push eax
mov dword [esp + 0x24], edx
call fcn.004086ad
mov eax, dword [0x419138]
add esp, 0x10
cmp eax, 8
mov eax, dword [0x419124]
jae 0x403903
mov eax, 0x419124
push eax
lea ecx, [esp + 0x1c]
push ecx
push str.DelayTime
push str.DelayInfo
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
push 0x419dac
call fcn.00408100
lea edx, [esp + 0x20]
push edx
mov byte [0x419eaf], bl
mov dword [0x419da8], 0x39d
call fcn.00408828
push eax
call fcn.0040871d
push eax
push str.Delay_to_Time___s_
push 0x419da0
call fcn.00403010
add esp, 0x20
jmp 0x403970
cmp dword [esp + 0x10], eax
jl 0x403970
mov dword [esp + 0xc], 1
push 0x103
push str.Windows_tsp_product1.7_Code_srcoucouc.cpp
push 0x419dac
call fcn.00408100
mov ecx, dword [esp + 0xa8]
mov eax, dword [esp + 0x18]
add esp, 0xc
mov byte [0x419eaf], bl
mov dword [0x419da8], 0x3a6
call fcn.00407a34
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4055ae
Capabilities:
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x413e48
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x74
mov eax, dword [0x4191b4]
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x78], eax
xor ebx, ebx
lea eax, [esp + 8]
push edi
push eax
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], 0xffffffff
mov byte [esi + 0xc], bl
call fcn.00404540
push 0x415868
push eax
lea ecx, [esp + 0x6c]
push ecx
mov dword [esp + 0x98], ebx
call fcn.00404080
add esp, 0x10
mov eax, dword [esp + 0x24]
mov edi, 8
cmp eax, edi
mov byte [esp + 0x88], 2
jb 0x40560d
mov edx, dword [esp + 0x10]
push edx
call fcn.00407316
add esp, 4
lea eax, [esp + 0x60]
push eax
mov dword [esp + 0x28], 7
mov dword [esp + 0x24], ebx
mov word [esp + 0x14], bx
call fcn.004033c0
add esp, 4
test eax, eax
jne 0x405645
cmp dword [esp + 0x78], edi
mov eax, dword [esp + 0x64]
jae 0x40563d
lea eax, [esp + 0x64]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0x4157b8
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.00404080
mov ecx, dword [esp + 0x9c]
push ecx
push eax
lea edx, [esp + 0x58]
push edx
mov byte [esp + 0xa0], 3
call fcn.00404080
mov eax, dword [esp + 0x58]
add esp, 0x18
cmp eax, edi
jb 0x40568c
mov eax, dword [esp + 0x2c]
push eax
call fcn.00407316
add esp, 4
cmp dword [esp + 0x5c], edi
mov eax, dword [esp + 0x48]
jae 0x40569a
lea eax, [esp + 0x48]
push 0x415864
push eax
call fcn.00408c27
add esp, 8
cmp eax, ebx
mov dword [esi], eax
je 0x4056bc
push str.______________________Start_Log__________________________________n
push eax
call fcn.00408098
add esp, 8
cmp dword [esp + 0x5c], edi
jb 0x4056cf
mov ecx, dword [esp + 0x48]
push ecx
call fcn.00407316
add esp, 4
cmp dword [esp + 0x78], edi
mov dword [esp + 0x5c], 7
mov dword [esp + 0x58], ebx
mov word [esp + 0x48], bx
jb 0x4056f3
mov edx, dword [esp + 0x64]
push edx
call fcn.00407316
add esp, 4
mov ecx, dword [esp + 0x80]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x74]
pop ebx
call fcn.00407a34
add esp, 0x80
ret 4
Function at 0x408c83
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x415cd0
call fcn.0040a2d4
mov edi, 0x94
mov eax, edi
call fcn.0040f2b0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x41a154], ecx
mov eax, dword [esi + 4]
mov dword [0x41a160], eax
mov edx, dword [esi + 8]
mov dword [0x41a164], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x41a158], esi
cmp ecx, 2
je 0x408ce3
or esi, 0x8000
mov dword [0x41a158], esi
shl eax, 8
add eax, edx
mov dword [0x41a15c], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x408d1e
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x408d1e
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x408d36
cmp eax, 0x20b
je 0x408d23
mov dword [ebp - 0x1c], esi
jmp 0x408d4a
cmp dword [ecx + 0x84], 0xe
jbe 0x408d1e
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x408d44
cmp dword [ecx + 0x74], 0xe
jbe 0x408d1e
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040f256
pop ecx
test eax, eax
jne 0x408d5e
push 0x1c
call fcn.00408c5f
pop ecx
call fcn.00409e18
test eax, eax
jne 0x408d6f
push 0x10
call fcn.00408c5f
pop ecx
call fcn.0040f1b4
mov dword [ebp - 4], esi
call fcn.0040bdb7
test eax, eax
jge 0x408d88
push 0x1b
call fcn.00408c3a
pop ecx
call fcn.0040f115
mov dword [0x41b884], eax
call fcn.0040efab
mov dword [0x419ee0], eax
call fcn.0040ef15
test eax, eax
jge 0x408dad
push 8
call fcn.00408c3a
pop ecx
call fcn.0040ece2
test eax, eax
jge 0x408dbe
push 9
call fcn.00408c3a
pop ecx
push 1
call fcn.0040d54f
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x408dd4
push eax
call fcn.00408c3a
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
call fcn.0040ec9c
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x408df5
movzx eax, word [ebp - 0x40]
jmp 0x408df8
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00406740
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x408e16
push edi
call fcn.0040d67c
call fcn.0040d69e
jmp 0x408e48
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040a30f
ret
Function at 0x40a542
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x4191b4]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x40a573
xor eax, eax
jmp 0x40a6fc
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x41a760]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40a5af
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00410b30
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40a68a
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x40a6c8
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x40a613
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40a604
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x40a5e4
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a653
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x40a65c
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x40a5d5
jmp 0x40a65e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x40a6f7
cmp dword [ebp - 0x6c], edi
je 0x40a6c8
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x40a6bd
call fcn.0040a923
mov dword [eax], 9
call fcn.0040a92c
mov dword [eax], esi
jmp 0x40a6f2
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a6b2
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x40a65e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x40a65e
push dword [ebp - 0x6c]
call fcn.0040a935
pop ecx
jmp 0x40a6f2
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40a6e0
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x40a6e0
xor eax, eax
jmp 0x40a6fa
call fcn.0040a923
mov dword [eax], 0x1c
call fcn.0040a92c
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40a6fa
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.00407a34
add ebp, 0x3a0
leave
ret
Function at 0x40bb31
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x40bd05
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x41a760]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40bd05
test cl, 0x48
je 0x40bb9c
cmp byte [eax + 5], 0xa
je 0x40bb9c
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40bbee
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40bbd6
call fcn.0040a923
mov dword [eax], 9
call fcn.0040a92c
mov dword [eax], esi
jmp 0x40bbe6
cmp eax, 0x6d
je 0x40bd05
push eax
call fcn.0040a935
pop ecx
or eax, 0xffffffff
jmp 0x40bd07
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x40bd00
test eax, eax
je 0x40bc15
cmp byte [ebx], 0xa
jne 0x40bc15
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40bc1e
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x40bcfa
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40bcea
cmp al, 0xd
je 0x40bc50
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40bcdc
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x40bc6a
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40bc65
add dword [ebp + 0x10], 2
jmp 0x40bcbe
mov dword [ebp + 0x10], eax
jmp 0x40bcd8
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40bc92
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40bcd8
cmp dword [ebp - 0xc], 0
je 0x40bcd8
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40bcb3
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40bcbe
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40bcdb
cmp ebx, dword [ebp + 0xc]
jne 0x40bcc3
cmp byte [ebp - 1], 0xa
jne 0x40bcc3
mov byte [ebx], 0xa
jmp 0x40bcdb
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040bfb5
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40bcdc
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40bc34
jmp 0x40bcfa
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40bcfa
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x40bd07
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40d5b9
Capabilities:
Terminate process

Disassembly:
push 8
push 0x4167d8
call fcn.0040a2d4
push 8
call fcn.0040b10c
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x41a194], esi
jne 0x40d5ed
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x41a190], esi
mov al, byte [ebp + 0x10]
mov byte [0x41a18c], al
cmp dword [ebp + 0xc], edi
jne 0x40d637
cmp dword [0x41a74c], edi
je 0x40d627
mov eax, dword [0x41a748]
sub eax, 4
mov dword [0x41a748], eax
cmp eax, dword [0x41a74c]
jb 0x40d627
mov eax, dword [eax]
cmp eax, edi
je 0x40d608
call eax
jmp 0x40d608
push 0x419040
mov eax, 0x419038
call fcn.0040d537
pop ecx
push 0x41904c
mov eax, 0x419044
call fcn.0040d537
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40d668
cmp dword [ebp + 0x10], edi
jne 0x40d676
mov dword [0x41a194], esi
push dword [ebp + 8]
call fcn.0040d4f5
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40d675
push 8
call fcn.0040b057
pop ecx
ret
call fcn.0040a30f
ret

Function at 0x40e988
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4191b4]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x4199f0]
je 0x40e9bd
inc eax
cmp eax, 0x13
jb 0x40e9ae
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4199f0]
jne 0x40eae3
mov eax, dword [0x419ee4]
cmp eax, 1
je 0x40eabb
cmp eax, edx
jne 0x40e9ed
cmp dword [0x4191d4], 1
je 0x40eabb
cmp ecx, 0xfc
je 0x40eae3
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40ea23
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040aad0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00408f30
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40ea57
mov eax, edi
push eax
call fcn.00408f30
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x415e2c
push edi
call fcn.00408100
add esp, 0x10
push edi
call fcn.00408f30
push dword [esi + 0x4199f4]
mov ebx, eax
call fcn.00408f30
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040f2b0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040aad0
push edi
push ebx
call fcn.0040aae0
push 0x415e28
push ebx
call fcn.0040aae0
push dword [esi + 0x4199f4]
push ebx
call fcn.0040aae0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00410f8a
add esp, 0x2c
jmp 0x40eae3
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4199f4]
push dword [esi]
call fcn.00408f30
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00407a34
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret