joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4a60c0
Capabilities:
Enumerate pe sections

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x4a6292
xor ecx, ecx
xor edx, edx
mov ch, byte [eax]
mov dl, byte [eax + 2]
mov cl, byte [eax + 1]
push ebx
shl ecx, 8
or ecx, edx
xor edx, edx
mov dl, byte [eax + 3]
push ebp
shl ecx, 8
or ecx, edx
xor edx, edx
mov dl, byte [eax + 6]
mov dword [eax], ecx
xor ecx, ecx
push esi
mov ch, byte [eax + 4]
push edi
mov cl, byte [eax + 5]
xor ebp, ebp
shl ecx, 8
or ecx, edx
xor edx, edx
mov dl, byte [eax + 7]
shl ecx, 8
or ecx, edx
mov edx, dword [esp + 0x18]
mov dword [eax + 4], ecx
xor ecx, ecx
mov ch, byte [eax + 8]
lea edi, [edx + 0xc]
mov cl, byte [eax + 9]
mov word [eax + 8], cx
mov ecx, dword [eax]
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov cx, word [eax + 8]
mov word [edx + 8], cx
xor ecx, ecx
movzx si, byte [eax + 0xb]
mov ch, byte [eax + 0xa]
or ecx, esi
mov word [eax + 0xa], cx
mov word [edx + 0xa], cx
movzx si, byte [eax + 0xb]
xor ecx, ecx
mov ch, byte [eax + 0xa]
or ecx, esi
mov esi, dword [eax + 0xc]
mov word [eax + 0xa], cx
and ecx, 0xffff
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movzx si, byte [eax + 0x11]
mov bp, word [eax + 0xa]
xor ecx, ecx
mov ch, byte [eax + 0x10]
add ebp, 0xc
or ecx, esi
mov word [eax + 0x10], cx
mov word [edx + ebp], cx
movzx si, byte [eax + 0x11]
xor ecx, ecx
lea edi, [edx + ebp + 2]
mov ch, byte [eax + 0x10]
or ecx, esi
mov esi, dword [eax + 0x14]
mov word [eax + 0x10], cx
and ecx, 0xffff
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movzx si, byte [eax + 0x19]
xor ecx, ecx
mov cx, word [eax + 0x10]
lea ebp, [ecx + ebp + 2]
xor ecx, ecx
mov ch, byte [eax + 0x18]
or ecx, esi
lea edi, [edx + ebp + 2]
mov word [eax + 0x18], cx
mov word [edx + ebp], cx
movzx si, byte [eax + 0x19]
xor ecx, ecx
mov ch, byte [eax + 0x18]
or ecx, esi
mov esi, dword [eax + 0x1c]
mov word [eax + 0x18], cx
and ecx, 0xffff
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movzx si, byte [eax + 0x21]
xor ecx, ecx
mov cx, word [eax + 0x18]
lea ebp, [ecx + ebp + 2]
xor ecx, ecx
mov ch, byte [eax + 0x20]
or ecx, esi
lea edi, [edx + ebp + 2]
mov word [eax + 0x20], cx
mov word [edx + ebp], cx
movzx si, byte [eax + 0x21]
xor ecx, ecx
mov ch, byte [eax + 0x20]
or ecx, esi
mov esi, dword [eax + 0x24]
mov word [eax + 0x20], cx
and ecx, 0xffff
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
xor edx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dl, byte [eax + 6]
xor ecx, ecx
mov ch, byte [eax + 4]
pop edi
mov cl, byte [eax + 5]
pop esi
shl ecx, 8
or ecx, edx
xor edx, edx
mov dl, byte [eax + 7]
pop ebp
shl ecx, 8
or ecx, edx
xor edx, edx
mov dh, byte [eax]
mov dword [eax + 4], ecx
mov dl, byte [eax + 1]
xor ecx, ecx
mov ch, byte [eax + 8]
pop ebx
mov cl, byte [eax + 9]
mov word [eax + 8], cx
xor ecx, ecx
mov cl, byte [eax + 2]
shl edx, 8
or edx, ecx
xor ecx, ecx
mov cl, byte [eax + 3]
shl edx, 8
or edx, ecx
mov dword [eax], edx
ret
Function at 0x4a8eb0
Capabilities:
Hash data with md5

Disassembly:
sub esp, 0x94
mov eax, dword [esp + 0x9c]
push esi
push 0x40
lea ecx, [esp + 0x1c]
xor esi, esi
push eax
push ecx
mov dword [esp + 0x24], 0x67452301
mov dword [esp + 0x28], 0xefcdab89
mov dword [esp + 0x2c], 0x98badcfe
mov dword [esp + 0x30], 0x10325476
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
call fcn.004a8cc0
lea edx, [esp + 0x24]
lea eax, [esp + 0x10]
push edx
push eax
call fcn.004a8df0
mov esi, dword [esp + 0xb0]
add esp, 0x14
xor edx, edx
mov cl, byte [esp + edx + 4]
mov al, cl
and cl, 0xf
sar al, 4
and al, 0xf
cmp al, 0xa
movsx eax, al
jge 0x4a8f2a
add eax, 0x30
jmp 0x4a8f2d
add eax, 0x57
mov byte [esi], al
cmp cl, 0xa
movsx eax, cl
jge 0x4a8f3c
add eax, 0x30
jmp 0x4a8f3f
add eax, 0x57
mov byte [esi + 1], al
inc edx
add esi, 2
cmp edx, 0x10
jl 0x4a8f10
pop esi
add esp, 0x94
ret

Function at 0x4a8f60
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x84
push ebx
mov ebx, dword [esp + 0x90]
push ebp
mov ebp, dword [esp + 0x90]
push esi
push edi
mov ecx, 0x10
xor eax, eax
mov edi, ebp
mov esi, dword [esp + 0xa0]
rep stosd dword es:[edi], eax
mov ecx, 8
mov edi, ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
test esi, esi
mov dword [esp + 0x14], 0x9d14e9a1
mov dword [esp + 0x18], 0x593b6b0e
je 0x4a8feb
mov edi, esi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x28
jne 0x4a8fcf
mov byte [esi + 0x20], al
mov ecx, 0x20
jmp 0x4a8fd9
cmp ecx, 0x38
jle 0x4a8fd9
mov ecx, 0x38
mov eax, ecx
lea edi, [esp + 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x5af90c
test ecx, ecx
je 0x4a901f
mov edi, ecx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x38
jle 0x4a900a
mov ecx, 0x38
xor eax, eax
test ecx, ecx
jle 0x4a901f
mov dl, byte [eax + 0x5af90c]
xor byte [esp + eax + 0x1c], dl
inc eax
cmp eax, ecx
jl 0x4a9010
lea eax, [esp + 0x14]
push eax
push ebp
call fcn.004a8eb0
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, str.01d0a8e3
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea esi, [edx + ebp]
sub edi, ecx
mov eax, ecx
mov dword [esp + 0x10], esi
mov esi, edi
mov edi, dword [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, edx
cdq
and edx, 3
and ecx, 3
add eax, edx
rep movsb byte es:[edi], byte [esi]
sar eax, 2
xor ecx, ecx
test eax, eax
jle 0x4a9084
mov esi, ebp
mov dl, byte [esi]
add esi, 4
mov byte [ecx + ebx], dl
inc ecx
cmp ecx, eax
jl 0x4a9077
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
Function at 0x4a9c50
Capabilities:
Encode data using base64
Terminate process

Disassembly:
sub esp, 0x118
mov ecx, 0x3f
mov eax, 0x80808080
push ebx
push ebp
push esi
push edi
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, 0x41
mov cl, al
sub cl, 0x41
mov byte [esp + eax + 0x28], cl
inc eax
cmp eax, 0x5a
jle 0x4a9c72
mov eax, 0x61
mov dl, al
sub dl, 0x47
mov byte [esp + eax + 0x28], dl
inc eax
cmp eax, 0x7a
jle 0x4a9c86
mov eax, 0x30
mov cl, al
add cl, 4
mov byte [esp + eax + 0x28], cl
inc eax
cmp eax, 0x39
jle 0x4a9c9a
mov edi, dword [esp + 0x12c]
or ecx, 0xffffffff
xor eax, eax
xor ebp, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x53], 0x3e
mov byte [esp + 0x57], 0x3f
mov byte [esp + 0x65], 0
mov dword [esp + 0x18], ebp
je 0x4a9e2d
mov ebx, dword [esp + 0x130]
mov dword [esp + 0x10], 3
mov dword [esp + 0x14], 4
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x12c]
xor eax, eax
lea esi, [edx + ecx]
movsx ecx, byte [esi + eax]
mov dl, byte [esp + ecx + 0x28]
test dl, 0x80
jne 0x4a9dfe
mov byte [esp + eax + 0x20], cl
mov byte [esp + eax + 0x1c], dl
inc eax
cmp eax, 4
jl 0x4a9cfc
mov esi, dword [esp + 0x138]
mov edx, dword [esp + 0x10]
cmp edx, dword [esi]
jle 0x4a9d66
mov eax, dword [esp + 0x14]
push eax
call fcn.004ae027
mov ecx, dword [esi]
mov esi, ebx
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
mov dword [esp + 0x2c], eax
rep movsb byte es:[edi], byte [esi]
call fcn.004adf3e
mov ecx, dword [esp + 0x140]
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x2c]
add esp, 8
mov dword [ecx], eax
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x10]
mov dl, ch
mov al, cl
sar dl, 4
shl al, 2
or dl, al
mov eax, dword [esp + 0x14]
mov byte [ebx + ebp], dl
inc ebp
inc eax
mov cl, ch
mov dword [esp + 0x14], eax
mov al, byte [esp + 0x1e]
mov dl, al
inc edi
sar dl, 2
shl cl, 4
or dl, cl
mov ecx, dword [esp + 0x14]
shl al, 6
or al, byte [esp + 0x1f]
mov byte [ebx + ebp], dl
inc ebp
mov edx, edi
inc ecx
inc edx
mov byte [ebx + ebp], al
mov al, byte [esp + 0x22]
inc ebp
inc ecx
inc edx
mov dword [esp + 0x10], edi
cmp al, 0x3d
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
je 0x4a9e13
mov cl, byte [esp + 0x23]
xor eax, eax
cmp cl, 0x3d
setne al
add eax, 2
cmp eax, 3
jl 0x4a9e13
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x12c]
or ecx, 0xffffffff
xor eax, eax
add edx, 4
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x18], edx
cmp edx, ecx
jae 0x4a9e34
jmp 0x4a9cec
push ecx
push str.Illegal_character__c_in_input._n
call fcn.004af7fd
add esp, 8
push 1
call fcn.004afcca
mov eax, dword [esp + 0x134]
mov byte [ebx + ebp], 0
pop edi
pop esi
mov dword [eax], ebp
mov eax, ebx
pop ebp
pop ebx
add esp, 0x118
ret
mov ebx, dword [esp + 0x130]
mov ecx, dword [esp + 0x134]
mov byte [ebx + ebp], 0
pop edi
pop esi
mov dword [ecx], ebp
mov eax, ebx
pop ebp
pop ebx
add esp, 0x118
ret
Function at 0x4c14b2
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4c14ea
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004bf53c
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004bf514
jmp 0x4c14f6
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4c2ba0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4c2be2
call fcn.004c8958
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4c2be2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4c2bd9
xor eax, eax
jmp 0x4c2bea
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004c2bf0
pop edi
pop esi
pop ebx
ret 4

Function at 0x4c8e88
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4c8eb6
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4c8ed4
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004c8dee
jmp 0x4c8ed4
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4c8ed4
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004c8dee
test edi, edi
mov eax, edi
jne 0x4c8ebe
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x408db0
Capabilities:
Set socket configuration

Disassembly:
adc byte [eax + ecx + 0x6a], bh
add al, 0x52
push 0xec06
push 0xeeec
popal
call edi
leave
xchg dword [ecx*4 + 0x46acf4d], eax
push ecx
push 0x5d1005
push 0x6ff
push edx
call edi
pop esi
jge 0x408dad
mov word [esi + 0x20], ds
mov dword [esi + 0x24], edi
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret 0x880c
nop
sbb dl, byte [eax + 0x51ec8b55]
mov eax, dword [ebp - 0x18]
xor ebx, edx
test eax, eax
setne cl
mov dword [ebp - 4], ebp
mov ecx, dword [ebp + 0xc]
cmp ecx, 0xffffff8b
push esi
movups xmm6, xmmword [0xf000002]
test bh, ah
add al, byte [eax]
add byte [ecx + 0x13], cl
stc
mov edi, cr0
add byte [ebx], al
add byte [eax], al
xor edx, edx
mov bl, dh
adc byte [ecx + 0x24ff0040], dl
xchg ebp, eax
dec eax
nop
inc eax
add byte [ebx - 0x2dccf78b], cl
mov ecx, dword [esi + 0x38]
and ecx, 2
cmp cl, 0xe8
xchg edi, eax
mov dh, 6
cmp eax, edx
out dx, eax
das
mov ecx, dword [esi + 4]
lea eax, [ebp - 4]
push 4
push eax
push 8
push 0xffff
push ecx
call dword [sym.imp.WSOCK32.dll_setsockopt]
pop ebp
clc
dec dword [edi]
test byte [ebx + 2], al
mov ecx, 0x1f458b46
test dword [esi - 0x75], ecx
inc esi
cmp byte [esi + ecx - 0x23], dh
add cl, byte [ecx - 0x3f0bc7ba]
pop esi
xchg ecx, eax
in eax, 0x5d
ret 0xc

Function at 0x40b870
Capabilities:
Check for vm using instruction vpcext

Disassembly:
cmp cl, 0x4e
jae 0x40b88a
cmp cl, 0x20
jae 0x40b8dc
invalid
in eax, dx
rol byte [edi + 0x53b4449a], 0x56
mov eax, dword [esi + edi - 0x6c]
or eax, eax
jne 0x40b8b2
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
xor edx, edx
div ecx
mov ebx, eax
mov eax, dword [esp + 0xc]
div ecx
or al, 0xf7
int1
mov edx, ebx
jmp 0x40b8f3
daa
xchg ecx, eax
mov edx, dword [ebp + 0x548b1424]
and al, 0x10
push esi
inc esp
and al, 0xc
loopne 0x40b8ab
adc dword [edi - 0x2f], edx
ljmp 0xf475
pop edx
sal dword [edx + 0xe], 1
push edi
push esp
and al, 0xe5
pop es
sbb dh, byte [edx + 7]
cmp eax, dword [esp + 0xc]
jbe 0x40b932
dec esi
scasb al, byte es:[edi]
ror byte [ebx - 0x2fa4a13a], cl
adc byte [eax], al
int3
pop esi
pop ebx
rcl byte [eax]
add ah, cl
sub esp, ecx
ret
cmp al, 0x50
add byte [ebx], al
add byte [eax], ch
add byte [ecx], al
add byte [ebp + ecx], dh
or eax, 0x5900a500
fistp dword [ecx + 0x31]
sti

Function at 0x438c9c
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x438a14
sub ecx, ecx
call fcn.00438cda
mov ecx, 0x6f05e797
xor dword [edx], eax
add ebx, ebx
or ecx, ecx
or ebx, ecx
inc edx
sub ebx, 1
mov ecx, ecx
add ebx, 0xa314b0d7
cmp edx, edi
jne fcn.00438c9c
or ebx, ecx
push ebx
mov ebx, dword [esp]
add esp, 4
add ecx, 0xa6f33981
ret
Function at 0x43c7f0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x2f000]
push edi
or ebp, 0xffffffff
jmp 0x43c812
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x43c819
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x43c808
mov eax, 1
add ebx, ebx
jne 0x43c82b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x43c820
jne 0x43c83c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x43c820
xor ecx, ecx
sub eax, 3
jb 0x43c850
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x43c8c2
mov ebp, eax
add ebx, ebx
jne 0x43c85b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x43c868
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x43c88c
inc ecx
add ebx, ebx
jne 0x43c878
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x43c86d
jne 0x43c889
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x43c86d
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x43c8ac
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x43c89d
jmp 0x43c80e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x43c8ac
add edi, ecx
jmp 0x43c80e
pop esi
mov edi, esi
mov ecx, 0x671
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x43c8ca
cmp byte [edi], 1
jne 0x43c8ca
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x43c8cf
lea edi, [esi + 0x39000]
mov eax, dword [edi]
or eax, eax
je 0x43c947
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x53600]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x536b4]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x43c8fc
mov ecx, edi
jns 0x43c92b
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x536b8]
or eax, eax
je 0x43c941
mov dword [ebx], eax
add ebx, 4
jmp 0x43c919
call dword [esi + 0x536c8]
mov ebp, dword [esi + 0x536bc]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x20f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x43c97b
sub esp, 0xffffff80
jmp 0x403127
Function at 0x401518
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], str.MyAgent_1.0
call sub.WINHTTP.dll_WinHttpOpen
xor edx, edx
sub esp, 0x14
test eax, eax
je 0x401708
mov ebx, eax
mov eax, dword [ebp + 8]
or ecx, 0xffffffff
mov edx, dword [eax]
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx + ecx]
add eax, 0x10
and eax, 0xfffffff0
call fcn.00404120
sub esp, eax
lea esi, [esp + 0x1c]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], esi
call sub.msvcrt.dll_mbstowcs
mov edi, dword [ebp + 0xc]
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx + ecx]
add eax, 0x10
and eax, 0xfffffff0
call fcn.00404120
sub esp, eax
mov eax, dword [ebp + 0xc]
lea edi, [esp + 0x1c]
mov dword [esp + 8], ecx
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll_mbstowcs
mov dword [esp + 4], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x50
mov dword [esp], ebx
call sub.WINHTTP.dll_WinHttpConnect
sub esp, 0x10
mov esi, eax
mov dword [esp + 8], edi
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0x406018
mov dword [esp], eax
call sub.WINHTTP.dll_WinHttpOpenRequest
sub esp, 0x1c
mov edi, eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.WINHTTP.dll_WinHttpSendRequest
sub esp, 0x1c
mov dword [esp + 4], 0
mov dword [esp], edi
call sub.WINHTTP.dll_WinHttpReceiveResponse
push eax
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 4
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0x14], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x20000005
mov dword [esp + 0xc], eax
mov dword [esp], edi
call sub.WINHTTP.dll_WinHttpQueryHeaders
mov ecx, dword [ebp - 0x20]
sub esp, 0x18
mov dword [esp], ecx
mov dword [ebp - 0x2c], ecx
call sub.msvcrt.dll_malloc
test eax, eax
mov edx, eax
mov ecx, dword [ebp - 0x2c]
jne 0x4016c5
mov dword [ebp - 0x2c], eax
jmp 0x4016ea
lea eax, [ebp - 0x24]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], edi
mov dword [ebp - 0x2c], edx
mov dword [esp + 0xc], eax
call sub.WINHTTP.dll_WinHttpReadData
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x24]
sub esp, 0x10
mov dword [eax], ecx
mov dword [esp], edi
call sub.WINHTTP.dll_WinHttpCloseHandle
push eax
mov dword [esp], esi
call sub.WINHTTP.dll_WinHttpCloseHandle
push edx
mov dword [esp], ebx
call sub.WINHTTP.dll_WinHttpCloseHandle
mov edx, dword [ebp - 0x2c]
push ecx
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x401845
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x40
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov edx, eax
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
movzx eax, word [eax + 0x14]
movzx eax, ax
add eax, edx
add eax, 0x18
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0
jmp 0x4019db
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x10]
test eax, eax
jne 0x401923
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x38]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jle 0x40191e
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp + 0x14]
mov ecx, dword [edx + 0x34]
mov edx, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebx + 0xc]
mov ebx, dword [ebp - 0x14]
add ebx, esi
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], edx
mov dword [esp], ebx
call eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4018e8
mov eax, 0
jmp 0x4019f5
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 0x14]
add eax, edx
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
mov dword [eax + 8], edx
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_memset
jmp 0x4019d3
jmp 0x4019d3
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0x14]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x10]
add eax, edx
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.00401818
test eax, eax
jne 0x40194e
mov eax, 0
jmp 0x4019f5
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp + 0x14]
mov ecx, dword [edx + 0x34]
mov edx, dword [ebp - 0x10]
mov edx, dword [edx + 0x10]
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebx + 0xc]
mov ebx, dword [ebp - 0x14]
add ebx, esi
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], edx
mov dword [esp], ebx
call eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x401998
mov eax, 0
jmp 0x4019f5
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 0x14]
add eax, edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x10]
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx + 0x14]
mov edx, dword [ebp + 8]
add edx, ecx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
mov dword [eax + 8], edx
add dword [ebp - 0xc], 1
add dword [ebp - 0x10], 0x28
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
movzx eax, word [eax + 6]
movzx eax, ax
cmp eax, dword [ebp - 0xc]
jg 0x40187d
mov eax, 1
add esp, 0x40
pop ebx
pop esi
pop ebp
ret