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

Disassembly:
mov ecx, dword [esp + 0x10]
sub esp, 0xc
test ecx, ecx
mov eax, 0xfffffff5
je 0x40547c
cmp dword [esp + 0x14], 2
jne 0x40547c
mov eax, 0xfffffff4
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
test ebp, ebp
je 0x405547
mov eax, dword [esp + 0x14]
cmp eax, 1
jle 0x405547
push ebx
push esi
push edi
lea edi, [esp + 0x30]
dec eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
mov eax, dword [edi + 8]
mov dword [esp + 0x10], 0
cmp eax, 0x80000004
jne 0x4054c1
mov ebx, dword [edi]
jmp 0x4054d8
push edi
call fcn.00408a60
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40552e
mov dword [esp + 0x10], 1
push ebx
call dword [0x40ccf4]
mov esi, eax
add esp, 4
test esi, esi
jbe 0x40551d
mov edi, ebx
mov eax, 0x400
mov dword [esp + 0x20], 0
cmp esi, eax
jae 0x4054fd
mov eax, esi
lea ecx, [esp + 0x20]
push 0
push ecx
push eax
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x20]
sub esi, eax
add edi, eax
test esi, esi
ja 0x4054ea
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40552e
push ebx
call sub.MSVCRT.dll_free
add esp, 4
mov eax, dword [esp + 0x18]
add edi, 0xc
dec eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
jne 0x4054ab
pop edi
pop esi
pop ebx
pop ebp
add esp, 0xc
ret

Function at 0x405600
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, dword [esp + 8]
push edi
push 0
push 0x20
push 3
push 0
push 3
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x405669
push ebx
lea ecx, [esp + 0x10]
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
lea edx, [ebx + 8]
push edx
call fcn.00405290
add esp, 4
mov esi, eax
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esi + 8]
push ebx
push ecx
push edi
mov dword [esi], 1
mov dword [esi + 4], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop ebx
pop edi
ret

Function at 0x405900
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
mov eax, dword [esp + 0x10]
push edi
push 0
push 0x20
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x405992
mov eax, dword [esp + 0x10]
push ebx
mov ebx, 1
push ebp
cmp eax, ebx
push esi
mov dword [esp + 0x10], ebx
jle 0x405984
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
lea esi, [esp + 0x2c]
mov eax, dword [esi]
lea edx, [esp + 0x14]
push 0
push edx
lea ecx, [eax + 8]
mov eax, dword [eax + 4]
push eax
push ecx
push edi
call ebp
test eax, eax
je 0x40597c
mov eax, dword [esp + 0x1c]
inc ebx
add esi, 0xc
cmp ebx, eax
jl 0x405945
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret
mov dword [esp + 0x10], 0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret
Function at 0x409b40
Capabilities:
Manipulate console buffer

Disassembly:
sub esp, 0x18
push ebx
mov ebx, dword [esp + 0x38]
push ebp
mov ebp, dword [esp + 0x40]
push esi
push edi
xor edi, edi
cmp ebx, 1
jne 0x409b6a
test ebp, ebp
jg 0x409b64
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret
lea eax, [ebp + 1]
push eax
jmp 0x409b6c
push 2
call sub.MSVCRT.dll_malloc
mov esi, eax
add esp, 4
test esi, esi
jne 0x409b82
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x409b9e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x30]
test eax, eax
je 0x409bdf
cmp dword [eax], 0
jle 0x409bdf
mov ecx, dword [eax + 4]
test ecx, ecx
jle 0x409bdf
mov cx, word [eax]
mov dx, word [eax + 4]
mov word [esp + 0x44], cx
mov ecx, dword [esp + 0x2c]
mov word [esp + 0x46], dx
mov eax, dword [esp + 0x44]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
test eax, eax
jne 0x409bdf
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
cmp dword [esp + 0x34], 1
jne 0x409bee
mov edx, dword [esp + 0x14]
mov dword [esp + 0x44], edx
call sub.MSVCRT.dll__getch
mov edx, 1
cmp ebx, edx
jne 0x409c0e
cmp al, 0xd
je 0x409c3f
lea ecx, [edi + 1]
mov byte [esi + edi], al
cmp ecx, ebp
je 0x409c4f
mov edi, ecx
jmp 0x409c14
mov byte [esi], al
mov byte [esi + 1], 0
cmp dword [esp + 0x38], edx
jne 0x409c38
cmp dword [esp + 0x3c], edx
jne 0x409c2c
mov eax, dword [esp + 0x40]
push eax
call sub.MSVCRT.dll_printf
jmp 0x409c35
movsx ecx, al
push ecx
call sub.MSVCRT.dll_putchar
add esp, 4
cmp ebx, 1
jne 0x409c54
jmp 0x409bee
push 0xa
mov byte [esi + edi], 0
call sub.MSVCRT.dll_putchar
add esp, 4
jmp 0x409c54
mov byte [esi + edi + 1], 0
cmp dword [esp + 0x34], 1
jne 0x409c6b
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x2c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
Function at 0x409ed0
Capabilities:
Manipulate console buffer

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
mov esi, dword [esp + 0x3c]
test esi, esi
push edi
jne 0x409eec
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
mov edi, dword [esp + 0x2c]
lea eax, [esp + 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x409f08
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x18]
test eax, eax
mov dword [esp + 0x2c], ecx
je 0x409f41
mov dx, word [eax]
mov ax, word [eax + 4]
mov word [esp + 0x40], dx
mov word [esp + 0x42], ax
mov ecx, dword [esp + 0x40]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
test eax, eax
jne 0x409f41
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x34]
mov ebp, dword [esp + 0x14]
cmp eax, 1
je 0x409f52
mov ebp, dword [esp + 0x34]
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
and edx, 0xffff
and eax, 0xffff
push edx
push eax
call fcn.00409de0
mov ebx, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
add esp, 8
push eax
push edi
call ebx
test eax, eax
jne 0x409f85
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
push esi
call fcn.00409e00
mov esi, eax
add esp, 4
test esi, esi
je 0x409fa3
push esi
call sub.MSVCRT.dll_printf
push esi
call sub.MSVCRT.dll_free
add esp, 8
cmp dword [esp + 0x34], 1
jne 0x409fbe
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
test eax, eax
jne 0x409fbe
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov ecx, dword [esp + 0x2c]
push ecx
push edi
call ebx
neg eax
pop edi
pop esi
sbb eax, eax
pop ebp
neg eax
pop ebx
add esp, 0x18
ret
Function at 0x10001800
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x110
mov eax, dword [0x1002cd28]
xor eax, esp
mov dword [esp + 0x10c], eax
mov al, 0x74
mov byte [esp + 4], al
mov byte [esp + 6], al
push 0x104
lea eax, [esp + 0xc]
push eax
push 0
mov byte [esp + 0xc], 0x5c
mov byte [esp + 0xd], 0x4e
mov byte [esp + 0xe], 0x48
mov byte [esp + 0xf], 0x2e
mov byte [esp + 0x11], 0x78
mov byte [esp + 0x13], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea eax, [esp]
mov ecx, eax
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10001860
push esi
push edi
lea edi, [esp + 0x10]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10001872
mov ecx, eax
shr ecx, 2
push 0
rep movsd dword es:[edi], dword [esi]
push 0x80
push 3
push 0
push 1
mov ecx, eax
push 0x80000000
lea edx, [esp + 0x28]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x100018e6
push ebp
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
push ebp
call fcn.10003088
add esp, 4
push 0
mov edi, eax
lea eax, [esp + 0x10]
push eax
push ebp
push edi
push esi
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
pop ebp
test edi, edi
je 0x100018e6
push edi
call fcn.10001100
mov ecx, dword [esp + 0x114]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.1000fcf5
add esp, 0x110
ret

Function at 0x1000fcf5
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x1002cd28]
jne 0x1000fcff
repz ret
jmp fcn.100133a8
Function at 0x1001a586
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.100136c5
and dword [ebp - 4], 0
cmp dword [0x10030d9c], 0
mov ebx, eax
jne 0x1001a637
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x1001a6e8
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10025578
push edi
call esi
test eax, eax
je 0x1001a6e8
push eax
call fcn.10013653
mov dword [esp], 0x10025568
push edi
mov dword [0x10030d9c], eax
call esi
push eax
call fcn.10013653
mov dword [esp], 0x10025554
push edi
mov dword [0x10030da0], eax
call esi
push eax
call fcn.10013653
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x10030da4], eax
call esi
push eax
call fcn.10013653
pop ecx
mov dword [0x10030dac], eax
test eax, eax
je 0x1001a637
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.10013653
pop ecx
mov dword [0x10030da8], eax
mov eax, dword [0x10030da8]
cmp eax, ebx
je 0x1001a68f
cmp dword [0x10030dac], ebx
je 0x1001a68f
push eax
call fcn.100136ce
push dword [0x10030dac]
mov esi, eax
call fcn.100136ce
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x1001a68f
test edi, edi
je 0x1001a68f
call esi
test eax, eax
je 0x1001a686
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x1001a686
test byte [ebp - 0xc], 1
jne 0x1001a68f
or dword [ebp + 0x10], 0x200000
jmp 0x1001a6c8
mov eax, dword [0x10030da0]
cmp eax, ebx
je 0x1001a6c8
push eax
call fcn.100136ce
pop ecx
test eax, eax
je 0x1001a6c8
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x1001a6c8
mov eax, dword [0x10030da4]
cmp eax, ebx
je 0x1001a6c8
push eax
call fcn.100136ce
pop ecx
test eax, eax
je 0x1001a6c8
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x10030d9c]
call fcn.100136ce
pop ecx
test eax, eax
je 0x1001a6e8
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x1001a6ea
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x20ab008], 0x8088405
inc edx
mov dword [ebx + 0x20ab008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x41cf00
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ebp
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
cld
mov dl, 0x80
mov al, byte [esi]
add esi, 1
mov byte [edi], al
add edi, 1
mov ebx, 2
add dl, dl
jne 0x41cf31
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cf19
add dl, dl
jne 0x41cf3c
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cf8d
xor eax, eax
add dl, dl
jne 0x41cf49
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41d02a
add dl, dl
jne 0x41cf58
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cf63
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cf6e
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cf79
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41cf83
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41cf28
mov eax, 1
add dl, dl
jne 0x41cf9b
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cfa6
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cf92
sub eax, ebx
mov ebx, 1
jne 0x41cfd9
mov ecx, 1
add dl, dl
jne 0x41cfbf
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41cfca
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cfb6
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cf28
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41cff0
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41cffb
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cfe7
cmp eax, 0x7d00
sbb ecx, 0xffffffff
cmp eax, 0x500
sbb ecx, 0xffffffff
cmp eax, 0x80
adc ecx, 0
cmp eax, 0x80
adc ecx, 0
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cf28
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41d04b
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x41cf28
pop ebp
sub edi, dword [ebp - 8]
mov dword [ebp - 0xc], edi
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x41f05c
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov ebx, edx
xor edx, edx
push ebp
push 0x208f54a
push dword fs:[edx]
mov dword fs:[edx], esp
xor edx, edx
mov dword [ebp - 8], edx
mov esi, ebx
xor ecx, ecx
cmp byte [eax + 0x6a], 0
je 0x41f0ab
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [esi + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x88]
test edx, edx
je 0x41f0ca
mov ecx, edx
add ecx, ebx
jmp 0x41f0ca
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [esi + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x78]
test edx, edx
je 0x41f0ca
mov ecx, edx
add ecx, ebx
test ecx, ecx
je 0x41f13c
mov esi, dword [ecx + 0x18]
mov eax, dword [ecx + 0x1c]
add eax, ebx
mov dword [ebp - 0x10], eax
mov edi, dword [ecx + 0x20]
add edi, ebx
mov eax, dword [ecx + 0x24]
add eax, ebx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
cmp eax, 0xffff
jbe 0x41f125
test esi, esi
jbe 0x41f13c
mov eax, dword [edi]
add eax, ebx
mov edx, dword [ebp - 4]
call fcn.004088ec
test eax, eax
jne 0x41f117
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
jmp 0x41f13c
add dword [ebp - 0xc], 2
add edi, 4
dec esi
test esi, esi
ja 0x41f0f4
jmp 0x41f13c
mov edx, eax
sub edx, dword [ecx + 0x10]
cmp edx, dword [ecx + 0x14]
jae 0x41f13c
mov eax, edx
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x208f551
ret
Function at 0x420294
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov word [ebp - 4], cx
mov byte [ebp - 1], dl
xor eax, eax
push ebp
push 0x20908af
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.00404cd0
xor ebx, ebx
mov eax, ebx
and eax, 0x80000001
jns 0x4202cf
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x4202e8
lea eax, [ebp - 0x10]
mov edx, dword [0x20ad54c]
mov edx, dword [edx]
mov edx, dword [edx + 0xc]
call fcn.00404d30
jmp 0x4202fb
lea eax, [ebp - 0x10]
mov edx, dword [0x20ad54c]
mov edx, dword [edx]
mov edx, dword [edx + 0x10]
call fcn.00404d30
lea eax, [ebp - 0x10]
mov edx, ebx
sar edx, 1
jns 0x420307
adc edx, 0
mov edx, dword [edx*4 + 0x20ac378]
call fcn.00404f20
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 0x10]
call fcn.00404f04
push eax
call fcn.00406b1c
mov esi, eax
cmp esi, 0xffffffff
je 0x420481
mov eax, 0x40
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 8]
push eax
push 0x40
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x420474
mov eax, edi
cmp word [eax], 0x5a4d
jne 0x420474
push 0
push 0
mov eax, dword [eax + 0x3c]
push eax
push esi
call fcn.00406ddc
mov eax, edi
call fcn.00403288
mov eax, 0x18
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 8]
push eax
push 0x18
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x420474
mov eax, edi
cmp dword [eax], 0x4550
jne 0x420474
add eax, 4
mov dword [ebp - 0xc], eax
cmp byte [ebp - 1], 0
je 0x420412
mov eax, dword [ebp - 0xc]
cmp word [eax], 0x8664
jne 0x420412
mov eax, edi
call fcn.00403288
mov eax, 0xf0
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 8]
push eax
push 0xf0
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x420412
mov eax, edi
mov dx, word [eax + 0x44]
cmp dx, word [ebp - 4]
jne 0x420412
mov eax, dword [eax + 0x10]
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
call fcn.00404d0c
cmp byte [ebp - 1], 0
jne 0x420474
mov eax, dword [ebp - 0xc]
cmp word [eax], 0x14c
jb 0x420474
mov eax, dword [ebp - 0xc]
cmp word [eax], 0x150
ja 0x420474
mov eax, edi
call fcn.00403288
mov eax, 0xe0
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 8]
push eax
push 0xe0
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x420474
mov eax, edi
mov dx, word [eax + 0x44]
cmp dx, word [ebp - 4]
jne 0x420474
mov eax, dword [eax + 0x10]
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
call fcn.00404d0c
mov eax, edi
call fcn.00403288
push esi
call fcn.00406ad4
mov eax, dword [ebp + 8]
mov eax, dword [eax]
xor edx, edx
call fcn.0040502c
jne 0x420499
inc ebx
cmp ebx, 0x19
jne 0x4202c1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x20908b6
lea eax, [ebp - 0x10]
call fcn.00404cd0
ret
Function at 0x401630
Capabilities:
Check internet connectivity via wininet
Connect to http server
Create http request

Disassembly:
push 0
push 0x438a1c
push 0x438a1c
push 0
push str.MERONG_0.9__p_
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esi + 0x30d5c], eax
test eax, eax
jne 0x401664
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x30d68], eax
xor eax, eax
ret 8
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push 0
push 0x4400000
push 3
push 0
push 0
push ecx
push edx
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [esi + 0x30d60], eax
test eax, eax
jne 0x4016aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x30d68], eax
mov eax, dword [esi + 0x30d5c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
ret 8
push 0
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
test eax, eax
je 0x4016e1
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x30d60]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov dword [esi + 0x30d68], eax
call edi
mov edx, dword [esi + 0x30d5c]
push edx
call edi
xor eax, eax
pop edi
ret 8
mov eax, 1
ret 8

Function at 0x401820
Capabilities:
Send data
Send http request

Disassembly:
jmp 0x401830
sub esp, 8
mov edx, dword [esi + 0x30d60]
push 0
push 0x4400000
lea eax, [esp + 8]
push eax
push 0x438a1c
push str.HTTP_1.0
push ecx
push 0x438a30
push edx
mov dword [esp + 0x20], 0x438a20
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [esi + 0x30d64], eax
test eax, eax
jne 0x401880
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x30d68], eax
xor eax, eax
add esp, 8
ret
push bind
push 0xd
push str.Accept:___r_n
push eax
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
test eax, eax
je 0x40186e
mov ecx, dword [esi + 0x30d64]
push 4
lea eax, [esp + 8]
push eax
push 6
push ecx
mov dword [esp + 0x14], 0x3a98
call dword [sym.imp.WININET.dll_InternetSetOptionA]
test eax, eax
je 0x40187a
mov edx, dword [esi + 0x30d64]
push 0
push 0
push 0
push 0
push edx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x40186e
mov eax, 1
add esp, 8
ret
Function at 0x4018e0
Capabilities:
Read data from internet
Receive data

Disassembly:
sub esp, 0x40c
mov eax, dword [0x43fc34]
xor eax, esp
mov dword [esp + 0x408], eax
mov eax, dword [esp + 0x410]
push ebp
mov ebp, dword [esp + 0x418]
push 0x3ff
lea ecx, [esp + 0x11]
push 0
push ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0x186a0
mov byte [esp + 0x18], 0
call fcn.00420f90
add esp, 0xc
cmp dword [ebx + 0x30d64], 0
jne 0x401957
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x30d68], eax
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x408]
xor ecx, esp
call fcn.0041d795
add esp, 0x40c
ret 8
push 0x186a0
push 0
push ebp
call fcn.00420f90
add esp, 0xc
mov dword [edi], 0
push esi
mov edi, edi
mov esi, dword [ebx + 0x30d64]
test esi, esi
je 0x4019d2
push 0x400
lea edx, [esp + 0x14]
push 0
push edx
call fcn.00420f90
add esp, 0xc
push 0x44393c
push 0x400
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4019d2
mov ecx, dword [0x44393c]
mov esi, ecx
test ecx, ecx
je 0x4019de
mov eax, dword [edi]
cmp eax, 0x186a0
jae 0x4019de
push ecx
lea ecx, [esp + 0x14]
push ecx
add eax, ebp
push eax
call fcn.00423740
add esp, 0xc
add dword [edi], esi
jmp 0x401970
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0x30d68], eax
mov edx, dword [esp + 8]
mov esi, dword [esp + 0xc]
push edx
push 0
push esi
call fcn.00420f90
mov ecx, dword [ebx + 0x30d64]
add esp, 0xc
push 0
lea eax, [esp + 0xc]
push eax
push esi
push 0x16
push ecx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
pop esi
test eax, eax
je 0x401931
mov ecx, dword [esp + 0x40c]
xor eax, eax
cmp dword [edi], eax
pop ebp
setne al
xor ecx, esp
call fcn.0041d795
add esp, 0x40c
ret 8
Function at 0x4048e0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x4048f9
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x404934
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x404930
lea ebx, [ebx]
cmp esi, eax
jae 0x404934
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x404920
cmp esi, eax
jb 0x40493a
pop esi
pop edi
xor eax, eax
pop ebx
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x4050c0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x19c
mov eax, dword [0x43fc34]
xor eax, esp
mov dword [esp + 0x198], eax
push esi
push 0x443c14
mov dword [0x443c10], 0x438cc8
call fcn.00401550
xor eax, eax
push 0x32
xor esi, esi
push esi
push 0x443ca4
mov dword [0x443c5c], eax
mov dword [0x443c60], eax
mov dword [0x443c64], eax
mov word [0x443c68], ax
mov byte [0x443c6a], al
call fcn.00420f90
xor eax, eax
add esp, 0xc
mov dword [0x443ce0], esi
mov dword [0x443c44], esi
mov dword [0x443c40], 0xffffffff
mov dword [0x443cec], esi
mov dword [0x443c20], esi
mov dword [0x443c48], eax
mov dword [0x443c4c], eax
mov dword [0x443c50], eax
mov dword [0x443c54], eax
mov dword [0x443c58], eax
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
push 0x443c24
mov dword [0x443c58], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [esp + 8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov ecx, dword [esp + 0x19c]
pop esi
xor ecx, esp
mov eax, 0x443c10
call fcn.0041d795
mov esp, ebp
pop ebp
ret