joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a180
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x441094]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x40a1b0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040c5a7
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40a1ec
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x40a1ec
lea ecx, [edi - 1]
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040c5a7
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x40a2d2
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x40a214
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x40a247
push dword [esi + 0x4c]
movsx eax, bl
push eax
call fcn.0041b03e
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040c5a7
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x28], bl
mov edx, dword [ecx]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x27]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x1c]
sub eax, 0
je 0x40a2a5
sub eax, 1
je 0x40a2a5
sub eax, 2
jne 0x40a2d2
push dword [esi + 0x4c]
push dword [ebp - 0x28]
call fcn.00405b70
add esp, 8
or ecx, 0xffffffff
test al, al
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040c5a7
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40a2c2
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.0041b9b5
add esp, 0x10
cmp edi, eax
jne 0x40a2d2
lea eax, [ebp - 0x28]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
jne 0x40a1d7
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040c5a7
mov esp, ebp
pop ebp
ret 4
Function at 0x40af80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], edi
test eax, eax
jg 0x40afac
jl 0x40afa0
test ecx, ecx
jne 0x40afac
pop edi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
push esi
je 0x40b05e
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
nop dword [eax]
mov ecx, ebx
call fcn.00409170
mov esi, eax
mov eax, edx
mov dword [ebp - 0xc], eax
test eax, eax
jl 0x40b013
jg 0x40afd8
test esi, esi
je 0x40b013
mov ecx, dword [ebp - 4]
cmp ecx, eax
jg 0x40afed
mov eax, dword [ebp - 8]
jl 0x40afe8
cmp eax, esi
jae 0x40afed
mov esi, eax
mov dword [ebp - 0xc], ecx
mov eax, dword [ebx + 0x1c]
push esi
push dword [eax]
push edi
call fcn.0040dd60
mov eax, dword [ebx + 0x2c]
add esp, 0xc
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
sub ecx, esi
sbb edx, dword [ebp - 0xc]
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
jmp 0x40b032
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x1c]
mov edx, dword [ebp - 4]
cmp eax, 0xffffffff
je 0x40b048
mov ecx, dword [ebp - 8]
mov esi, 1
add ecx, 0xffffffff
mov byte [edi], al
adc edx, 0xffffffff
add edi, esi
mov dword [ebp - 4], edx
mov dword [ebp - 8], ecx
test edx, edx
jg 0x40afc0
jl 0x40b048
test ecx, ecx
jne 0x40afc0
mov eax, dword [ebp + 0xc]
sub eax, dword [ebp - 8]
mov ecx, dword [ebp + 0x10]
pop esi
sbb ecx, edx
pop edi
mov edx, ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
mov edi, ecx
mov edx, dword [eax]
test edx, edx
je 0x40b09b
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
test eax, eax
je 0x40b09b
mov edi, dword [ebp - 4]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push edx
push edi
call fcn.0040dd60
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp - 4], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
cmp dword [ebx + 0x4c], 0
mov ecx, edi
je 0x40b10b
mov esi, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [esi], eax
jne 0x40b0c1
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [esi], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
mov esi, dword [ebp - 4]
mov ecx, edi
cmp edi, 0xfff
jbe 0x40b0f4
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call fcn.0041b32e
sub edi, eax
add esp, 0x10
add esi, eax
mov ecx, edi
cmp eax, 0xfff
jne 0x40b11f
cmp edi, eax
ja 0x40b0d0
test ecx, ecx
je 0x40b10b
push dword [ebx + 0x4c]
push edi
push 1
push esi
call fcn.0041b32e
mov ecx, edi
add esp, 0x10
sub ecx, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, ecx
pop esi
pop edi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop esi
pop edi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc

Function at 0x422dbf
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00422c35
Function at 0x1003f16
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x1003f47
mov eax, dword fs:[4]
mov dword [ebp + 8], eax
mov eax, dword fs:[8]
mov dword [ebp - 4], eax
cmp ebx, dword [ebp - 4]
jb 0x1003f4e
cmp ebx, dword [ebp + 8]
jae 0x1003f4e
xor eax, eax
jmp 0x100413e
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x1003f5f
xor eax, eax
inc eax
jmp 0x100413d
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x1003f75
cmp ecx, edx
jae 0x10040ba
cmp dword [eax + 4], 0
je 0x1003f7e
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x1003f66
cmp dword [ebp + 8], 0
je 0x1003fa0
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x10040ba
cmp eax, esi
jae 0x10040ba
mov eax, dword [0x1006430]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x1003fc5
cmp dword [esi*4 + 0x1006438], edi
je 0x10040be
inc esi
cmp esi, eax
jl 0x1003fb3
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [0x1001068]
test eax, eax
je 0x100413a
cmp dword [ebp - 8], 0x1000000
jne 0x100413a
test byte [ebp - 0xc], 0xcc
je 0x1004043
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x100413a
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x100413a
cmp word [eax + 0x18], 0x10b
jne 0x100413a
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x100413a
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x1004043
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x1004043
test byte [ecx + 0x27], 0x80
jne 0x10040ba
push 1
push 0x1006478
call dword [0x1001064]
test eax, eax
jne 0x1003f57
mov ecx, dword [0x1006430]
test ecx, ecx
mov edx, ecx
jle 0x1004077
lea eax, [ecx*4 + 0x1006434]
cmp dword [eax], edi
je 0x1004077
dec edx
sub eax, 4
test edx, edx
jg 0x100406b
test edx, edx
jne 0x10040a8
push 0xf
pop ebx
cmp ecx, ebx
jg 0x1004084
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x100409c
lea eax, [edx*4 + 0x1006438]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x100408a
cmp ecx, 0x10
jge 0x10040a8
inc ecx
mov dword [0x1006430], ecx
push 0
push 0x1006478
call dword [0x1001064]
jmp 0x1003f57
xor eax, eax
jmp 0x100413d
test esi, esi
jle 0x1003f57
mov ebx, dword [0x1001064]
push 1
push 0x1006478
call ebx
test eax, eax
jne 0x1003f57
cmp dword [esi*4 + 0x1006438], edi
je 0x1004114
mov eax, dword [0x1006430]
lea esi, [eax - 1]
test esi, esi
jl 0x1004102
cmp dword [esi*4 + 0x1006438], edi
je 0x10040fe
dec esi
jns 0x10040f2
test esi, esi
jge 0x1004112
cmp eax, 0x10
jge 0x100410d
inc eax
mov dword [0x1006430], eax
lea esi, [eax - 1]
jmp 0x1004114
je 0x100412c
xor ecx, ecx
test esi, esi
jl 0x100412c
lea eax, [ecx*4 + 0x1006438]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x100411a
push 0
push 0x1006478
call ebx
jmp 0x1003f57
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40379b
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [edi + 0x3c]
and dword [ebp - 4], 0
push ebx
push esi
mov esi, dword [eax + edi + 0x78]
add esi, edi
cmp dword [esi + 0x18], 0
jbe 0x4037e0
mov ebx, dword [esi + 0x20]
add ebx, edi
test ebx, ebx
je 0x4037d2
mov ecx, dword [ebx]
push dword [ebp + 8]
or eax, 0xffffffff
add ecx, edi
or edx, eax
call fcn.004044d4
test eax, eax
je 0x4037e8
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add ebx, 4
cmp eax, dword [esi + 0x18]
jb 0x4037b9
xor eax, eax
pop esi
pop ebx
leave
ret 4
mov ecx, dword [ebp - 4]
mov eax, dword [esi + 0x24]
lea eax, [eax + ecx*2]
movzx eax, word [eax + edi]
mov ecx, dword [esi + 0x1c]
lea eax, [ecx + eax*4]
mov eax, dword [eax + edi]
add eax, edi
jmp 0x4037e2
Function at 0x403802
Capabilities:
Acquire debug privileges
Link many functions at runtime

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
and esi, 1
push edi
push 0
pop ebx
jne 0x403817
mov dword [0x4213c0], ebx
call fcn.00407651
mov edi, eax
mov dword [0x4213c8], edi
cmp edi, ebx
je 0x40383e
cmp esi, ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
jne 0x403846
push ebx
call esi
mov dword [0x4213c4], eax
cmp eax, ebx
jne 0x40386b
xor al, al
pop edi
pop esi
pop ebx
ret 4
push 0x401564
call fcn.0040379b
push eax
push 0x401574
call fcn.0040379b
push eax
push dword [0x4213c4]
call fcn.00407a78
test al, al
je 0x40383e
push 0x401584
call esi
mov dword [0x4213cc], eax
cmp eax, ebx
je 0x40383e
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x401598
push eax
call esi
push 0x4015a8
push dword [0x4213cc]
mov dword [0x4213d0], eax
call esi
push 0x4015bc
push dword [0x4213cc]
mov dword [0x4213d4], eax
call esi
push 0x4015d8
push dword [0x4213cc]
mov dword [0x4213d8], eax
call esi
push 0x4015ec
push dword [0x4213cc]
mov dword [0x4213dc], eax
call esi
push 0x401600
push dword [0x4213cc]
mov dword [0x4213e0], eax
call esi
mov dword [0x4213e4], eax
cmp dword [0x4213d0], ebx
jne 0x4038fc
cmp dword [0x4213d4], ebx
je 0x40383e
cmp dword [0x4213d8], ebx
je 0x40383e
cmp dword [0x4213dc], ebx
je 0x40383e
cmp eax, ebx
je 0x40383e
push ebx
push 0x80000
push ebx
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [0x422200], eax
cmp eax, ebx
jne 0x403945
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [0x422200], eax
mov byte [0x421420], bl
jmp 0x40394c
mov byte [0x421420], 1
mov edi, 0x4213f4
mov esi, 0x4213e8
mov dword [0x42142c], ebx
mov byte [0x421421], bl
mov dword [0x422208], ebx
call fcn.0040684f
test al, al
je 0x40383e
call fcn.00407de6
mov dword [0x421408], eax
cmp eax, 2
jb 0x40383e
call fcn.00407d33
mov byte [0x42140c], al
cmp al, bl
jne 0x4039b9
cmp dword [0x421408], 4
jae 0x40383e
push 0x401618
call fcn.00407cab
test al, al
setne al
add al, 2
mov byte [0x42140c], al
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [0x421410], eax
cmp eax, ebx
je 0x40383e
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x421414], eax
mov dword [0x421418], ebx
call fcn.00413eb6
call fcn.0040e520
call fcn.004030f6
mov ecx, dword [0x422720]
mov dword [0x42246c], ecx
call fcn.004044c0
test byte [esp + 0x10], 4
lea eax, [eax + eax + 2]
mov word [0x422468], ax
je 0x403a1a
call fcn.00415398
jmp 0x403a84
test byte [esp + 0x10], 2
je 0x403a84
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x422744
call esi
xor eax, eax
push 0x42276c
mov dword [0x422738], ebx
mov word [0x422740], ax
mov word [0x42273c], ax
mov dword [0x422734], ebx
mov dword [0x422760], ebx
mov dword [0x42275c], ebx
mov dword [0x422764], ebx
mov dword [0x422768], ebx
call esi
push 0x4226f4
mov dword [0x4226f0], ebx
mov dword [0x42270c], ebx
call esi
call fcn.0040ef74
call fcn.00415299
mov al, 1
jmp 0x403840
Function at 0x404792
Capabilities:
Parse url

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push edi
push 0x3c
pop edx
push edx
xor edi, edi
push edi
lea eax, [ebp - 0x3c]
push eax
call fcn.00403e7b
lea eax, [ebp - 0x3c]
push eax
push edi
push edi
push dword [ebp + 8]
xor ebx, ebx
inc ebx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
je 0x40481b
push 0xc
push esi
call fcn.00403e69
push dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
call fcn.004040c9
mov dword [esi], eax
cmp eax, edi
je 0x40480c
cmp dword [ebp - 0xc], edi
jne 0x4047f4
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], 0x40168c
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
lea edi, [eax + ecx]
lea eax, [edi + 1]
call fcn.00403db0
mov dword [esi + 4], eax
test eax, eax
jne 0x404823
push dword [esi]
call fcn.00403dc8
push dword [esi + 4]
call fcn.00403dc8
xor al, al
pop edi
pop ebx
leave
ret 4
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push eax
call fcn.00403e04
push dword [ebp - 4]
mov eax, dword [esi + 4]
push dword [ebp - 8]
add eax, dword [ebp - 0xc]
push eax
call fcn.00403e04
mov eax, dword [esi + 4]
mov byte [edi + eax], 0
cmp dword [ebp - 0x30], 3
mov ax, word [ebp - 0x24]
mov word [esi + 8], ax
jne 0x40485b
mov byte [esi + 0xa], bl
jmp 0x404869
cmp dword [ebp - 0x30], 4
setne al
dec al
and al, 2
mov byte [esi + 0xa], al
mov al, bl
jmp 0x40481d

Function at 0x40486d
Capabilities:
Connect to http server
Create http request

Disassembly:
push ebx
push edi
xor edi, edi
cmp ecx, edi
jne 0x40487a
mov ecx, 0x401690
push edi
push edi
not eax
push edi
and eax, 1
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
cmp ebx, edi
je 0x4048d2
push esi
xor esi, esi
push 4
lea eax, [esi + 0x41c364]
push eax
push dword [esi + 0x41c360]
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionA]
add esi, 8
cmp esi, 0x18
jb 0x404893
push edi
push edi
push 3
push edi
push edi
push dword [esp + 0x28]
push dword [esp + 0x28]
push ebx
call dword [sym.imp.WININET.dll_InternetConnectA]
pop esi
cmp eax, edi
jne 0x4048d4
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
pop edi
pop ebx
ret 8
Function at 0x404926
Capabilities:
Check http status code
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0x18]
and ebx, 2
push esi
mov eax, 0x8404f300
je 0x40493d
mov eax, 0x8444f300
test byte [ebp + 0x18], 4
je 0x404948
or eax, 0x800000
test byte [ebp + 0x18], 1
mov ecx, 0x4016d4
jne 0x404958
mov ecx, 0x4016dc
push 0
push eax
push 0x41c358
push 0
push 0x4016c8
push dword [ebp + 0xc]
push ecx
push dword [ebp + 8]
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov esi, eax
test esi, esi
je 0x4049d8
test ebx, ebx
je 0x404984
xor eax, eax
xor ecx, ecx
jmp 0x40498c
push 0x13
mov eax, 0x4016e0
pop ecx
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ecx
push eax
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x4049d1
and dword [ebp + 0x18], 0
push 0
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp + 0x18]
push eax
push 0x20000013
push esi
mov dword [ebp + 0xc], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x4049d1
cmp dword [ebp + 0x18], 0xc8
jne 0x4049d1
mov eax, esi
jmp 0x4049da
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
pop esi
pop ebx
pop ebp
ret 0x14

Function at 0x4049e0
Capabilities:
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov ebx, eax
xor edi, edi
mov eax, 0xa00000
cmp ebx, edi
je 0x4049f9
cmp ebx, eax
jbe 0x4049fb
mov ebx, eax
mov dword [ebp - 8], edi
cmp dword [ebp + 0x10], 0
je 0x404a16
push 0
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x404a57
lea eax, [edi + 0x1000]
lea esi, [ebp - 8]
mov dword [ebp - 4], 0x1000
call fcn.00403d5b
test al, al
je 0x404a57
mov esi, dword [ebp - 8]
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
lea eax, [esi + edi]
push eax
push dword [ebp + 8]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x404a57
cmp dword [ebp - 4], 0
je 0x404a68
add edi, dword [ebp - 4]
cmp edi, ebx
jbe 0x4049fe
push dword [ebp - 8]
call fcn.00403dc8
xor al, al
pop edi
pop esi
pop ebx
leave
ret 0xc
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x404a76
mov dword [eax], esi
mov dword [eax + 4], edi
jmp 0x404a7c
push esi
call fcn.00403dc8
mov al, 1
jmp 0x404a61
Function at 0x404a80
Capabilities:
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push edi
xor ebx, ebx
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
push dword [ebp + 0xc]
mov byte [ebp - 1], bl
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x404b4b
mov eax, 0x1000
call fcn.00403db0
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x404b37
mov dword [ebp - 0xc], ebx
cmp dword [ebp + 0x14], ebx
je 0x404adb
push ebx
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x404b2f
lea eax, [ebp - 8]
push eax
push 0x1000
push dword [ebp - 0x10]
push dword [ebp + 8]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x404b2f
cmp dword [ebp - 8], ebx
je 0x404b24
push ebx
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 8]
push dword [ebp - 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404b2f
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x14]
jne 0x404b2f
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0x10]
jbe 0x404ac5
jmp 0x404b2f
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov byte [ebp - 1], 1
push dword [ebp - 0x10]
call fcn.00403dc8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 1], bl
jne 0x404b4b
push dword [ebp + 0xc]
call fcn.00404ea5
mov al, byte [ebp - 1]
pop edi
pop ebx
leave
ret 0x10

Function at 0x404d07
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
xor ebx, ebx
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x404d66
cmp dword [ebp + 0xc], ebx
je 0x404d50
cmp edi, ebx
je 0x404d50
push ebx
lea eax, [ebp + 0xc]
push eax
push edi
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404d52
cmp dword [ebp + 0xc], edi
jne 0x404d52
mov bl, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp bl, 1
je 0x404d66
push dword [ebp + 8]
call fcn.00404ea5
pop esi
mov al, bl
pop ebx
pop ebp
ret 8
Function at 0x404d6e
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
mov ebx, eax
and al, 2
push edi
movzx eax, al
xor edi, edi
push edi
neg eax
push edi
sbb eax, eax
push 3
and eax, 6
or eax, 1
push edi
push eax
mov eax, ebx
or eax, 0xfffffffe
shl eax, 0x1e
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
je 0x404e1f
lea ecx, [ebp - 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x404e16
cmp dword [ebp - 4], edi
jne 0x404e16
mov eax, dword [ebp - 8]
mov dword [esi + 4], eax
cmp eax, edi
jne 0x404dcf
mov dword [esi + 0xc], edi
mov dword [esi], edi
mov al, 1
jmp 0x404e21
push edi
push edi
push edi
push 0
pop eax
and ebx, 1
setne al
lea eax, [eax + eax + 2]
push eax
push edi
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi + 0xc], eax
cmp eax, edi
je 0x404e16
xor ecx, ecx
cmp ebx, edi
sete cl
push edi
push edi
push edi
lea ecx, [ecx + ecx + 2]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi], eax
cmp eax, edi
jne 0x404dcb
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop edi
pop ebx
leave
ret 4

Function at 0x404ea5
Capabilities:
Delete file
Set file attributes

Disassembly:
push 0x20
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
setne al
ret 4

Function at 0x4050f5
Capabilities:
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push 0xf0000040
push 1
xor ebx, ebx
push ebx
push ebx
lea eax, [ebp - 0x10]
push eax
mov byte [ebp - 1], bl
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x40517f
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push 0x8003
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x405175
push ebx
push dword [ebp + 0x10]
mov dword [ebp - 0xc], 0x10
push dword [ebp + 0xc]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x40516c
push ebx
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
push 2
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x40516c
cmp dword [ebp - 0xc], 0x10
jne 0x40516c
mov byte [ebp - 1], 1
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov al, byte [ebp - 1]
pop ebx
leave
ret 0xc
Function at 0x405187
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov eax, dword [0x4221fc]
cmp eax, 0x270
jl 0x4050c1
push esi
push edi
xor edx, edx
mov esi, 0x7fffffff
mov ecx, edx
shl ecx, 2
mov eax, dword [ecx + 0x421834]
xor eax, dword [ecx + 0x421830]
and eax, esi
xor eax, dword [ecx + 0x421830]
mov edi, eax
shr eax, 1
and edi, 1
xor eax, dword [edi*4 + 0x41c378]
xor eax, dword [ecx + 0x421e64]
inc edx
cmp edx, 0xe3
mov dword [ecx + 0x421830], eax
jl 0x40501b
cmp edx, 0x26f
jge 0x405093
lea ecx, [edx*4 + 0x421830]
mov eax, dword [ecx]
lea edx, [ecx + 4]
xor eax, dword [edx]
and eax, esi
xor eax, dword [ecx]
mov edi, eax
and edi, 1
mov edi, dword [edi*4 + 0x41c378]
xor edi, dword [edx - 0x390]
shr eax, 1
xor edi, eax
mov dword [ecx], edi
mov ecx, edx
cmp ecx, 0x4221ec
jl 0x405066
mov ecx, dword [0x4221ec]
mov eax, dword [0x421830]
xor eax, ecx
and eax, esi
xor eax, ecx
mov ecx, eax
shr eax, 1
and ecx, 1
xor eax, dword [ecx*4 + 0x41c378]
pop edi
xor eax, dword [0x421e60]
pop esi
mov dword [0x4221ec], eax
xor eax, eax
mov ecx, dword [eax*4 + 0x421830]
inc eax
mov dword [0x4221fc], eax
mov eax, ecx
shr eax, 0xb
xor ecx, eax
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
ret
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, dword [0x42142c]
je 0x4051ce
xor ecx, ecx
mov dword [0x42142c], eax
mov dword [0x421830], eax
inc ecx
mov eax, 0x421830
push esi
mov edx, dword [eax]
mov esi, edx
shr esi, 0x1e
xor esi, edx
imul esi, esi, 0x6c078965
add esi, ecx
mov dword [eax + 4], esi
add eax, 4
inc ecx
cmp eax, 0x4221ec
jl 0x4051a8
mov dword [0x4221fc], ecx
pop esi
jmp 0x405002

Function at 0x4051d3
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp byte [0x421421], 0
jne 0x40520c
xor ecx, ecx
push 8
mov eax, ecx
pop edx
test al, 1
je 0x4051f0
shr eax, 1
xor eax, 0xedb88320
jmp 0x4051f2
shr eax, 1
dec edx
jne 0x4051e3
mov dword [ecx*4 + 0x421430], eax
inc ecx
cmp ecx, 0x100
jb 0x4051de
mov byte [0x421421], 1
xor ecx, ecx
or eax, 0xffffffff
cmp dword [esp + 8], ecx
jbe 0x405238
mov edx, dword [esp + 4]
movzx edx, byte [ecx + edx]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x421430]
inc ecx
cmp ecx, dword [esp + 8]
jb 0x405217
not eax
ret 8