joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4c36b4
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 + 0x702af8]
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 0x4c36f4
cmp byte [ebx], 0xa
jne 0x4c36f4
or byte [edi + eax + 0x28], 4
jmp 0x4c36f9
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 0x4c37f8
mov dl, byte [eax]
cmp dl, 0x1a
je 0x4c37db
inc eax
cmp dl, 0xd
je 0x4c3725
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x4c374b
cmp eax, ecx
jae 0x4c3759
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 0x4c370d
jmp 0x4c37f8
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 0x4c37d6
cmp dword [ebp - 0x10], 0
je 0x4c37d6
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x702af8]
test byte [eax + edi + 0x28], 0x48
je 0x4c37b0
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4c379b
mov byte [esi], dl
jmp 0x4c37ac
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x702af8]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4c37f8
cmp byte [ebp - 1], 0xa
jne 0x4c37bf
cmp esi, ebx
jne 0x4c37bf
mov byte [esi], 0xa
jmp 0x4c37f7
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004c16cc
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4c37f8
mov byte [esi], 0xd
jmp 0x4c37f7
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x702af8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4c37f5
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4c37f8
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4c3801
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 + 0x702af8]
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 0x4c3847
cmp word [ebx], dx
jne 0x4c3847
or byte [eax + edi + 0x28], 4
jmp 0x4c384c
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 0x4c39af
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 0x4c398f
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x4c388d
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4c38c3
cmp eax, edx
jae 0x4c38d1
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 0x4c3868
jmp 0x4c39af
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 0x4c398a
cmp dword [ebp - 0x18], 0
je 0x4c398a
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x702af8]
test byte [eax + edi + 0x28], 0x48
je 0x4c3960
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 0x4c3924
mov word [esi], cx
jmp 0x4c395b
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x702af8]
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 + 0x702af8]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x702af8]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x4c39af
pop eax
cmp word [ebp - 4], ax
jne 0x4c3970
cmp esi, ebx
jne 0x4c3970
mov word [esi], ax
jmp 0x4c39ac
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004c16cc
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x4c39af
push 0xd
pop eax
jmp 0x4c396b
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x702af8]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x4c39a9
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x4c39af
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4c8b8d
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4f562c
push 0x4f5624
push 0x4f27c0
push 0x1f
call fcn.004c8a0c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4c8bc1
push dword [ebp + 8]
mov ecx, esi
call dword [0x4e4540]
call esi
jmp 0x4c8bc7
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x4c8c0b
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4f563c
push 0x4f5634
push 0x4f27e4
push 0x21
call fcn.004c8a0c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4c8c42
push dword [ebp + 8]
mov ecx, esi
call dword [0x4e4540]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4c8c4a
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4f5644
push 0x4f563c
push 0x4f27f8
push 0x22
call fcn.004c8a0c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4c8c84
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x4e4540]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x4cb017
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x6fe068]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x4cb062
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.004cb1b2
test al, al
jne 0x4cb05c
sub edx, 2
cmp edx, edi
jne 0x4cb042
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x4cb084
lea eax, [edi + 2]
cmp edx, eax
je 0x4cb084
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.004caf63
add esp, 0x10
jmp 0x4cb17e
push esi
lea ecx, [ebp - 0x255]
call fcn.004cb1b2
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4cb0c7
push dword [ebp - 0x25c]
jmp 0x4cb074
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x4cb104
cmp word [ebp - 0x226], 0
je 0x4cb125
cmp word [ebp - 0x226], ax
jne 0x4cb104
cmp word [ebp - 0x224], 0
je 0x4cb125
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.004caf63
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x4cb171
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x4cb0de
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x4cb159
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x4cb17e
push 0x4cad93
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004b8090
add esp, 0x10
jmp 0x4cb14e
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ae58b
leave
ret
Function at 0x4cba7b
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x4cbb18
push ebx
push esi
call fcn.004cba44
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.004cac18
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x4cbac5
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4cbb17
push edi
push eax
call fcn.004c65fb
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x4cbae5
call fcn.004c65c1
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4cbb16
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.004cac18
add esp, 0x20
test eax, eax
jne 0x4cbb04
push edi
call fcn.004c65c1
jmp 0x4cbb0c
push ebx
call fcn.004c65c1
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x4cbb1b
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x4cbb2c
pop esi
ret
push ebx
push edi
push esi
call fcn.004cba44
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.004c65fb
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4cbb54
push ebx
push esi
push edi
call fcn.004b06a0
add esp, 0xc
push 0
call fcn.004c65c1
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x4cc2ae
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004cbdc9
Function at 0x4cd9bc
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.004cd938
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4cdb2b
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4cdb2b
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x4cdae0
jg 0x4cda18
test eax, eax
je 0x4cdad6
push 1
push 0x1000
call fcn.004c6564
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4cda3b
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x4cdacd
push 0x8000
push ebx
call fcn.004c2ae0
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x4cda64
jg 0x4cda5f
cmp ecx, 0x1000
jb 0x4cda64
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.004c491e
add esp, 0x10
cmp eax, 0xffffffff
je 0x4cdaa9
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x4cda5f
jl 0x4cda90
test ecx, ecx
jne 0x4cda51
push dword [ebp - 0xc]
push ebx
call fcn.004c2ae0
push esi
call fcn.004c65c1
add esp, 0xc
xor ebx, ebx
jmp 0x4cdb39
cmp byte [edi + 0x24], 0
je 0x4cdac0
cmp dword [edi + 0x20], 5
jne 0x4cdac0
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x4cdacb
mov ebx, dword [edi + 0x18]
jmp 0x4cdacd
xor ebx, ebx
push esi
call fcn.004c65c1
pop ecx
jmp 0x4cdb39
test ecx, ecx
jg 0x4cdaa2
jl 0x4cdae0
test eax, eax
jae 0x4cdaa2
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004c16cc
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4cdb00
cmp byte [edi + 0x1c], 0
je 0x4cdaa2
jmp 0x4cdb31
push ebx
call fcn.004ca8fe
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4cdaa2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x4cdb39
cmp byte [edi + 0x1c], 0
je 0x4cdb36
mov ebx, dword [edi + 0x18]
jmp 0x4cdb39
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.004c16cc
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4cffe6
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x6fe068]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x1a
jbe 0x4d0029
call fcn.004b7a85
mov dword [eax], 0xf
call fcn.004b7a98
mov dword [eax], 0xd
call fcn.004b2914
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ae58b
leave
ret
test eax, eax
jne 0x4d0030
inc eax
jmp 0x4d001d
add eax, 0x40
push 0x3a
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
push 0x5c
pop eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 6], ax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov ecx, eax
test ecx, ecx
je 0x4d001b
xor eax, eax
cmp ecx, 1
setne al
jmp 0x4d001d
Function at 0x4d3210
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4d321c
pop ebp
ret
mov dword [ebp + 0xc], eax
pop ebp
jmp fcn.004d3230
Function at 0x401750
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push eax
add ecx, 0x40
push 0x40d274
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
mov eax, dword [0x4102ac]
add esp, 0xc
test eax, eax
je 0x401787
push eax
push str.Total_of__d_requests_completed_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
push 1
call dword [sym.imp.MSVCRT.dll_exit]
nop

Function at 0x401e40
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
push esi
mov esi, dword [ebp + 0xc]
push esi
lea eax, [ebp - 0x78]
push 0x78
push eax
push esi
call fcn.004086e0
mov ecx, dword [ebp + 8]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push eax
push ecx
add edx, 0x40
push str._s:__s___d__n
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
mov eax, dword [0x4102ac]
add esp, 0x14
test eax, eax
je 0x401e8c
push eax
push str.Total_of__d_requests_completed_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
push esi
call dword [sym.imp.MSVCRT.dll_exit]
pop esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x404560
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x41404c]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
push eax
call fcn.00405850
mov dword [0x414040], eax
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov esi, dword [sym.imp.MSVCRT.dll_strncmp]
not ecx
dec ecx
cmp ecx, 7
jbe 0x40466d
push 7
push str.http:__
push ebx
call esi
add esp, 0xc
test eax, eax
jne 0x40466d
add ebx, 7
push 0x2f
push ebx
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
mov dword [ebp + 8], eax
test eax, eax
je 0x404717
mov esi, eax
mov eax, dword [0x41404c]
sub esi, ebx
lea edx, [esi + 1]
push edx
push eax
call fcn.00404a60
mov ecx, esi
mov esi, ebx
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp + 8]
mov ecx, eax
sub ecx, ebx
mov byte [ecx + esi], 0
mov edx, dword [0x41404c]
push edx
push eax
lea eax, [ebp - 4]
push 0x4117f4
push eax
push 0x411800
call fcn.00406e20
test eax, eax
jne 0x404717
mov eax, dword [0x411800]
test eax, eax
je 0x404717
mov eax, dword [ebp - 4]
test eax, eax
jne 0x404717
mov ecx, dword [0x41404c]
push esi
push ecx
call fcn.00405850
mov dword [0x4117e4], eax
mov byte [esi], 0
cmp byte [ebx], 0x5b
jne 0x4046b7
mov edx, dword [0x411800]
mov eax, dword [0x41404c]
push edx
push str.__s_
push eax
call fcn.004055d0
add esp, 0xc
mov dword [0x410b9c], eax
jmp 0x4046c3
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 8
jbe 0x4045ae
push 8
push str.https:__
push ebx
call esi
add esp, 0xc
test eax, eax
jne 0x4045ae
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push str.SSL_not_compiled_in__no_https_support_n
add ecx, 0x40
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov ecx, dword [0x411800]
mov dword [0x410b9c], ecx
mov ax, word [0x4117f4]
test ax, ax
jne 0x4046ea
mov word [0x4117f4], 0x50
pop edi
pop esi
mov dword [0x410bac], 0x4102d4
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp ax, 0x50
je 0x4046d7
xor edx, edx
mov dx, ax
mov eax, dword [0x41404c]
push edx
push 0x40f298
push eax
call fcn.004055d0
add esp, 0xc
mov dword [0x410bac], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405d20
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.00405f20
test eax, eax
jne 0x405e30
cmp dword [0x4108dc], 0x14
jl 0x405e2e
mov eax, dword [0x410384]
test eax, eax
jne 0x405e2e
mov dword [0x410384], 1
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov esi, eax
test esi, esi
je 0x405db3
mov eax, dword [0x410358]
test eax, eax
jne 0x405d89
push eax
push str.CommandLineToArgvW
push 4
call fcn.0040a940
add esp, 0xc
mov dword [0x410358], eax
test eax, eax
je 0x405e38
lea ecx, [ebp - 4]
push ecx
push esi
call eax
mov esi, eax
test esi, esi
je 0x405db3
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
push edx
push esi
push eax
call fcn.0040a5d0
mov ecx, dword [ebp + 8]
add esp, 0xc
push esi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov ebx, eax
push 0xffffffffffffffff
push ebx
call dword [sym.imp.MSVCRT.dll___p__environ]
push eax
call fcn.00405e50
mov edi, dword [ebp + 0x10]
add esp, 0xc
test edi, edi
je 0x405e02
lea esi, [eax*4 + 4]
push esi
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [edi], eax
call dword [sym.imp.MSVCRT.dll___p__environ]
mov edi, dword [edi]
mov ecx, esi
mov esi, dword [eax]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov esi, dword [sym.imp.MSVCRT.dll___p__wenviron]
call esi
mov ecx, dword [eax]
pop ebx
test ecx, ecx
je 0x405e2e
call esi
mov edi, dword [eax]
call esi
push edi
mov dword [eax], 0
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
push 1
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x405db3

Function at 0x405f20
Capabilities:
Allocate thread local storage
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
mov eax, dword [0x410388]
mov ecx, eax
inc eax
test ecx, ecx
mov dword [0x410388], eax
je 0x405f40
xor eax, eax
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 8]
push edx
call fcn.0040a720
add esp, 4
test eax, eax
jne 0x405fd6
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x410954], eax
call fcn.00404940
test eax, eax
jne 0x405fdb
push eax
push eax
push eax
lea eax, [ebp - 4]
push eax
call fcn.00404f60
test eax, eax
je 0x405f81
mov eax, 0x4e22
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
push str.apr_initialize
push ecx
call fcn.004055f0
lea edx, [ebp - 0x198]
push edx
push 2
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
jne 0x405fdb
mov ax, word [ebp - 0x198]
cmp al, 2
jne 0x405fd0
xor ecx, ecx
mov cl, ah
test cl, cl
jne 0x405fd0
mov edx, dword [ebp - 4]
push edx
call fcn.0040a420
mov eax, dword [ebp - 4]
push eax
call fcn.0040a430
add esp, 8
xor eax, eax
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WSOCK32.dll_WSACleanup]
mov eax, 0x11
mov esp, ebp
pop ebp
ret
Function at 0x406840
Capabilities:
Connect socket
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
je 0x4069ef
mov ecx, dword [ebx + 0x10]
test ecx, ecx
je 0x4069ef
mov esi, dword [ebp + 0xc]
mov ecx, dword [esi + 0x14]
lea edx, [esi + 0x28]
push ecx
push edx
push eax
call dword [sym.imp.WSOCK32.dll_connect]
cmp eax, 0xffffffff
jne 0x4069b8
mov esi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
call esi
test eax, eax
je 0x40698a
call esi
add eax, 0xafc80
cmp eax, 0xb23b3
jne 0x4069f4
mov edi, dword [ebx + 0x20]
mov esi, dword [ebx + 0x24]
mov eax, edi
or eax, esi
jne 0x4068bd
pop edi
pop esi
mov eax, 0xb23b4
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx + 4]
mov ecx, 1
test esi, esi
mov dword [ebp - 0x20c], eax
mov dword [ebp - 0x210], ecx
mov dword [ebp - 0x108], eax
mov dword [ebp - 0x10c], ecx
jg 0x4068eb
jl 0x4068e7
test edi, edi
jae 0x4068eb
xor eax, eax
jmp 0x406910
push 0
push 0xf4240
push esi
push edi
call fcn.0040b590
push 0
push 0xf4240
push esi
push edi
mov dword [ebp - 8], eax
call fcn.0040b750
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
lea ecx, [ebp - 0x10c]
push eax
lea edx, [ebp - 0x210]
push ecx
push edx
push 0
push 0x41
call dword [sym.imp.WSOCK32.dll_select]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x40697e
test eax, eax
jne 0x406943
pop edi
pop esi
mov eax, 0xb23cc
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebx + 4]
lea eax, [ebp - 0x10c]
push eax
push ecx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4069b5
mov ecx, dword [ebx + 4]
lea edx, [ebp + 0xc]
lea eax, [ebp + 8]
push edx
push eax
push 0x1007
push 0xffff
push ecx
mov dword [ebp + 0xc], 4
call dword [sym.imp.WSOCK32.dll_getsockopt]
test eax, eax
je 0x4069a5
mov esi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
call esi
test eax, eax
jne 0x406995
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
call esi
pop edi
pop esi
add eax, 0xafc80
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 8]
test eax, eax
jne 0x406997
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, dword [ebp + 0xc]
mov eax, dword [ebx + 0x10]
mov dword [ebx + 0x14], esi
cmp word [eax + 0x2a], 0
jne 0x4069cc
mov dword [ebx + 0x2c], 1
mov ecx, dword [eax + 0x18]
mov esi, dword [eax + 0x20]
mov edi, 0x41042c
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x40698a
pop edi
mov dword [ebx + 0x30], 1
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, 0x975ef
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8