joyce8/EMBER2024-capa huggingface dataset:
Function at 0x56aa28
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Set socket configuration

Disassembly:
push edi
push ecx
mov eax, 0x1c
call fcn.006021b0
mov ecx, dword [esp + 0x1c]
mov edi, ecx
lea edx, [esp]
xor eax, eax
mov dword [edx], eax
mov dword [edx + 4], eax
mov dword [edx + 8], eax
mov dword [edx + 0xc], eax
mov eax, 2
mov word [esp], ax
movzx edx, word [edi + 0x30]
push edx
call sub.WSOCK32.dll_htons
mov word [esp + 2], ax
lea ecx, [esp + 0x10]
push dword [edi + 0x24]
call fcn.004e2910
lea ecx, [esp + 0x10]
call fcn.004e2a14
push eax
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
jne 0x56aa9c
lea ecx, [esp + 0x10]
call fcn.004e2a14
push eax
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x56aafc
mov eax, dword [eax + 0xc]
mov edx, dword [eax]
mov eax, dword [edx]
mov dword [esp + 4], eax
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
mov dword [edi + 8], eax
cmp eax, 0xffffffff
jne 0x56aadb
call fcn.005cae80
mov eax, dword [edi + 0x60]
mov edx, dword [eax]
push str.Failed_to_connect_nto_Mail_Socket_
push eax
call dword [edx + 0x48]
mov edi, eax
add esp, 8
lea ecx, [esp + 0x10]
call fcn.004e2a1c
mov eax, edi
add esp, 0x20
pop edi
ret
lea edx, [esp]
push 0x10
push edx
push eax
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
je 0x56ab27
lea ecx, [esp + 0x10]
call fcn.004e2a1c
xor eax, eax
add esp, 0x20
pop edi
ret
call fcn.005cae80
mov eax, dword [edi + 0x60]
mov edx, dword [eax]
push dword [edi + 0x24]
push str.Unknown_Mail_Server_n_s_
push eax
call dword [edx + 0x48]
mov edi, eax
add esp, 0xc
lea ecx, [esp + 0x10]
call fcn.004e2a1c
mov eax, edi
add esp, 0x20
pop edi
ret
call fcn.005cae80
mov eax, dword [edi + 0x60]
mov edx, dword [eax]
push str.Failed_to_connect_nto_Mail_Server_
push eax
call dword [edx + 0x48]
mov edi, eax
add esp, 8
lea ecx, [esp + 0x10]
call fcn.004e2a1c
mov eax, edi
add esp, 0x20
pop edi
ret
Function at 0x56ab50
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push edi
push esi
sub esp, 0x18
mov esi, ecx
mov dword [esp], 0x10
lea edx, [esp + 4]
lea eax, [esp]
push eax
push edx
push dword [esi + 8]
call sub.WSOCK32.dll_getsockname
lea eax, [esp + 8]
push 2
push 0x10
push eax
call sub.WSOCK32.dll_gethostbyaddr
test eax, eax
je 0x56ac28
lea ecx, [esp + 0x14]
mov edx, dword [eax]
call fcn.004ee018
mov edi, dword [esp + 0x14]
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x56aba6
inc ecx
inc eax
mov dl, byte [ecx]
test dl, dl
jne 0x56ab9e
add eax, 0xa
mov ecx, eax
call fcn.004dbf60
mov edi, eax
push str.ESMTP
push 0x661200
call fcn.006022b0
add esp, 8
test eax, eax
je 0x56ac14
push dword [esp + 0x14]
push str.EHLO__s_r_n
push edi
call fcn.00602336
add esp, 0xc
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x56abec
inc ecx
inc eax
mov dl, byte [ecx]
test dl, dl
jne 0x56abe4
push 0x638140
push eax
push edi
mov ecx, esi
call fcn.0056b088
mov esi, eax
mov ecx, dword [esp + 0x14]
call fcn.004dbc10
mov ecx, edi
call fcn.004dbc10
mov eax, esi
add esp, 0x18
pop esi
pop edi
ret
push dword [esp + 0x14]
push str.HELO__s_r_n
push edi
call fcn.00602336
add esp, 0xc
jmp 0x56abda
push dword [esp + 8]
call sub.WSOCK32.dll_inet_ntoa
lea ecx, [esp + 0x14]
mov edx, eax
call fcn.004ee018
jmp 0x56ab90
Function at 0x56b088
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x18
mov ebx, ecx
mov edi, dword [esp + 0x34]
lea ecx, [esp]
push dword [esp + 0x2c]
call fcn.004e2910
lea ecx, [esp]
call fcn.004e2a14
mov ebp, eax
lea ecx, [esp]
call fcn.004e2a18
test eax, eax
jbe 0x56b0d6
mov esi, eax
push 0
push esi
push ebp
push dword [ebx + 8]
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
je 0x56b1ae
sub esi, eax
add ebp, eax
test esi, esi
jne 0x56b0b9
lea ecx, [esp]
call fcn.004e2a1c
mov esi, dword [ebx + 8]
xor ebp, ebp
mov byte [0x661200], 0
mov dword [esp + 0x14], ebx
lea eax, [esp + 0x10]
push 0
push 1
push eax
push esi
call sub.WSOCK32.dll_recv
test eax, eax
je 0x56b1a1
cmp eax, 0xffffffff
je 0x56b128
mov al, byte [esp + 0x10]
mov byte [ebp + 0x661200], al
inc ebp
cmp al, 0xa
je 0x56b137
cmp ebp, 0x3e8
jb 0x56b0ee
mov byte [0x661200], 0
mov eax, 1
add esp, 0x18
pop ebx
pop ebp
pop esi
pop edi
ret 0xc
mov ebx, dword [esp + 0x14]
mov byte [ebp + 0x661200], 0
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x56b154
inc ecx
inc eax
mov dl, byte [ecx]
test dl, dl
jne 0x56b14c
push eax
push 0x661200
push edi
call fcn.006036d0
add esp, 0xc
test eax, eax
jne 0x56b192
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x56b179
inc ecx
inc eax
mov dl, byte [ecx]
test dl, dl
jne 0x56b171
cmp byte [eax + 0x661200], 0x2d
je 0x56b0de
xor eax, eax
add esp, 0x18
pop ebx
pop ebp
pop esi
pop edi
ret 0xc
mov eax, 1
add esp, 0x18
pop ebx
pop ebp
pop esi
pop edi
ret 0xc
mov ebx, dword [esp + 0x14]
mov byte [ebp + 0x661200], 0
jmp 0x56b142
lea ecx, [esp]
call fcn.004e2a1c
mov eax, 1
add esp, 0x18
pop ebx
pop ebp
pop esi
pop edi
ret 0xc

Function at 0x56b1c8
Capabilities:
Initialize winsock library

Disassembly:
push esi
push ecx
mov eax, 0x18c
call fcn.006021b0
mov ecx, dword [esp + 0x18c]
mov esi, ecx
lea eax, [esp]
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
jne 0x56b228
movzx edx, word [esp]
mov eax, edx
and eax, 0xff
cmp eax, 1
jne 0x56b20d
and edx, 0xffffff00
cmp edx, 0x100
je 0x56b23e
call fcn.005cae80
mov eax, dword [esi + 0x60]
mov edx, dword [eax]
push str.WinSock_1.1_failed_
push eax
call dword [edx + 0x48]
add esp, 0x198
pop esi
ret
mov eax, dword [esi + 0x60]
mov edx, dword [eax]
push str.WinSock_failed_nto_initialize_
push eax
call dword [edx + 0x48]
add esp, 0x198
pop esi
ret
xor eax, eax
add esp, 0x190
pop esi
ret
Function at 0x56b430
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
push ebx
sub esp, 0xc
mov ebp, ecx
push dword [esp + 0x18]
mov ecx, ebp
call fcn.00527240
mov dword [ebp], 0x638680
lea ecx, [esp]
call fcn.0050d580
lea ecx, [esp]
push 0x3a
push dword [esp + 0x20]
call fcn.0050d5f4
lea ecx, [esp]
push 0x3a
push dword [esp + 0xc]
call fcn.0050d5f4
push dword [esp + 8]
push dword [esp + 8]
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
je 0x56b4ad
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x56b4ad
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp + 8], eax
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], 0
lea ecx, [esp]
call fcn.0050d5e0
mov eax, ebp
add esp, 0xc
pop ebx
pop ebp
ret 8

Function at 0x56b64c
Capabilities:
Read file on windows

Disassembly:
push ebx
sub esp, 8
mov ebx, ecx
lea edx, [esp + 4]
lea eax, [esp]
push 0
push eax
push 2
push edx
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
xor eax, eax
push eax
push eax
push eax
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
mov al, byte [esp + 4]
cmp eax, 0xff
jne 0x56b690
xor eax, eax
mov al, byte [esp + 5]
cmp eax, 0xfe
je 0x56b697
xor eax, eax
add esp, 8
pop ebx
ret
mov eax, 1
add esp, 8
pop ebx
ret
Function at 0x59172c
Capabilities:
Encrypt data using blowfish

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x1c
mov edi, edx
mov esi, ecx
xor eax, eax
mov dword [esp], eax
mov dword [esp + 4], eax
xor ebx, ebx
xor ecx, ecx
test ecx, ecx
je 0x5918f9
cmp ecx, 1
je 0x59176b
cmp ecx, 2
jne 0x59175e
lea ebx, [esi + 0xc48]
jmp 0x59176d
cmp ecx, 3
jne 0x59176d
lea ebx, [esi + 0x800]
jmp 0x59176d
mov ebx, esi
xor edx, edx
mov eax, ecx
shl eax, 0xa
mov ebp, dword [eax + edx*4 + 0x64f820]
mov dword [ebx + edx*4], ebp
mov ebp, dword [eax + edx*4 + 0x64f824]
mov dword [ebx + edx*4 + 4], ebp
mov ebp, dword [eax + edx*4 + 0x64f828]
mov dword [ebx + edx*4 + 8], ebp
mov ebp, dword [eax + edx*4 + 0x64f82c]
mov dword [ebx + edx*4 + 0xc], ebp
add edx, 4
cmp edx, 0x100
jl 0x591774
inc ecx
cmp ecx, 4
jl 0x591744
xor eax, eax
xor edx, edx
mov dword [esp + 8], ebx
mov dword [esp + 0x18], esi
mov ebx, edx
xor edx, edx
mov dl, byte [eax + edi]
or edx, 0
inc eax
mov ecx, dword [esp + 0x30]
cmp eax, ecx
jl 0x5917d1
xor eax, eax
shl edx, 8
xor ecx, ecx
mov cl, byte [eax + edi]
or edx, ecx
inc eax
mov ebp, dword [esp + 0x30]
cmp eax, ebp
jl 0x5917e6
xor eax, eax
shl edx, 8
xor ecx, ecx
mov cl, byte [eax + edi]
or edx, ecx
inc eax
mov ebp, dword [esp + 0x30]
cmp eax, ebp
jl 0x5917fb
xor eax, eax
shl edx, 8
xor ecx, ecx
mov cl, byte [eax + edi]
or edx, ecx
inc eax
mov ebp, dword [esp + 0x30]
cmp eax, ebp
jl 0x591810
xor eax, eax
mov ecx, dword [ebx*4 + 0x64f7c0]
xor ecx, edx
mov ebp, dword [esp + 0x18]
mov dword [ebp + ebx*4 + 0xc00], ecx
inc ebx
cmp ebx, 0x12
jl 0x5917be
mov ebx, dword [esp + 8]
mov esi, ebp
xor eax, eax
mov dword [esp], eax
mov dword [esp + 4], eax
lea eax, [esi + 0xc00]
lea edi, [esi + 0xc48]
mov ebp, eax
lea edx, [esp]
lea eax, [esp + 4]
push eax
mov ecx, esi
call fcn.00591904
mov edx, dword [esp]
mov dword [ebp], edx
mov edx, dword [esp + 4]
mov dword [ebp + 4], edx
add ebp, 8
cmp edi, ebp
ja 0x591847
xor edx, edx
lea eax, [esi + 0x800]
lea edi, [esi + 0xc48]
lea ecx, [esi + 0x400]
mov dword [esp + 0x14], ecx
mov ecx, ebx
test edx, edx
je 0x5918f3
cmp edx, 1
je 0x59189f
cmp edx, 2
jne 0x591896
mov ecx, edi
jmp 0x5918a1
cmp edx, 3
jne 0x5918a1
mov ecx, eax
jmp 0x5918a1
mov ecx, esi
mov ebx, ecx
lea ebp, [ecx + 0x400]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
lea edx, [esp]
lea eax, [esp + 4]
push eax
mov ecx, esi
call fcn.00591904
mov eax, dword [esp]
mov dword [ebx], eax
mov edx, dword [esp + 4]
mov dword [ebx + 4], edx
add ebx, 8
cmp ebp, ebx
ja 0x5918b5
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 8]
inc edx
cmp edx, 4
jl 0x591884
add esp, 0x1c
pop ebx
pop ebp
pop esi
pop edi
ret 4
mov ecx, dword [esp + 0x14]
jmp 0x5918a1
lea ebx, [esi + 0x400]
jmp 0x59176d
Function at 0x5b91b4
Capabilities:
Parse credit card information

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x14
mov ebx, ecx
mov edi, ebx
xor esi, esi
xor ecx, ecx
mov dword [esp + 4], edi
mov dword [esp], ecx
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
jmp 0x5b91d8
inc dword [esp + 0xc]
mov ebp, edx
xor bl, bl
mov al, byte [edx]
test al, al
je 0x5b93d0
mov al, byte [edx]
cmp al, 0x20
jne 0x5b91f4
mov al, byte [ebp + 1]
inc ebp
test al, al
jne 0x5b91e8
cmp al, 0x30
jl 0x5b91fe
cmp al, 0x39
jg 0x5b91fe
mov bl, 1
lea eax, [ebp + 1]
mov cl, byte [ebp + 1]
cmp bl, 1
je 0x5b93b3
test cl, cl
je 0x5b928f
cmp cl, 0x20
je 0x5b928f
cmp cl, 0x2e
je 0x5b93a3
cmp cl, 0x2c
je 0x5b93a3
cmp cl, 0x28
je 0x5b93a3
cmp cl, 0x29
je 0x5b93a3
inc eax
mov cl, byte [eax]
cmp cl, 0x2b
je 0x5b928f
cmp cl, 0x2d
je 0x5b928f
cmp cl, 0x2a
je 0x5b928f
cmp cl, 0x2f
je 0x5b928f
cmp cl, 0x5e
je 0x5b928f
cmp cl, 0x25
je 0x5b928f
cmp cl, 0x3d
je 0x5b928f
cmp cl, 0x3e
je 0x5b928f
cmp cl, 0x3c
je 0x5b928f
cmp cl, 0x21
je 0x5b928f
cmp cl, 0x7c
je 0x5b928f
cmp cl, 0x26
je 0x5b928f
cmp bl, 1
je 0x5b9386
test cl, cl
je 0x5b928f
cmp cl, 0x20
jne 0x5b921a
sub eax, edx
je 0x5b93a9
mov edi, dword [esp]
lea ebx, [edi + eax]
mov dword [esp + 8], ebx
mov ebp, dword [esp + 0x28]
cmp ebp, ebx
jl 0x5b9322
mov edi, dword [esp + 4]
mov esi, edx
mov ecx, eax
push ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
pop ecx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add dword [esp + 4], eax
lea ebx, [eax + edx]
mov dword [esp], ebx
mov al, byte [edx + eax]
test al, al
je 0x5b92e6
mov al, byte [ebx]
mov edx, ebx
cmp al, 0x20
jne 0x5b92e3
mov al, byte [edx + 1]
inc edx
test al, al
jne 0x5b92d2
jmp 0x5b93e1
mov dword [esp], edx
mov ecx, dword [esp]
sub ecx, ebx
mov dword [esp], ecx
mov edi, dword [esp + 4]
mov esi, ebx
push ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
pop ecx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp]
add dword [esp + 4], eax
lea edx, [eax + ebx]
add eax, dword [esp + 8]
mov dword [esp], eax
mov ebx, dword [esp + 0x28]
cmp eax, ebx
jge 0x5b93d7
jmp 0x5b91d4
mov edi, dword [esp + 4]
mov ecx, dword [esp]
mov esi, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x28]
lea ebp, [ebp - 1]
cmp ecx, ebp
jge 0x5b9375
cmp esi, dword [esp + 0x2c]
jge 0x5b9375
mov esi, edx
mov ecx, eax
push ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
pop ecx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x28]
mov byte [ebx + edx - 1], 0x2d
mov byte [ebx + edx], 0
mov ecx, dword [esp + 0x30]
mov dword [ecx], 1
mov eax, ebp
add esp, 0x14
pop ebx
pop ebp
pop esi
pop edi
ret 0xc
mov byte [edi], 0
sub edi, ebx
mov eax, edi
add esp, 0x14
pop ebx
pop ebp
pop esi
pop edi
ret 0xc
cmp cl, byte [0x64e9dc]
je 0x5b921a
cmp cl, byte [0x64e9e0]
je 0x5b921a
jmp 0x5b9286
inc eax
jmp 0x5b928f
mov edi, dword [esp + 4]
mov ebx, dword [esp + 0x10]
jmp 0x5b9375
cmp cl, byte [0x64e9dc]
je 0x5b921a
cmp cl, byte [0x64e9e0]
je 0x5b921a
jmp 0x5b920d
mov al, byte [edx]
jmp 0x5b91f4
mov edi, dword [esp + 4]
mov ebx, dword [esp + 0x10]
jmp 0x5b9375
mov dword [esp], edx
jmp 0x5b92e6
Function at 0x5cb3a9
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
lea eax, [ebp - 4]
push esi
xor esi, esi
push eax
push 0x20019
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x5cb401
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x104
push eax
push dword [ebp + 8]
push esi
push esi
push 0x62c58c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x5cb3f4
push 1
pop esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x5cb403
xor eax, eax
pop esi
leave
ret 4

Function at 0x5cdc30
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
xor ecx, ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x58], ecx
ret
Function at 0x5e2bf0
Capabilities:
Hash data using sha1

Disassembly:
mov eax, dword [esp + 4]
xor ecx, ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], 0xc3d2e1f0
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x5c], ecx
ret
Function at 0x602cc9
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x6648a8], esi
push edi
jne 0x602ce9
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x6648a4], esi
mov byte [0x6648a0], al
jne 0x602d4f
mov ecx, dword [0x74d6ec]
test ecx, ecx
je 0x602d30
mov eax, dword [0x74d6e8]
sub eax, 4
cmp eax, ecx
jmp 0x602d29
mov eax, dword [eax]
test eax, eax
je 0x602d1b
call eax
mov eax, dword [0x74d6e8]
sub eax, 4
cmp eax, dword [0x74d6ec]
mov dword [0x74d6e8], eax
jae 0x602d13
mov eax, 0x6462c8
mov esi, 0x6462d4
cmp eax, esi
mov edi, eax
jae 0x602d4f
mov eax, dword [edi]
test eax, eax
je 0x602d48
call eax
add edi, 4
cmp edi, esi
jb 0x602d40
mov eax, 0x6462d8
mov esi, 0x6462e0
cmp eax, esi
mov edi, eax
jae 0x602d6e
mov eax, dword [edi]
test eax, eax
je 0x602d67
call eax
add edi, 4
cmp edi, esi
jb 0x602d5f
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x602d89
push dword [ebp + 8]
mov dword [0x6648a8], 1
call fcn.00602c34
pop ecx
pop ebp
ret

Function at 0x606fb0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x659c50]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x659c68]
je 0x606fdd
inc eax
cmp eax, 0x12
jb 0x606fce
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x659c68]
jne 0x607111
mov eax, dword [0x664854]
cmp eax, 1
je 0x6070ec
cmp eax, edx
jne 0x60700d
cmp dword [0x659964], 1
je 0x6070ec
cmp ecx, 0xfc
je 0x607111
push 0x104
lea eax, [ebp - 0x10c]
push eax
push edx
mov byte [ebp - 8], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x607046
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.00608e90
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.00605e30
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x607088
lea eax, [ebp - 0x10c]
push eax
call fcn.00605e30
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x640b94
push edi
call fcn.00603410
add esp, 0x10
push edi
call fcn.00605e30
push dword [esi + 0x659c6c]
mov ebx, eax
call fcn.00605e30
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.006021b0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00608e90
push edi
push ebx
call fcn.00608ea0
push 0x624bfc
push ebx
call fcn.00608ea0
push dword [esi + 0x659c6c]
push ebx
call fcn.00608ea0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0060a941
add esp, 0x2c
jmp 0x607111
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x659c6c]
push dword [esi]
call fcn.00605e30
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 - 0x118]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.00605f57
pop edi
pop esi
pop ebx
leave
ret
Function at 0x609066
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x74c580]
push edi
jae 0x60922d
mov eax, esi
sar eax, 5
lea ebx, [eax*4 + 0x74c5a0]
mov eax, dword [ebx]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x60922d
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov edi, dword [ebp + 0xc]
mov ecx, edi
je 0x60910c
test dl, 2
jne 0x60910c
test dl, 0x48
je 0x6090d6
mov al, byte [eax + 5]
cmp al, 0xa
je 0x6090d6
dec dword [ebp + 0x10]
mov byte [edi], al
mov eax, dword [ebx]
lea ecx, [edi + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [ebx]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x60911f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x609107
mov dword [0x664860], ecx
jmp 0x609234
cmp eax, 0x6d
jne 0x609113
xor eax, eax
jmp 0x609241
push eax
call fcn.0060a1e2
pop ecx
jmp 0x60923e
mov eax, dword [ebx]
mov edx, dword [ebp - 0x10]
add dword [ebp - 0xc], edx
lea ecx, [eax + esi + 4]
mov al, byte [ecx]
test al, al
jns 0x609228
test edx, edx
je 0x609142
cmp byte [edi], 0xa
jne 0x609142
or al, 4
jmp 0x609144
and al, 0xfb
mov byte [ecx], al
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x609222
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x609212
cmp al, 0xd
je 0x609178
mov byte [edi], al
inc edi
inc dword [ebp - 8]
jmp 0x609204
dec ecx
cmp dword [ebp - 8], ecx
jae 0x609192
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x60918d
add dword [ebp - 8], 2
jmp 0x6091e6
mov dword [ebp - 8], eax
jmp 0x609200
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x6091ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x609200
cmp dword [ebp - 0x10], 0
je 0x609200
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x48
je 0x6091db
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x6091e6
mov byte [edi], 0xd
mov ecx, dword [ebx]
mov byte [ecx + esi + 5], al
jmp 0x609203
cmp edi, dword [ebp + 0xc]
jne 0x6091eb
cmp byte [ebp - 1], 0xa
jne 0x6091eb
mov byte [edi], 0xa
jmp 0x609203
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00609451
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x609204
mov byte [edi], 0xd
inc edi
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x60915c
jmp 0x609222
mov eax, dword [ebx]
lea esi, [eax + esi + 4]
mov al, byte [esi]
test al, 0x40
jne 0x609222
or al, 2
mov byte [esi], al
sub edi, dword [ebp + 0xc]
mov dword [ebp - 0xc], edi
mov eax, dword [ebp - 0xc]
jmp 0x609241
and dword [0x664860], 0
mov dword [0x66485c], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x609246
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x659c50]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
cmp ecx, dword [0x74c580]
push ebx
push esi
mov dword [ebp - 4], eax
push edi
jae 0x6093d6
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x74c5a0]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x18], ebx
je 0x6093d6
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], edi
jne 0x6092a5
xor eax, eax
jmp 0x6093ea
test al, 0x20
je 0x6092b6
push 2
push edi
push edi
push ecx
call fcn.0060b7e7
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x609372
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
mov dword [ebp + 8], edi
jbe 0x6093aa
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x41c]
cmp ecx, dword [ebp + 0x10]
jae 0x60930c
mov edx, dword [ebp - 8]
inc dword [ebp - 8]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x6092fd
inc dword [ebp - 0x14]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x18]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x6092e2
mov edi, eax
lea eax, [ebp - 0x41c]
sub edi, eax
push 0
lea eax, [ebp - 0x10]
push eax
push edi
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x60934c
mov eax, dword [ebp - 0x10]
add dword [ebp - 0xc], eax
cmp eax, edi
jl 0x609355
mov eax, dword [ebp - 8]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x6092d6
jmp 0x609357
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
xor edi, edi
mov eax, dword [ebp - 0xc]
cmp eax, edi
jne 0x6093d1
cmp dword [ebp + 8], edi
je 0x6093aa
push 5
pop eax
cmp dword [ebp + 8], eax
jne 0x60939f
mov dword [0x664860], eax
jmp 0x6093dd
push edi
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x609394
mov eax, dword [ebp - 0x10]
mov dword [ebp + 8], edi
mov dword [ebp - 0xc], eax
jmp 0x609357
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x609357
push dword [ebp + 8]
call fcn.0060a1e2
pop ecx
jmp 0x6093e7
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x6093bf
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
je 0x60929e
mov dword [0x66485c], 0x1c
mov dword [0x664860], edi
jmp 0x6093e7
sub eax, dword [ebp - 0x14]
jmp 0x6093ea
and dword [0x664860], 0
mov dword [0x66485c], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
pop esi
pop ebx
call fcn.00605f57
leave
ret