joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40c7f6
Capabilities:
Hide graphical window

Disassembly:
push ebx
push ebp
push esi
push edi
push dword [0x441910]
mov edi, dword [esp + 0x18]
push edi
call dword [sym.imp.USER32.dll_SetWindowTextW]
push dword [0x44190c]
mov esi, dword [sym.imp.USER32.dll_SetDlgItemTextW]
push 0x1faf
push edi
call esi
push dword [0x441914]
push 1
push edi
call esi
push dword [0x441918]
push 0x1fb0
push edi
call esi
push dword [0x44191c]
mov ebx, 0x1fb1
push ebx
push edi
call esi
push dword [0x441920]
mov ebp, 0x1fa6
push ebp
push edi
call esi
cmp dword [0x441900], 0
mov esi, dword [sym.imp.USER32.dll_ShowWindow]
jne 0x40c891
push 6
push edi
mov dword [0x441900], 1
call esi
push 9
push edi
call esi
push 3
xor eax, eax
push eax
push eax
push eax
push eax
push 0xffffffffffffffff
push edi
call dword [sym.imp.USER32.dll_SetWindowPos]
push edi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov eax, dword [0x441908]
test al, 4
je 0x40c8ee
push 0
push 1
push edi
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call esi
push 1
push 0x1fb0
push edi
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call esi
push 1
push ebx
push edi
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call esi
push 0
push ebp
mov ebp, dword [sym.imp.USER32.dll_GetDlgItem]
push edi
call ebp
push eax
call esi
test byte [0x441909], 1
je 0x40c8e1
push ebx
jmp 0x40c8e6
push 0x1fb0
push edi
call ebp
jmp 0x40c9af
mov ecx, eax
and ecx, 5
cmp cl, 5
jne 0x40c931
push 0
push 1
push edi
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call esi
push 0
push 0x1fb0
push edi
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call esi
push 0
push ebx
mov ebx, dword [sym.imp.USER32.dll_GetDlgItem]
push edi
call ebx
push eax
call esi
push 1
push ebp
push edi
call ebx
push eax
call esi
jmp 0x40c975
test al, 1
push 1
push 1
push edi
je 0x40c978
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call esi
push 0
push 0x1fb0
push edi
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call esi
push 0
push ebx
mov ebx, dword [sym.imp.USER32.dll_GetDlgItem]
push edi
call ebx
push eax
call esi
push 1
push ebp
push edi
call ebx
push eax
call esi
test byte [0x441909], 1
je 0x40c9aa
push ebp
jmp 0x40c9ac
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call esi
push 0
push 0x1fb0
push edi
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call esi
push 0
push ebx
mov ebx, dword [sym.imp.USER32.dll_GetDlgItem]
push edi
call ebx
push eax
call esi
push 0
push ebp
push edi
call ebx
push eax
call esi
push 1
push edi
call ebx
push eax
call dword [sym.imp.USER32.dll_SetFocus]
test byte [0x44190a], 2
je 0x40c9c6
push edi
call fcn.0040c73b
pop ecx
pop edi
pop esi
xor eax, eax
pop ebp
inc eax
pop ebx
ret
Function at 0x40cb01
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
push ebp
mov eax, 0x501c
lea ebp, [esp - 0x4f9c]
call fcn.0040fd20
mov eax, dword [0x4223b0]
push ebx
push edi
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
push 0x41e718
mov dword [ebp + 0x4f98], eax
xor edi, edi
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
mov dword [ebp - 0x80], eax
je 0x40cc6d
push esi
push ebx
push 0x84000002
push ebx
push ebx
push dword [ebp + 0x4fa4]
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x78], esi
je 0x40cc63
push ebx
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x68]
push eax
push 5
push esi
mov dword [ebp - 0x6c], 0x5000
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x40cb8d
lea eax, [ebp - 0x68]
push eax
call fcn.00410f07
pop ecx
mov dword [ebp - 0x74], eax
jmp 0x40cb94
mov dword [ebp - 0x74], 0x64000
push 0x41b4c8
push dword [ebp + 0x4fa8]
call fcn.0040fbd8
pop ecx
pop ecx
mov dword [ebp - 0x70], eax
lea eax, [ebp - 0x6c]
push eax
mov edi, 0x400
push edi
lea eax, [ebp - 0x68]
push eax
push esi
mov esi, dword [sym.imp.WININET.dll_InternetReadFile]
jmp 0x40cc39
cmp dword [ebp - 0x6c], 0
jbe 0x40cc3f
cmp dword [ebp - 0x70], 0
je 0x40cbe0
push dword [ebp - 0x70]
lea eax, [ebp - 0x68]
push dword [ebp - 0x6c]
push 1
push eax
call fcn.0040fb30
add esp, 0x10
add ebx, dword [ebp - 0x6c]
cmp dword [ebp + 0x4fac], 0
je 0x40cc2d
test ebx, ebx
mov dword [ebp - 0x7c], ebx
fild dword [ebp - 0x7c]
push 0
jge 0x40cbfe
fadd qword [0x41e710]
mov eax, dword [ebp - 0x74]
fmul qword [0x41e708]
test eax, eax
fild dword [ebp - 0x74]
jge 0x40cc14
fadd qword [0x41e710]
fdivp st(1)
call fcn.004108b0
push eax
push 0x402
push dword [ebp + 0x4fac]
call dword [sym.imp.USER32.dll_SendMessageA]
lea eax, [ebp - 0x6c]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x78]
call esi
test eax, eax
jne 0x40cbc0
cmp dword [ebp - 0x70], 0
je 0x40cc4e
push dword [ebp - 0x70]
call fcn.0040f81f
pop ecx
cmp ebx, dword [ebp - 0x74]
je 0x40cc60
cmp dword [ebp - 0x74], 0x64000
je 0x40cc60
xor edi, edi
jmp 0x40cc63
xor edi, edi
inc edi
push dword [ebp - 0x80]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop esi
mov ecx, dword [ebp + 0x4f98]
mov eax, edi
pop edi
pop ebx
call fcn.0040f3ac
add ebp, 0x4f9c
leave
ret
Function at 0x40d2b0
Capabilities:
Connect pipe
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push 1
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
push 1
lea ecx, [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov dword [ebp - 0x20], 0xc
mov dword [ebp - 0x18], 1
lea edx, [ebp - 0x14]
mov dword [ebp - 0x1c], edx
mov eax, 1
test eax, eax
je 0x40d3b1
lea ecx, [ebp - 0x20]
push ecx
push 0x3e8
push 0x800
push 0x800
push 0xff
push 6
push 3
mov edx, dword [str..pipec20ukdrwpipe_winnt]
push edx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov dword [0x44214c], eax
cmp dword [0x44214c], 0xffffffff
jne 0x40d331
xor eax, eax
jmp 0x40d3b4
push 0
mov eax, dword [0x44214c]
push eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x40d35c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
jne 0x40d35c
mov dword [ebp - 0x28], 1
cmp dword [ebp - 0x28], 0
je 0x40d395
lea ecx, [ebp - 0x2c]
push ecx
push 0
mov edx, dword [0x44214c]
push edx
push 0x40d400
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40d389
jmp 0x40d3b1
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40d3ac
mov ecx, dword [0x44214c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x44214c], 0
jmp 0x40d2e6
mov eax, dword [ebp - 0x28]
mov esp, ebp
pop ebp
ret

Function at 0x40d7c0
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push str.c20ukdrwsvc
call fcn.0040d760
add esp, 4
test eax, eax
je 0x40d7e4
mov eax, 1
jmp 0x40d888
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40d803
xor eax, eax
jmp 0x40d888
push 0x104
lea eax, [ebp - 0x110]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0
push 0x41e761
push 0
push 0
lea ecx, [ebp - 0x110]
push ecx
push 1
push 2
push 0x10
push 0xf01ff
push str.c20ukdrwsvc
push str.c20ukdrwsvc
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40d861
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x40d888
push 0
push 0
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov esp, ebp
pop ebp
ret
Function at 0x40d890
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push str.c20ukdrwsvc
call fcn.0040d760
add esp, 4
test eax, eax
jne 0x40d8b1
mov eax, 1
jmp 0x40d938
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40d8cd
xor eax, eax
jmp 0x40d938
push 0x10020
push str.c20ukdrwsvc
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40d8f8
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x40d938
lea edx, [ebp - 0x28]
push edx
push 1
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov dword [ebp - 8], eax
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 8], 0
je 0x40d936
mov eax, 1
jmp 0x40d938
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x40ed80
Capabilities:
Log keystrokes via application hook

Disassembly:
xor eax, eax
push edi
mov dword [0x442154], eax
mov ecx, 0x20
mov edi, 0x442160
rep stosd dword es:[edi], eax
mov dword [0x4421f8], eax
mov dword [0x4421fc], eax
mov dword [0x442200], eax
mov dword [0x442204], eax
mov dword [0x442208], eax
mov eax, dword [0x4421e0]
test eax, eax
mov dword [0x4421f4], 1
pop edi
jne 0x40eddc
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0
push 0x40e6b0
push 2
call dword [sym.imp.USER32.dll_SetWindowsHookExA]
mov dword [0x4421e0], eax
ret

Function at 0x40ee10
Capabilities:
Log keystrokes via application hook

Disassembly:
xor eax, eax
push edi
mov dword [0x442154], eax
mov ecx, 0x20
mov edi, 0x442160
rep stosd dword es:[edi], eax
mov dword [0x4421f8], eax
mov dword [0x4421fc], eax
mov dword [0x442200], eax
mov dword [0x442204], eax
mov dword [0x442208], eax
mov eax, dword [0x4421e0]
test eax, eax
pop edi
jne 0x40ee62
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0
push 0x40e6b0
push 2
call dword [sym.imp.USER32.dll_SetWindowsHookExA]
mov dword [0x4421e0], eax
mov eax, 1
ret
Function at 0x410aa3
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x41e880
call fcn.00410c8c
mov edi, 0x94
mov eax, edi
call fcn.0040fd20
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 [0x4423a8], ecx
mov eax, dword [esi + 4]
mov dword [0x4423b4], eax
mov edx, dword [esi + 8]
mov dword [0x4423b8], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4423ac], esi
cmp ecx, 2
je 0x410b03
or esi, 0x8000
mov dword [0x4423ac], esi
shl eax, 8
add eax, edx
mov dword [0x4423b0], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x410b3e
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x410b3e
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x410b56
cmp eax, 0x20b
je 0x410b43
mov dword [ebp - 0x1c], esi
jmp 0x410b6a
cmp dword [ecx + 0x84], 0xe
jbe 0x410b3e
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x410b64
cmp dword [ecx + 0x74], 0xe
jbe 0x410b3e
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0041299f
pop ecx
test eax, eax
jne 0x410b7e
push 0x1c
call fcn.00410a7f
pop ecx
call fcn.00413f9b
test eax, eax
jne 0x410b8f
push 0x10
call fcn.00410a7f
pop ecx
call fcn.004158ce
mov dword [ebp - 4], esi
call fcn.00414668
test eax, eax
jge 0x410ba8
push 0x1b
call fcn.00410a5a
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x443a84], eax
call fcn.004157ac
mov dword [0x442228], eax
call fcn.0041570a
test eax, eax
jge 0x410bce
push 8
call fcn.00410a5a
pop ecx
call fcn.004154d7
test eax, eax
jge 0x410bdf
push 9
call fcn.00410a5a
pop ecx
push 1
call fcn.00414343
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x410bf5
push eax
call fcn.00410a5a
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.0041547a
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x410c16
movzx eax, word [ebp - 0x40]
jmp 0x410c19
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00407103
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x410c37
push edi
call fcn.00414470
call fcn.00414492
jmp 0x410c69
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00410cc7
ret
Function at 0x4121bd
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x4223b0]
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 0x4121ee
xor eax, eax
jmp 0x412377
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 + 0x442940]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x41222a
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00416cfe
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x412305
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x412343
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 0x41228e
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x41227f
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 0x41225f
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 0x4122ce
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x4122d7
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x412250
jmp 0x4122d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x412372
cmp dword [ebp - 0x6c], edi
je 0x412343
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x412338
call fcn.004127de
mov dword [eax], 9
call fcn.004127e7
mov dword [eax], esi
jmp 0x41236d
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 0x41232d
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x4122d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x4122d9
push dword [ebp - 0x6c]
call fcn.004127f0
pop ecx
jmp 0x41236d
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x41235b
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x41235b
xor eax, eax
jmp 0x412375
call fcn.004127de
mov dword [eax], 0x1c
call fcn.004127e7
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x412375
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.0040f3ac
add ebp, 0x3a0
leave
ret
Function at 0x4143ad
Capabilities:
Terminate process

Disassembly:
push 8
push 0x41ecb8
call fcn.00410c8c
push 8
call fcn.00412645
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x4423e8], esi
jne 0x4143e1
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x4423e4], esi
mov al, byte [ebp + 0x10]
mov byte [0x4423e0], al
cmp dword [ebp + 0xc], edi
jne 0x41442b
cmp dword [0x442a48], edi
je 0x41441b
mov eax, dword [0x442a44]
sub eax, 4
mov dword [0x442a44], eax
cmp eax, dword [0x442a48]
jb 0x41441b
mov eax, dword [eax]
cmp eax, edi
je 0x4143fc
call eax
jmp 0x4143fc
push 0x422048
mov eax, 0x422040
call fcn.0041432b
pop ecx
push 0x422054
mov eax, 0x42204c
call fcn.0041432b
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x41445c
cmp dword [ebp + 0x10], edi
jne 0x41446a
mov dword [0x4423e8], esi
push dword [ebp + 8]
call fcn.004142e9
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x414469
push 8
call fcn.00412590
pop ecx
ret
call fcn.00410cc7
ret
Function at 0x414ee0
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 0x4150b4
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x442940]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x4150b4
test cl, 0x48
je 0x414f4b
cmp byte [eax + 5], 0xa
je 0x414f4b
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 0x414f9d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x414f85
call fcn.004127de
mov dword [eax], 9
call fcn.004127e7
mov dword [eax], esi
jmp 0x414f95
cmp eax, 0x6d
je 0x4150b4
push eax
call fcn.004127f0
pop ecx
or eax, 0xffffffff
jmp 0x4150b6
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x4150af
test eax, eax
je 0x414fc4
cmp byte [ebx], 0xa
jne 0x414fc4
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x414fcd
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 0x4150a9
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x415099
cmp al, 0xd
je 0x414fff
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x41508b
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x415019
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x415014
add dword [ebp + 0x10], 2
jmp 0x41506d
mov dword [ebp + 0x10], eax
jmp 0x415087
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 0x415041
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x415087
cmp dword [ebp - 0xc], 0
je 0x415087
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x415062
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x41506d
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x41508a
cmp ebx, dword [ebp + 0xc]
jne 0x415072
cmp byte [ebp - 1], 0xa
jne 0x415072
mov byte [ebx], 0xa
jmp 0x41508a
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00414866
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x41508b
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x414fe3
jmp 0x4150a9
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x4150a9
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 0x4150b6
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x415166
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x4223b0]
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 + 0x422970]
je 0x41519b
inc eax
cmp eax, 0x13
jb 0x41518c
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x422970]
jne 0x4152c1
mov eax, dword [0x442230]
cmp eax, 1
je 0x415299
cmp eax, edx
jne 0x4151cb
cmp dword [0x4223e8], 1
je 0x415299
cmp ecx, 0xfc
je 0x4152c1
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 0x415201
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.0040f1f0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.0040f2f0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x415235
mov eax, edi
push eax
call fcn.0040f2f0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x41e93c
push edi
call fcn.00416410
add esp, 0x10
push edi
call fcn.0040f2f0
push dword [esi + 0x422974]
mov ebx, eax
call fcn.0040f2f0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040fd20
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.0040f1f0
push edi
push ebx
call fcn.0040f200
push 0x41e938
push ebx
call fcn.0040f200
push dword [esi + 0x422974]
push ebx
call fcn.0040f200
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00416311
add esp, 0x2c
jmp 0x4152c1
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x422974]
push dword [esi]
call fcn.0040f2f0
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.0040f3ac
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret