joyce8/EMBER2024-capa huggingface dataset:
Function at 0x49acc0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket

Disassembly:
sub esp, 0x10
push esi
call fcn.0049b400
push 6
push 1
push 2
mov dword [0x4bca6c], eax
call sub.WS2_32.dll_socket
mov ecx, dword [esp + 0x18]
mov esi, eax
xor eax, eax
push ecx
mov dword [esp + 8], eax
mov word [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
call sub.WS2_32.dll_inet_addr
mov edx, dword [esp + 0x1c]
mov dword [esp + 8], eax
push edx
call sub.WS2_32.dll_htons
mov word [esp + 6], ax
lea eax, [esp + 4]
push 0x10
push eax
push esi
call sub.WS2_32.dll_connect
test eax, eax
jge 0x49ad2f
push esi
call sub.WS2_32.dll_closesocket
xor eax, eax
pop esi
add esp, 0x10
ret
mov eax, esi
pop esi
add esp, 0x10
ret

Function at 0x49c540
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 8
xor ecx, ecx
xor eax, eax
push ebp
mov ebp, dword [esp + 0x18]
mov byte [eax + ebp], al
inc eax
cmp eax, 0x100
jl 0x49c54c
mov eax, dword [esp + 0x14]
mov byte [ebp + 0x100], cl
cmp eax, ecx
mov byte [ebp + 0x101], cl
jle 0x49c5df
push ebx
push esi
push edi
mov byte [esp + 0x24], cl
xor esi, esi
mov ebx, ebp
mov dword [esp + 0x10], 0x100
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
and edi, 0xff
xor eax, eax
xor edx, edx
mov al, byte [edi + ecx]
mov dl, byte [ebx]
add esi, eax
add edx, esi
and edx, 0x800000ff
jns 0x49c5a9
dec edx
or edx, 0xffffff00
inc edx
mov byte [esp + 0x14], dl
mov esi, dword [esp + 0x14]
and esi, 0xff
lea eax, [esi + ebp]
push eax
push ebx
call fcn.0049c5f0
lea eax, [edi + 1]
add esp, 8
cdq
idiv dword [esp + 0x20]
mov eax, dword [esp + 0x10]
inc ebx
dec eax
mov dword [esp + 0x10], eax
mov byte [esp + 0x24], dl
jne 0x49c57e
pop edi
pop esi
pop ebx
pop ebp
add esp, 8
ret
Function at 0x49c610
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0xc
mov edx, dword [esp + 0x14]
push ebx
push esi
mov esi, dword [esp + 0x20]
xor ebx, ebx
mov al, byte [esi + 0x100]
mov cl, byte [esi + 0x101]
test edx, edx
mov byte [esp + 0x20], al
mov byte [esp + 8], cl
jle 0x49c70d
push ebp
mov ebp, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0x28]
and edi, 0xff
and ebp, 0xff
lea eax, [edi + 1]
and eax, 0x800000ff
jns 0x49c662
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x28], al
xor ecx, ecx
mov edi, dword [esp + 0x28]
and edi, 0xff
mov cl, byte [edi + esi]
lea eax, [edi + esi]
add ecx, ebp
mov dword [esp + 0x18], eax
and ecx, 0x800000ff
jns 0x49c68e
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ebp, dword [esp + 0x10]
and ebp, 0xff
lea ecx, [esi + ebp]
push ecx
push eax
mov dword [esp + 0x1c], ecx
call fcn.0049c5f0
mov eax, dword [esp + 0x1c]
xor edx, edx
xor ecx, ecx
add esp, 8
mov dl, byte [eax]
mov eax, dword [esp + 0x18]
mov cl, byte [eax]
add edx, ecx
and edx, 0x800000ff
jns 0x49c6cf
dec edx
or edx, 0xffffff00
inc edx
mov eax, dword [esp + 0x20]
and edx, 0xff
mov cl, byte [edx + esi]
mov dl, byte [ebx + eax]
xor dl, cl
mov byte [ebx + eax], dl
mov eax, dword [esp + 0x24]
inc ebx
cmp ebx, eax
jl 0x49c651
mov dl, byte [esp + 0x28]
mov al, byte [esp + 0x10]
pop edi
mov byte [esi + 0x100], dl
mov byte [esi + 0x101], al
pop ebp
pop esi
pop ebx
add esp, 0xc
ret
mov byte [esi + 0x100], al
mov byte [esi + 0x101], cl
pop esi
pop ebx
add esp, 0xc
ret
Function at 0x49d6f0
Capabilities:
Encrypt data using des

Disassembly:
sub esp, 0xf4
xor ecx, ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x104]
push edi
xor eax, eax
mov al, byte [ecx + str.80_]
mov edx, eax
and eax, 7
sar edx, 3
mov bl, byte [eax*2 + 0x4abad4]
mov dl, byte [edx + esi]
test bl, dl
setne al
mov byte [esp + ecx + 0x4c], al
inc ecx
cmp ecx, 0x38
jl 0x49d703
mov eax, 0x1e
xor edx, edx
mov dword [esp + 0x10], eax
cmp dword [esp + 0x10c], 1
je 0x49d744
lea eax, [edx + edx]
lea edi, [esp + eax*4 + 0x88]
lea ebp, [esp + eax*4 + 0x84]
xor eax, eax
xor ecx, ecx
mov cl, byte [edx + 0x4abb7c]
mov dword [edi], 0
mov dword [ebp], 0
mov esi, ecx
cmp ecx, 0x1c
jge 0x49d776
mov bl, byte [esp + ecx + 0x4c]
jmp 0x49d77a
mov bl, byte [esp + ecx + 0x30]
mov byte [esp + eax + 0x14], bl
inc eax
inc ecx
cmp eax, 0x1c
jl 0x49d76b
mov eax, 0x1c
lea ecx, [esi + 0x1c]
cmp ecx, 0x38
jge 0x49d798
mov bl, byte [esp + ecx + 0x4c]
jmp 0x49d79c
mov bl, byte [esp + ecx + 0x30]
mov byte [esp + eax + 0x14], bl
inc eax
inc ecx
cmp eax, 0x38
jl 0x49d78d
xor ecx, ecx
mov eax, 0x4abae4
xor ebx, ebx
mov bl, byte [ecx + 0x4abb8c]
cmp byte [esp + ebx + 0x14], 0
je 0x49d7c7
mov esi, dword [eax]
mov ebx, dword [ebp]
or ebx, esi
mov dword [ebp], ebx
xor ebx, ebx
mov bl, byte [ecx + 0x4abba4]
cmp byte [esp + ebx + 0x14], 0
je 0x49d7de
mov esi, dword [eax]
mov ebx, dword [edi]
or ebx, esi
mov dword [edi], ebx
add eax, 4
inc ecx
cmp eax, str.80_
jl 0x49d7ae
mov eax, dword [esp + 0x10]
inc edx
sub eax, 2
cmp eax, 0xfffffffe
mov dword [esp + 0x10], eax
jg 0x49d737
lea edx, [esp + 0x84]
push edx
call fcn.0049d820
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xf4
ret
Function at 0x4016c0
Capabilities:
Hash data with md5

Disassembly:
push ebx
push edi
push esi
sub esp, 8
mov eax, 0x41c73b03
mov dword [esp + 4], ecx
mov edx, ecx
mov esi, dword [0x49e80c]
not esi
mov edi, dword [0x4a0e98]
sub edi, esi
mov dword [0x4a0e98], edi
mov dword [ecx], 0
mov bx, word [0x497840]
mov si, bx
add esi, 0xb7cff3f4
mov bx, si
mov word [0x497840], bx
mov dword [ecx + 4], 0
mov esi, dword [0x4a2a90]
sar esi, 1
add esi, 0x7fd8843b
mov edi, dword [0x49939c]
or edi, esi
mov dword [0x49939c], edi
mov dword [ecx + 8], 0x67452301
mov esi, dword [0x49c548]
and esi, 0x63d1b84b
mov dword [0x49c548], esi
mov dword [ecx + 0xc], 0xefcdab89
mov ecx, dword [0x4a21dc]
not ecx
mov esi, dword [0x4a0ae8]
dec esi
mov dword [0x4a0ae8], esi
imul ecx, esi
cmp eax, ecx
mov dword [esp], edx
je 0x4017c8
mov eax, 0x777bf43c
mov ecx, dword [0x4991f8]
imul ecx, ecx, 0xc9585c80
mov dx, word [0x493740]
movsx esi, dx
shl esi, 2
xor ecx, esi
mov esi, dword [0x49d004]
sub eax, esi
xor eax, 0xd4cd9217
cmp ecx, eax
jg 0x4017c3
mov eax, dword [0x49ad5c]
mov ecx, eax
inc ecx
mov dword [0x49ad5c], ecx
mov ecx, 0x931ad90d
sub ecx, eax
mov eax, dword [0x49ef94]
and eax, ecx
mov dword [0x49ef94], eax
jmp 0x4017c8
mov eax, 0x25720d66
mov ecx, dword [esp]
mov dword [ecx + 0x10], 0x98badcfe
mov word [0x494f68], 0x3ca2
mov dword [ecx + 0x14], 0x10325476
mov edx, dword [0x49dd84]
inc edx
mov dword [0x49dd84], edx
mov esi, dword [0x4a22e8]
sub eax, esi
and edx, eax
cmp edx, 0xf7935e21
jle 0x401819
mov eax, dword [0x49bd18]
xor eax, 0x521070d9
mov dword [0x49a044], eax
add esp, 8
pop esi
pop edi
pop ebx
ret
Function at 0x42a940
Capabilities:
Terminate process

Disassembly:
push esi
sub esp, 0x10
mov eax, dword [esp + 0x18]
mov ecx, 0x6b50bf89
mov dword [esp + 0xc], eax
mov eax, dword [0x499904]
add eax, 0x6da0e04f
cmp ecx, eax
je 0x42a9ac
mov ax, word [0x494896]
movsx ecx, ax
sub ecx, 0x86c3763d
or ecx, 0x1a66afc
cmp ecx, 0x150be092
jge 0x42a9a7
mov ax, word [0x498886]
movsx ecx, ax
imul ecx, ecx, 0x1ac34984
mov edx, dword [0x4a3d38]
xor ecx, edx
xor ecx, 0xbd9ba8ad
mov dword [0x4a3d38], ecx
jmp 0x42a9ac
mov eax, dword [0x4a4420]
mov ecx, esp
mov dword [ecx], eax
call fcn.00441140
mov ecx, dword [0x4a3b24]
inc ecx
mov dword [0x4a3b24], ecx
mov edx, dword [0x4a24c0]
imul edx, ecx
lea ecx, [edx*4 + 0x475bd587]
mov si, word [0x49870c]
movsx edx, si
imul edx, edx, 0x2e8de824
or edx, 0x8f20204d
cmp ecx, edx
mov byte [esp + 0xb], al
jl 0x42aa6b
mov eax, 0xc1c768b3
mov ecx, dword [0x4a2e7c]
xor ecx, 0xffffffff
cmp eax, ecx
jl 0x42aa43
mov ax, word [0x498a8a]
mov cx, ax
mov edx, ecx
inc edx
mov ax, dx
mov word [0x498a8a], ax
add ecx, 0x65482a18
mov ax, word [0x496716]
mov dx, ax
and edx, ecx
mov ax, dx
mov word [0x496716], ax
jmp 0x42aa66
mov eax, 0xb80b65f
mov ecx, dword [0x49d294]
imul ecx, ecx, 0xd75a5ec0
cmp eax, ecx
jle 0x42aa61
jmp 0x42aa61
jmp 0x42aa66
jmp 0x42aac5
mov eax, 0xb43af97a
mov ecx, dword [0x49fdbc]
or ecx, 0xf1498d04
or ecx, 0x301ceca4
cmp eax, ecx
je 0x42aa9e
mov eax, dword [0x4a38e8]
add eax, 0x3b96dfcf
mov dword [0x4a38e8], eax
jmp 0x42aac0
mov eax, 0xd28b499f
mov ecx, dword [0x4a3378]
cmp eax, ecx
jle 0x42aab6
jmp 0x42aabb
jmp 0x42aabb
jmp 0x42aac0
jmp 0x42aac5
mov eax, 1
mov dword [esp], 1
mov dword [esp + 4], eax
call fcn.00455a34
int3
Function at 0x46ba88
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4926b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.0045de97
mov dword [ebp - 0x14], eax
cmp dword [0x4a5864], esi
jne 0x46bb7b
push 0x800
push esi
push 0x481bf8
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x46bb08
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x46bc5b
push esi
push esi
push 0x481bf8
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x46bc5b
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x46bc5b
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x4a5864], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x4a5868], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x4a586c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x4a5874], eax
test eax, eax
je 0x46bb78
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x4a5870], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x46bba0
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x46bb93
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x46bbb5
push 4
pop eax
jmp 0x46bc5d
cmp dword [ebp - 0x14], esi
je 0x46bbb5
push dword [0x4a5864]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x46bb9a
mov eax, dword [0x4a5870]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x46bc13
cmp dword [0x4a5874], edi
je 0x46bc13
push eax
call ebx
push dword [0x4a5874]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x46bc13
test eax, eax
je 0x46bc13
call ecx
test eax, eax
je 0x46bc08
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x46bc08
test byte [ebp - 8], 1
jne 0x46bc13
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x46bc43
mov eax, dword [0x4a5868]
cmp eax, edi
je 0x46bc40
push eax
call ebx
test eax, eax
je 0x46bc40
call eax
mov esi, eax
test esi, esi
je 0x46bc40
mov eax, dword [0x4a586c]
cmp eax, edi
je 0x46bc40
push eax
call ebx
test eax, eax
je 0x46bc40
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x4a5864]
call ebx
test eax, eax
je 0x46bc5b
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x46bc5d
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004678c2
mov esp, ebp
pop ebp
ret
Function at 0x401cf0
Capabilities:
Terminate thread

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
ret

Function at 0x401d10
Capabilities:
Create thread

Disassembly:
push ecx
mov eax, dword [esp + 0x10]
mov dword [esp], 0
test eax, eax
jne 0x401d25
lea eax, [esp]
mov ecx, dword [esp + 8]
push eax
mov eax, dword [esp + 0x10]
push 0
push eax
push ecx
push 0
push 0
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x1c
ret
Function at 0x403760
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 0x14]
test eax, eax
jne 0x403772
xor eax, eax
pop esi
pop ecx
ret 8
mov ecx, esi
call fcn.004037c0
test eax, eax
jne 0x40378a
cmp dword [esi + 0x18], 0xffffffff
jne 0x40378a
xor eax, eax
pop esi
pop ecx
ret 8
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
lea eax, [esp + 4]
push 0
push eax
mov eax, dword [esi + 0x18]
push ecx
push edx
push eax
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 4]
pop esi
neg eax
sbb eax, eax
and eax, ecx
pop ecx
ret 8
Function at 0x404d40
Capabilities:
Hide graphical window

Disassembly:
xor eax, eax
sub esp, 0x114
cmp eax, str.RelaySystem
je 0x404d8f
xor ecx, ecx
cmp ecx, str.Enable
je 0x404d8f
mov eax, dword [0x411378]
mov ecx, dword [0x411360]
push str.Enable
push 0x26
push eax
push ecx
push eax
push ecx
push str.RelaySystem
lea edx, [esp + 0x2c]
push str._s_JXOnline__Sys:_s__s___Cur:_s__s____d____s_
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x24
mov byte [esp + 0x113], 0
push ebp
push esi
push edi
mov edi, dword [esp + 0x124]
push 0
push edi
push 0
push 0
mov ebp, dword [sym.imp.USER32.dll_CreateWindowExA]
push 0
push bind
push 0
push bind
lea eax, [esp + 0x3c]
push 0xcf0000
push eax
push 0x412128
push 0
call ebp
mov esi, eax
test esi, esi
jne 0x404dd7
pop edi
pop esi
pop ebp
add esp, 0x114
ret
xor ecx, ecx
lea edx, [esp + 0xc]
mov dword [esp + 0x10], ecx
push edx
mov dword [esp + 0x18], ecx
push esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x20], ecx
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push 0
push edi
push 0
push esi
push eax
push ecx
push 0
push 0
push 0x50300100
push 0x41131c
push str.ListBox
push 0
call ebp
test eax, eax
mov dword [0x612280], eax
jne 0x404e33
pop edi
pop esi
pop ebp
add esp, 0x114
ret
mov edx, dword [esp + 0x128]
push edx
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, dword [esp + 0x12c]
push 0
push eax
push 1
push esi
call dword [sym.imp.USER32.dll_SetTimer]
mov dword [0x61228c], edi
pop edi
mov dword [0x612290], eax
pop esi
mov eax, 1
pop ebp
add esp, 0x114
ret

Function at 0x409520
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40de60
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10c
mov edx, ecx
push ebx
push esi
xor eax, eax
mov ecx, dword [edx + 0x2c]
push edi
cmp ecx, eax
mov dword [ebp - 0x10], esp
jne 0x409562
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [ebp + 0x10]
mov dword [ebp - 4], eax
mov byte [ebp - 0x118], al
mov al, byte [ebp + 0xc]
mov byte [ebp - 0x117], al
xor eax, eax
mov ax, word [esi]
lea edi, [ebp - 0x116]
mov ecx, eax
mov word [esi + 2], 1
mov ebx, ecx
add eax, 2
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov dword [ebp + 0xc], eax
mov eax, dword [edx + 0x2c]
lea edx, [ebp + 0xc]
mov ecx, ebx
push edx
lea edx, [ebp - 0x118]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax]
lea edx, [ebp + 8]
push edx
push eax
call dword [ecx + 0x30]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x401810
Capabilities:
Write file on windows

Disassembly:
push edi
push esi
push ebx
sub esp, 0x430
lea eax, [esp + 0x448]
lea esi, [esp + 0x30]
mov dword [esp + 4], 0x400
mov ebx, dword [esp + 0x440]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x444]
mov dword [esp], esi
lea edi, [ebx + 4]
mov dword [esp + 8], eax
call fcn.00403940
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov eax, dword [ebx]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x4018a0
mov eax, dword [ebx]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
sub esp, 4
mov eax, dword [esp + 0x2c]
add esp, 0x430
pop ebx
pop esi
pop edi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40187b
lea eax, [esp + 0x2c]
mov dword [esp + 0xc], 1
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov eax, dword [ebx]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
sub esp, 0x10
jmp 0x40187b

Function at 0x402c60
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.004091f0
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.004091f0
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]
Function at 0x402cc0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x40d0a8]
test esi, esi
jle 0x402de0
mov eax, dword [0x40d0ac]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp edx, ebx
ja 0x402cf4
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x402d77
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x402ce0
mov dword [esp], ebx
call fcn.00403640
mov edi, eax
test eax, eax
je 0x402e07
mov eax, dword [0x40d0ac]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.00403780
mov edx, dword [0x40d0ac]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x402de7
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x402d70
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x402d80
add dword [0x40d0a8], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 0x40
mov eax, 4
mov ecx, dword [esp + 0x20]
cmovne eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x40d0ac]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x402d70
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00402c60
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x402cfe
mov eax, dword [0x40d0ac]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00402c60
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00402c60
lea esi, [esi]
nop

Function at 0x4032c0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x40d0c4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x40d0bc]
sub esp, 4
test ebx, ebx
je 0x403315
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x40330e
test esi, esi
je 0x40330e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x4032f0
mov dword [esp], 0x40d0c4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x403640
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x403665
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x403670
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x403665
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test esi, esi
je 0x4036b8
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x4036ae
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x4036ba
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x4036a0
xor eax, eax
pop ebx
pop esi
ret
Function at 0x401900
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x4073a0]
test esi, esi
jle 0x401a10
mov edi, dword [0x4073a4]
xor ebx, ebx
lea edx, [edi + 0xc]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x401934
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x4019b5
add ebx, 1
add edx, 0x14
cmp ebx, esi
jne 0x401920
mov dword [esp], eax
mov ebx, eax
call dbg.__mingw_GetSectionForAddress
test eax, eax
mov edi, eax
je 0x401a37
mov eax, dword [0x4073a4]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
add eax, dword [edi + 0xc]
mov edx, dword [0x4073a4]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x401a17
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x4019ae
sub eax, 4
and eax, 0xfffffffb
jne 0x4019c0
add dword [0x4073a0], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
add ebx, dword [0x4073a4]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov dword [ebx + 4], eax
mov dword [ebx + 8], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x40
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x4019ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
lea esi, [esi]
xor esi, esi
jmp 0x40193e
mov eax, dword [0x4073a4]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
nop

Function at 0x401e70
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x4073b8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x4073b0]
sub esp, 4
test ebx, ebx
je 0x401ec5
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x401ebe
test esi, esi
je 0x401ebe
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401ea0
mov dword [esp], 0x4073b8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret