joyce8/EMBER2024-capa huggingface dataset:
Function at 0x673a10
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration
Start tcp server

Disassembly:
sub esp, 0x34
mov eax, dword [0x759990]
xor eax, esp
mov dword [esp + 0x30], eax
push esi
push edi
mov edi, dword [esp + 0x4c]
push 6
push 1
push 2
mov dword [esp + 0x14], 0x10
mov dword [esp + 0x20], 1
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x673c02
xorps xmm0, xmm0
mov eax, 2
movdqu xmmword [esp + 0x18], xmm0
push 0x7f000001
mov word [esp + 0x1c], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x1c], eax
xor eax, eax
push 4
mov word [esp + 0x1e], ax
lea eax, [esp + 0x18]
push eax
push 4
push 0xffff
push esi
mov dword [edi + 4], 0xffffffff
mov dword [edi], 0xffffffff
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x673bf0
push 0x10
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x673bf0
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x673bf0
cmp dword [esp + 8], 0x10
jl 0x673bf0
push 1
push esi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x673bf0
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi], eax
cmp eax, 0xffffffff
je 0x673bf0
push 0x10
lea ecx, [esp + 0x1c]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x673bf0
push 1
push esi
call fcn.0068d590
add esp, 8
test eax, eax
js 0x673bf0
push 0
push 0x2710
lea eax, [esp + 0x14]
mov dword [esp + 0x14], esi
push 1
push eax
mov dword [esp + 0x20], 0x300
call fcn.0066f0e0
add esp, 0x10
push 0
push 0
push esi
call dword [sym.imp.WS2_32.dll_accept]
mov dword [edi + 4], eax
cmp eax, 0xffffffff
je 0x673bf0
lea eax, [esp + 8]
mov dword [esp + 8], 0x10
push eax
lea eax, [esp + 0x1c]
push eax
push dword [edi]
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x673bf0
cmp dword [esp + 8], 0x10
jl 0x673bf0
lea eax, [esp + 8]
mov dword [esp + 8], 0x10
push eax
lea eax, [esp + 0x2c]
push eax
push dword [edi + 4]
call dword [sym.imp.WS2_32.dll_getpeername]
cmp eax, 0xffffffff
je 0x673bf0
cmp dword [esp + 8], 0x10
jl 0x673bf0
mov ax, word [esp + 0x18]
cmp ax, word [esp + 0x28]
jne 0x673bf0
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x2c]
jne 0x673bf0
mov ax, word [esp + 0x1a]
cmp ax, word [esp + 0x2a]
jne 0x673bf0
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.00622d3e
add esp, 0x34
ret
push esi
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
call esi
push dword [edi]
call esi
push dword [edi + 4]
call esi
mov ecx, dword [esp + 0x38]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, esp
call fcn.00622d3e
add esp, 0x34
ret
Function at 0x673c50
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x20]
push ebx
xor ebx, ebx
mov dword [esp + 0xc], ebx
mov dword [eax], ebx
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [esp + 4], eax
test eax, eax
jne 0x673de1
push esi
mov esi, dword [esp + 0x14]
test esi, esi
je 0x673dcc
push ebp
push edi
mov eax, dword [esi + 0x14]
test eax, eax
je 0x673cae
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x673ca0
sub eax, edx
lea ecx, [eax + 1]
jmp 0x673cb0
xor ecx, ecx
mov eax, dword [esi + 4]
mov dword [esp + 0x14], ecx
cmp eax, 2
jne 0x673cc1
lea ebp, [eax + 0xe]
jmp 0x673ccd
cmp eax, 0x17
jne 0x673d6e
lea ebp, [eax + 5]
cmp dword [esi + 0x18], 0
je 0x673d6e
mov eax, dword [esi + 0x10]
test eax, eax
je 0x673d6e
cmp eax, ebp
jb 0x673d6e
lea eax, [ebp + 0x20]
add eax, ecx
push eax
call dword [0x75ae1c]
mov edi, eax
add esp, 4
test edi, edi
je 0x673dbd
mov ecx, dword [esi]
mov dword [edi], ecx
mov ecx, dword [esi + 4]
mov dword [edi + 4], ecx
mov ecx, dword [esi + 8]
mov dword [edi + 8], ecx
mov eax, dword [esi + 0xc]
mov dword [edi + 0xc], eax
lea eax, [edi + 0x20]
push ebp
mov dword [edi + 0x10], ebp
mov dword [edi + 0x14], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], eax
push dword [esi + 0x18]
push eax
call fcn.00620420
mov ecx, dword [esp + 0x20]
add esp, 0xc
test ecx, ecx
je 0x673d5a
mov eax, dword [edi + 0x18]
add eax, ebp
push ecx
mov dword [edi + 0x14], eax
push dword [esi + 0x14]
push eax
call fcn.00620420
add esp, 0xc
mov eax, dword [esp + 0x18]
test ebx, ebx
cmove ebx, edi
test eax, eax
je 0x673d6a
mov dword [eax + 0x1c], edi
mov dword [esp + 0x18], edi
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x673c92
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
pop edi
pop ebp
test eax, eax
je 0x673d8e
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x673dc8
test ebx, ebx
je 0x673dad
mov esi, dword [ebx + 0x1c]
push ebx
call dword [0x75ae20]
add esp, 4
mov ebx, esi
test esi, esi
jne 0x673d96
mov esi, dword [esp + 8]
mov eax, dword [esp + 0x28]
xor ebx, ebx
mov dword [eax], ebx
mov eax, esi
pop esi
pop ebx
add esp, 0x10
ret
mov esi, 8
mov dword [esp + 0x10], esi
jmp 0x673d7d
test ebx, ebx
jne 0x673dd8
mov esi, 0x2af9
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esp + 0x28]
mov dword [eax], ebx
mov eax, esi
pop esi
pop ebx
add esp, 0x10
ret
Function at 0x674280
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
mov ecx, 0x2b
test edi, edi
je 0x674329
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
lea ecx, [ecx]
mov ebx, 4
lea eax, [esp + 0x1c]
push 4
push eax
cmp edi, ebx
push ebp
cmovb ebx, edi
call fcn.0065a5b0
add esp, 0xc
cmp eax, 4
jne 0x6742e6
cmp byte [0x7b11e0], 0
jne 0x6742f2
push 2
push eax
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push 0
call sub.bcrypt.dll_BCryptGenRandom
neg eax
sbb eax, eax
and eax, 2
mov ecx, eax
test eax, eax
jne 0x67432b
mov eax, dword [esp + 0x1c]
jmp 0x67430f
imul eax, dword [0x7b11e4], 0x41c64e6d
add eax, 0x3039
mov dword [0x7b11e4], eax
rol eax, 0x10
xor ecx, ecx
mov dword [esp + 0x1c], eax
test ebx, ebx
je 0x674321
mov byte [esi], al
dec edi
inc esi
shr eax, 8
dec ebx
jne 0x674313
mov dword [esp + 0x1c], eax
test edi, edi
jne 0x6742a0
mov eax, ecx
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x674400
Capabilities:
Generate random numbers via winapi

Disassembly:
push dword [esp + 8]
push 0
push dword [esp + 0xc]
call fcn.00620a70
add esp, 0xc
push 2
push dword [esp + 0xc]
push dword [esp + 0xc]
push 0
call sub.bcrypt.dll_BCryptGenRandom
neg eax
sbb eax, eax
and eax, 2
ret
Function at 0x6782f0
Capabilities:
Query environment variable

Disassembly:
push ebx
push ebp
xor ebp, ebp
push esi
push edi
lea esi, [ebp + 1]
push esi
push ebp
call dword [0x75ae24]
mov edi, eax
add esp, 8
test edi, edi
je 0x6782c7
lea ebx, [ebx]
push esi
push edi
push dword [esp + 0x1c]
mov ebp, edi
mov ebx, esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
test esi, esi
je 0x6782df
cmp esi, ebx
je 0x6782df
cmp esi, 0x8000
ja 0x6782df
cmp esi, ebx
jb 0x6782d8
push esi
push edi
call dword [0x75ae24]
mov edi, eax
add esp, 8
test edi, edi
jne 0x678290
push ebp
call dword [0x75ae20]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
call dword [0x75ae20]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
jmp 0x678270

Function at 0x67dcd0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x88
mov eax, dword [0x759990]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x9c]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
or esi, 0xffffffff
push eax
mov ebx, dword [edi + 0xc]
mov ebp, dword [ebx + 0x134]
push ebp
mov dword [esp + 0x1c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x67dd33
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x80
push eax
lea eax, [esp + 0x18]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
push ebp
push ebx
push edi
call fcn.00660240
add esp, 0xc
cmp esi, 0xffffffff
jne 0x67dd58
push str.Error_accept__ing_server_connect
push edi
call fcn.0065f880
add esp, 8
mov eax, 0x1e
jmp 0x67ddc8
push str.Connection_accepted_from_server
push edi
call fcn.0065f950
push 1
push esi
mov byte [ebx + 0x24d], 0
mov dword [ebx + 0x134], esi
call fcn.0068d590
add esp, 0x10
mov byte [ebx + 0x260], 1
cmp dword [edi + 0x1b0], 0
je 0x67ddc6
push 1
push edi
call fcn.00650a70
mov eax, dword [edi + 0x1b0]
push 1
push esi
push dword [edi + 0x1b4]
call eax
push 0
push edi
mov esi, eax
call fcn.00650a70
add esp, 0x1c
test esi, esi
je 0x67ddc6
push ebx
push edi
call fcn.0067e260
add esp, 8
mov eax, 0x2a
jmp 0x67ddc8
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00622d3e
add esp, 0x88
ret
Function at 0x6804d0
Capabilities:
Check http status code

Disassembly:
mov ecx, dword [esp + 8]
mov eax, 0x51eb851f
imul ecx
push ebx
sar edx, 5
push esi
mov esi, dword [esp + 0xc]
mov eax, edx
shr eax, 0x1f
push edi
add eax, edx
xor edi, edi
mov ebx, dword [esi + 0xc]
cmp eax, 2
je 0x68050b
push str.Couldnt_set_desired_mode
push esi
call fcn.0065f880
add esp, 8
lea eax, [edi + 0x11]
pop edi
pop esi
pop ebx
ret
cmp ecx, 0xc8
je 0x680522
push ecx
push str.Got_a__03d_response_code_instead_of_the_assumed_200
push esi
call fcn.0065f950
add esp, 0xc
mov eax, dword [esp + 0x18]
cmp eax, 0x13
jne 0x68053b
push ebx
push esi
call fcn.00680150
add esp, 8
mov edi, eax
pop edi
pop esi
pop ebx
ret
cmp eax, 0x14
jne 0x68054f
push esi
call fcn.0067f0a0
add esp, 4
mov edi, eax
pop edi
pop esi
pop ebx
ret
cmp eax, 0x15
jne 0x680567
push 0xd
push 1
push esi
call fcn.0067fc80
add esp, 0xc
mov edi, eax
pop edi
pop esi
pop ebx
ret
cmp eax, 0x16
jne 0x68057b
push 0xe
push 1
push esi
call fcn.0067fc80
add esp, 0xc
mov edi, eax
mov eax, edi
pop edi
pop esi
pop ebx
ret
Function at 0x683c60
Capabilities:
Send data
Send data on socket

Disassembly:
mov ecx, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push 0
mov byte [esp + 0x12], cl
lea ecx, [esp + 0x10]
push 3
mov eax, dword [esi + 0xc]
push ecx
mov byte [esp + 0x18], 0xff
mov byte [esp + 0x19], bl
push dword [eax + 0x130]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x683cac
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.0065f880
add esp, 0xc
push dword [esp + 0x14]
push ebx
push str.SENT
push esi
call fcn.00683590
add esp, 0x10
pop esi
pop ebx
ret

Function at 0x683df0
Capabilities:
Send data
Send data on socket

Disassembly:
push ecx
cmp dword [esp + 0xc], 0x1f
push ebx
mov ebx, dword [esp + 0xc]
push ebp
mov eax, dword [ebx + 0xc]
mov ebp, dword [ebx + 0x134]
mov dword [esp + 8], eax
jne 0x683f3e
push esi
push edi
lea eax, [ebp + 0x1cb4]
lea edi, [ebp + 0x1eb4]
mov dword [edi], eax
cmp eax, edi
jae 0x683e28
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x683e33
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x683e3e
mov byte [eax], 0x1f
inc dword [edi]
movzx eax, word [ebp + 0x1ca8]
mov esi, dword [sym.imp.WS2_32.dll_htons]
push eax
call esi
movzx eax, ax
mov dword [esp + 0x18], eax
movzx eax, word [ebp + 0x1caa]
push eax
call esi
mov ecx, dword [esp + 0x18]
movzx edx, ax
mov eax, dword [edi]
cmp eax, edi
jae 0x683e70
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x683e7a
mov byte [eax], ch
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x683e84
mov byte [eax], dl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x683e8e
mov byte [eax], dh
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x683e99
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x683ea4
mov byte [eax], 0xf0
inc dword [edi]
mov eax, dword [edi]
lea esi, [ebp + 0x1cb4]
mov dword [ebp + 0x1eb8], eax
sub eax, esi
sub eax, 2
mov dword [edi], esi
push eax
lea eax, [ebp + 0x1cb6]
push eax
push 0x3e
push ebx
call fcn.006836a0
mov eax, dword [esp + 0x20]
add esp, 0x10
mov edi, dword [sym.imp.WS2_32.dll_send]
push 0
push 3
push esi
push dword [eax + 0x130]
call edi
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jns 0x683efe
call esi
push eax
push str.Sending_data_failed___d_
push ebx
call fcn.0065f880
add esp, 0xc
push 4
lea eax, [ebp + 0x1cb7]
push eax
push ebx
call fcn.00683cd0
add esp, 0xc
lea eax, [ebp + 0x1cbb]
push 0
push 2
push eax
mov eax, dword [esp + 0x1c]
push dword [eax + 0x130]
call edi
test eax, eax
jns 0x683f3c
call esi
push eax
push str.Sending_data_failed___d_
push ebx
call fcn.0065f880
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x683f50
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x90c
mov eax, dword [0x759990]
xor eax, esp
mov dword [esp + 0x908], eax
push ebx
push ebp
mov ebp, dword [esp + 0x918]
lea eax, [esp + 0x91]
push esi
push edi
push 0x7f
push 0
push eax
mov byte [esp + 0xa4], 0
call fcn.00620a70
push 0x7f
lea eax, [esp + 0x29]
mov byte [esp + 0x28], 0
push 0
push eax
call fcn.00620a70
mov edi, dword [ebp + 0x134]
mov ebx, dword [ebp + 0xc]
mov dword [esp + 0x2c], ebx
mov eax, dword [edi + 0x1eb8]
sub eax, dword [edi + 0x1eb4]
add eax, 2
push eax
lea eax, [edi + 0x1cb4]
push eax
push 0x3c
push ebp
call fcn.006836a0
mov eax, dword [edi + 0x1eb4]
add esp, 0x28
movzx ecx, byte [eax]
inc eax
mov dword [edi + 0x1eb4], eax
cmp ecx, 0x18
je 0x684158
cmp ecx, 0x23
je 0x684133
cmp ecx, 0x27
jne 0x6841e9
push 0
push ecx
push 0xfa
push 0xff
push str._c_c_c_c
lea eax, [esp + 0x12c]
push 0x800
push eax
call fcn.00670b10
mov edi, dword [edi + 0x1cb0]
add esp, 0x1c
mov esi, 4
mov ebx, 0x800
test edi, edi
je 0x6840f2
mov ecx, dword [edi]
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x684040
sub ecx, edx
lea eax, [esi + 1]
add eax, ecx
cmp eax, 0x7fa
jae 0x6840e7
lea eax, [esp + 0x18]
mov byte [esp + 0x18], 0
push eax
lea eax, [esp + 0x14]
mov word [esp + 0x14], 0
push eax
lea eax, [esp + 0xa0]
push eax
push str._127____1____127s
push dword [edi]
call fcn.00626bd4
add esp, 0x14
cmp eax, 1
jne 0x6840b3
lea eax, [esp + 0x98]
push eax
push 0
mov eax, ebx
sub eax, esi
push str._c_s
push eax
lea eax, [esp + 0x128]
add eax, esi
push eax
call fcn.00670b10
add esp, 0x14
jmp 0x6840e5
cmp eax, 2
jl 0x6840e7
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0xa0]
push eax
push 0
mov eax, ebx
sub eax, esi
push str._c_s_c_s
push eax
lea eax, [esp + 0x130]
add eax, esi
push eax
call fcn.00670b10
add esp, 0x1c
add esi, eax
mov edi, dword [edi + 4]
test edi, edi
jne 0x684034
push 0xf0
push 0xff
push str._c_c
sub ebx, esi
lea eax, [esp + 0x124]
add eax, esi
push ebx
push eax
call fcn.00670b10
add esp, 0x14
lea eax, [esp + 0x118]
add esi, 2
push 0
push esi
push eax
mov eax, dword [esp + 0x20]
push dword [eax + 0x130]
jmp 0x6841b3
add edi, 0x1c28
mov ecx, edi
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x684140
push 0xf0
push 0xff
push edi
push 0
push 0x23
jmp 0x684179
add edi, 0x1c08
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x684163
push 0xf0
push 0xff
push edi
push 0
push 0x18
push 0xfa
push 0xff
push str._c_c_c_c_s_c_c
sub ecx, edx
lea eax, [esp + 0x138]
push 0x800
push eax
lea esi, [ecx + 6]
call fcn.00670b10
add esp, 0x28
lea eax, [esp + 0x118]
push 0
push esi
push eax
push dword [ebx + 0x130]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x6841d2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push ebp
call fcn.0065f880
add esp, 0xc
lea eax, [esi - 2]
push eax
lea eax, [esp + 0x11e]
push eax
push 0x3e
push ebp
call fcn.006836a0
add esp, 0x10
mov ecx, dword [esp + 0x918]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00622d3e
add esp, 0x90c
ret
Function at 0x684f10
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x88
mov eax, dword [0x759990]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
mov ebx, dword [esp + 0x90]
push ebp
push esi
push edi
mov eax, dword [ebx + 0xc]
mov edi, dword [eax + 0x420]
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0x80
lea eax, [esp + 0x18]
push eax
mov eax, dword [edi + 0x13c]
push 0
add eax, 4
push eax
push dword [edi + 0x148]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [edi + 0x130], 0
mov dword [edi + 0x134], eax
jne 0x684f96
push dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
lea eax, [edi + 0xb0]
push eax
call fcn.00620420
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [edi + 0x130], eax
mov esi, dword [edi + 0x134]
cmp esi, 4
jge 0x684fd1
push str.Received_too_short_packet
push ebx
call fcn.0065f880
add esp, 8
mov dword [edi + 0xc], 7
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00622d3e
add esp, 0x88
ret
mov ecx, dword [edi + 0x148]
movzx eax, byte [ecx]
shl ax, 8
movzx edx, ax
movzx eax, byte [ecx + 1]
or edx, eax
mov dword [edi + 0xc], edx
add edx, 0xfffffffd
cmp edx, 3
ja case.default.0x684ff6
jmp dword [edx*4 + 0x68510c]
cmp esi, 4
jle case.0x684ff6.4
movzx eax, byte [ecx + 2]
shl ax, 8
movzx edx, ax
movzx eax, byte [ecx + 3]
or edx, eax
movzx eax, word [edi + 0x144]
inc eax
and eax, 0xffff
cmp eax, edx
jne case.0x684ff6.4
lea eax, [esi - 4]
push eax
lea eax, [ecx + 4]
push eax
push 1
push ebx
call fcn.0065f7e0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x685057
push 5
push edi
call fcn.00685940
add esp, 8
mov eax, esi
jmp 0x684fb8
mov eax, dword [edi + 0x134]
sub eax, 4
cdq
add dword [ebx + 0x90], eax
adc dword [ebx + 0x94], edx
push dword [ebx + 0x94]
push dword [ebx + 0x90]
push ebx
call fcn.0066e0a0
jmp 0x6850e3
mov edx, ecx
lea ebp, [ecx + 4]
add esi, 0xfffffffc
push esi
push ebp
movzx eax, byte [edx + 2]
shl ax, 8
movzx ecx, ax
movzx eax, byte [edx + 3]
or ecx, eax
mov dword [edi + 8], ecx
call fcn.00685a60
add esp, 8
cmp eax, esi
jae case.0x684ff6.4
push ebp
push str.TFTP_error:__s
push ebx
call fcn.0065f950
jmp 0x6850e3
lea eax, [esi - 2]
push eax
lea eax, [ecx + 2]
push eax
push edi
call fcn.00684cc0
add esp, 0xc
test eax, eax
je case.0x684ff6.4
jmp 0x684fb8
push str.Internal_error:_Unexpected_packet
push 0x6d5058
push ebx
call fcn.0065f880
add esp, 0xc
push ebx
call fcn.0066e3d0
add esp, 4
test eax, eax
je 0x684fb6
push 5
push edi
call fcn.00685940
add esp, 8
mov eax, 0x2a
jmp 0x684fb8
Function at 0x693250
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x120
mov eax, dword [0x759990]
xor eax, esp
mov dword [esp + 0x11c], eax
mov eax, dword [esp + 0x124]
push ebx
push ebp
mov ebp, dword [esp + 0x134]
xor ebx, ebx
push esi
push edi
mov edi, dword [esp + 0x138]
xor esi, esi
push edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], edi
call fcn.0062c687
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
jne 0x6932c8
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00672560
push eax
push edi
push str.schannel:_invalid_path_name_for_CA_file__s:__s
push ebp
call fcn.0065f880
add esp, 0x1c
lea esi, [ebx + 0x4d]
jmp 0x693407
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x69331a
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00672560
push eax
push edi
push str.schannel:_failed_to_open_CA_file__s:__s
push ebp
call fcn.0065f880
add esp, 0x1c
mov esi, 0x4d
jmp 0x693407
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x69335a
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00672560
push eax
push edi
push str.schannel:_failed_to_determine_size_of_CA_file__s:__s
push ebp
call fcn.0065f880
add esp, 0x1c
mov esi, 0x4d
jmp 0x6933fd
mov edi, dword [esp + 0x24]
cmp dword [esp + 0x28], ebx
jl 0x693388
jg 0x69336e
cmp edi, 0x100000
jbe 0x693388
push 0x100000
push str.schannel:_CA_file_exceeds_max_size_of__u_bytes
push ebp
call fcn.0065f880
add esp, 0xc
mov esi, 0x4d
jmp 0x6933fd
lea eax, [edi + 1]
push eax
call dword [0x75ae1c]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x6933a0
lea esi, [eax + 0x1b]
jmp 0x6933fd
test edi, edi
je 0x6933e4
jmp 0x6933b0
push 0
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
mov eax, edi
sub eax, esi
push eax
lea eax, [esi + ebx]
push eax
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x693441
mov eax, dword [esp + 0x14]
test eax, eax
je 0x69343d
add esi, eax
cmp esi, edi
jb 0x6933b0
push ebp
push dword [esp + 0x14]
mov byte [edi + ebx], 0
push edi
push ebx
push dword [esp + 0x2c]
call fcn.00693050
add esp, 0x14
mov esi, eax
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [0x75ae20]
mov eax, dword [esp + 0x24]
add esp, 4
test eax, eax
je 0x693422
push eax
call fcn.00626c65
add esp, 4
mov ecx, dword [esp + 0x12c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00622d3e
add esp, 0x120
ret
mov edi, esi
jmp 0x6933e4
push 0x100
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00672560
push eax
push dword [esp + 0x20]
push str.schannel:_failed_to_read_from_CA_file__s:__s
push ebp
call fcn.0065f880
add esp, 0x1c
mov esi, 0x4d
jmp 0x6933fd
Function at 0x698970
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
push edi
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
lea eax, [eax + ecx*2]
add eax, 0xc
push eax
call dword [0x75ae1c]
mov edi, eax
add esp, 4
test edi, edi
jne 0x698997
pop edi
pop esi
pop ecx
ret
lea ecx, [edi + 0xc]
mov dword [edi], esi
mov dword [edi + 4], ecx
mov eax, dword [esi + 0xc]
add eax, ecx
push ebx
mov ebx, dword [esp + 0x1c]
mov dword [edi + 8], eax
push ebp
cmp ebx, dword [esi + 0x10]
jbe 0x6989df
mov eax, dword [esi]
push ecx
call eax
mov eax, dword [esi + 4]
push ebx
push dword [esp + 0x24]
push dword [edi + 4]
call eax
mov ebp, dword [edi + 8]
push dword [edi + 4]
add ebp, dword [esi + 0xc]
mov eax, dword [esi + 8]
push ebp
call eax
mov ebx, dword [esi + 0x14]
add esp, 0x18
mov dword [esp + 0x20], ebx
jmp 0x6989e3
mov ebp, dword [esp + 0x1c]
push dword [edi + 4]
mov eax, dword [esi]
call eax
push dword [edi + 8]
mov eax, dword [esi]
call eax
mov eax, dword [esp + 0x28]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x698a43
mov dword [esp + 0x10], eax
mov ebx, eax
movzx eax, byte [ebp]
xor al, 0x36
mov byte [esp + 0x18], al
lea eax, [esp + 0x18]
push 1
push eax
push dword [edi + 4]
mov eax, dword [esi + 4]
call eax
movzx eax, byte [ebp]
lea ebp, [ebp + 1]
xor al, 0x5c
mov byte [esp + 0x24], al
lea eax, [esp + 0x24]
push 1
push eax
push dword [edi + 8]
mov eax, dword [esi + 4]
call eax
add esp, 0x18
dec ebx
jne 0x698a04
mov ebx, dword [esp + 0x10]
cmp ebx, dword [esi + 0x10]
jae 0x698a77
jmp 0x698a50
mov eax, dword [esi + 4]
push 1
push 0x709b88
push dword [edi + 4]
call eax
mov eax, dword [esi + 4]
push 1
push 0x709b89
push dword [edi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [esi + 0x10]
jb 0x698a50
pop ebp
pop ebx
mov eax, edi
pop edi
pop esi
pop ecx
ret