joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40caaa
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4247c0]
jne 0x40cab4
repz ret
jmp fcn.0040fc4b

Function at 0x416b64
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00410747
xor ebx, ebx
cmp dword [0x42681c], ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
jne 0x416c39
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
jne 0x416ba4
xor eax, eax
jmp 0x416cfd
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x41e954
push edi
call esi
cmp eax, ebx
je 0x416b9d
push eax
call fcn.004106e4
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x42681c], eax
call esi
push eax
call fcn.004106e4
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x426820], eax
call esi
push eax
call fcn.004106e4
mov dword [0x426824], eax
lea eax, [ebp - 8]
push eax
call fcn.00411c9d
test eax, eax
pop ecx
pop ecx
je 0x416c07
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040ccce
add esp, 0x14
cmp dword [ebp - 8], 2
jne 0x416c39
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.004106e4
cmp eax, ebx
pop ecx
mov dword [0x42682c], eax
je 0x416c39
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004106e4
pop ecx
mov dword [0x426828], eax
mov eax, dword [0x426828]
mov esi, dword [ebp - 0x10]
cmp eax, esi
je 0x416cb2
cmp dword [0x42682c], esi
je 0x416cb2
push eax
call fcn.00410750
pop ecx
call eax
cmp eax, ebx
je 0x416c7f
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
push dword [0x42682c]
call fcn.00410750
pop ecx
call eax
test eax, eax
je 0x416c7f
test byte [ebp - 0x18], 1
jne 0x416cb2
lea eax, [ebp - 0xc]
push eax
call fcn.00411cd4
test eax, eax
pop ecx
je 0x416c9a
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0040ccce
add esp, 0x14
cmp dword [ebp - 0xc], 4
jb 0x416ca9
or dword [ebp + 0x10], 0x200000
jmp 0x416ce3
or dword [ebp + 0x10], 0x40000
jmp 0x416ce3
mov eax, dword [0x426820]
cmp eax, esi
je 0x416ce3
push eax
call fcn.00410750
pop ecx
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x416ce3
mov eax, dword [0x426824]
cmp eax, esi
je 0x416ce3
push dword [ebp - 4]
push eax
call fcn.00410750
pop ecx
call eax
mov dword [ebp - 4], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
push dword [0x42681c]
call fcn.00410750
pop ecx
call eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10024b7c
Capabilities:
Resolve function by parsing pe exports

Disassembly:
jmp 0x10033591
jmp 0x100250b8
Function at 0x1000d715
Capabilities:
Send data
Send data on socket

Disassembly:
push 4
mov eax, 0x10011ba9
call fcn.100105e5
push 0x10
call fcn.1000f510
mov dword [ebp - 0x10], eax
and dword [ebp - 4], 0
mov ecx, eax
call fcn.1000b938
mov esi, eax
push 0xa8
mov ecx, esi
call fcn.1000b960
push 1
call fcn.1000b960
call fcn.1000b984
mov ecx, esi
call fcn.1000f2bc
mov ecx, dword [esi + 0xc]
push 0
movzx eax, word [ecx]
add eax, 2
push eax
push ecx
push dword [0x1001873c]
call dword [sym.imp.WS2_32.dll_send]
push dword [esi + 0xc]
call fcn.1000f756
push 0x10
push esi
call fcn.1000f540
add esp, 0xc
call fcn.100105c2
ret 8

Function at 0x1000d78b
Capabilities:
Send data
Send data on socket

Disassembly:
push 4
mov eax, 0x10011ba9
call fcn.100105e5
push 0x10
call fcn.1000f510
mov dword [ebp - 0x10], eax
and dword [ebp - 4], 0
mov ecx, eax
call fcn.1000b938
mov esi, eax
push 0x32
mov ecx, esi
call fcn.1000b960
push 0xc9
call fcn.1000b960
push dword [ebp + 0xc]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strlen]
mov edx, dword [esi + 4]
mov edi, eax
pop ecx
mov ebx, 0x3bea
lea ecx, [edi + 2]
add ecx, edx
cmp ecx, ebx
jae 0x1000d814
cmp edi, 0x2000
ja 0x1000d814
lea eax, [edx + 2]
cmp eax, ebx
jae 0x1000d7fe
mov eax, dword [esi + 0xc]
mov word [edx + eax], di
add dword [esi + 4], 2
mov edx, dword [esi + 4]
add dword [esi], 2
mov eax, dword [esi + 0xc]
push dword [ebp + 0xc]
add eax, edx
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy]
add dword [esi + 4], edi
add dword [esi], edi
pop ecx
pop ecx
mov ecx, esi
call fcn.1000b984
mov ecx, esi
call fcn.1000f2bc
mov ecx, dword [esi + 0xc]
push 0
movzx eax, word [ecx]
add eax, 2
push eax
push ecx
push dword [0x1001873c]
call dword [sym.imp.WS2_32.dll_send]
push dword [esi + 0xc]
call fcn.1000f756
push 0x10
push esi
call fcn.1000f540
add esp, 0xc
call fcn.100105c2
ret 8
Function at 0x1000db69
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create directory
Create raw socket
Create tcp socket
Create udp socket
Initialize winsock library
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1f4
mov eax, dword [0x10018008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
call dword [sym.imp.MSVCP140.dll__Xtime_get_ticks]
push 0
push 0x2710
push edx
push eax
call fcn.10010690
mov edi, edx
mov ebx, eax
push 0
mov dword [ebp - 0x1ec], edi
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
pop ecx
push eax
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
pop ecx
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
push 0
movzx esi, ax
push str.movies
mov dword [ebp - 0x1f0], esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
movzx eax, si
push eax
push edi
push ebx
lea eax, [ebp - 0x48]
push str.movies__lld__d.byn
push eax
call fcn.1000104a
add esp, 0x14
lea eax, [ebp - 0x48]
push 0x10013718
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
push 3
push 0x20
push 0x64
push str._c_c_c
push eax
mov dword [0x10018754], eax
call fcn.10001026
add esp, 0x1c
push dword [0x10018754]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
pop ecx
lea eax, [ebp - 0x1e8]
mov dword [0x10018758], ebx
push eax
push 0x202
mov dword [0x1001875c], edi
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0x10
lea eax, [ebp - 0x58]
push 0
push eax
call dword [sym.imp.VCRUNTIME140.dll_memset]
add esp, 0xc
push 6
push 1
push 2
pop esi
push esi
call dword [sym.imp.WS2_32.dll_socket]
push str.145.239.93.29
mov dword [0x10018740], eax
mov word [ebp - 0x58], si
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x1d74
mov dword [ebp - 0x54], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x56], ax
lea eax, [ebp - 0x58]
push 0x10
push eax
push dword [0x10018740]
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x14], 0x2001000d
mov byte [ebp - 0x10], 3
mov edx, edi
mov byte [ebp - 0xf], bl
mov eax, edx
mov byte [ebp - 0xb], dl
mov ecx, ebx
shrd ecx, eax, 8
mov eax, edx
mov byte [ebp - 0xe], cl
mov ecx, ebx
shrd ecx, eax, 0x10
mov eax, edx
shrd ebx, eax, 0x18
mov eax, edx
mov byte [ebp - 0xd], cl
sar eax, 8
mov byte [ebp - 0xa], al
mov eax, edx
sar eax, 0x10
mov byte [ebp - 9], al
mov eax, dword [ebp - 0x1f0]
mov byte [ebp - 7], al
shr eax, 8
push 0
mov byte [ebp - 6], al
lea eax, [ebp - 0x14]
push 0xf
push eax
push dword [0x10018740]
sar edx, 0x18
mov byte [ebp - 0xc], bl
mov byte [ebp - 8], dl
call dword [sym.imp.WS2_32.dll_send]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1000f502
leave
ret
Function at 0x1000dd05
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
push 0x144
mov eax, 0x10011c13
call fcn.10010618
mov esi, dword [ebp + 0xc]
lea ecx, [ebp - 0x144]
push str.SOFTWARETibiazQt_DLL_Gorgo
call fcn.10002324
xor ebx, ebx
lea ecx, [ebp - 0x12c]
push str.remember
mov dword [ebp - 4], ebx
call fcn.10002324
mov eax, dword [ebp + 8]
mov byte [ebp - 4], 1
mov dword [ebp - 0x150], 0xff
mov dword [ebp - 0x14c], ebx
test eax, eax
jne 0x1000de00
cmp dword [ebp - 0x130], 0x10
lea eax, [ebp - 0x144]
jb 0x1000dd70
mov eax, dword [ebp - 0x144]
lea ecx, [ebp - 0x148]
push ecx
push 0x20019
push ebx
push eax
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1000defa
cmp dword [ebp - 0x118], 0x10
lea eax, [ebp - 0x12c]
jb 0x1000dda6
mov eax, dword [ebp - 0x12c]
lea ecx, [ebp - 0x150]
push ecx
lea ecx, [ebp - 0x114]
push ecx
lea ecx, [ebp - 0x14c]
push ecx
push ebx
push eax
push dword [ebp - 0x148]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1000deee
cmp dword [ebp - 0x14c], 1
jne 0x1000deee
lea eax, [ebp - 0x114]
mov byte [0x100186fc], 1
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strlen]
pop ecx
push eax
lea eax, [ebp - 0x114]
push eax
jmp 0x1000dee4
cmp eax, 1
jne 0x1000de7b
cmp dword [ebp - 0x130], 0x10
lea eax, [ebp - 0x144]
jb 0x1000de1a
mov eax, dword [ebp - 0x144]
push ebx
lea ecx, [ebp - 0x148]
push ecx
push ebx
push 0x20006
push ebx
push ebx
push ebx
push eax
push connect
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x1000defa
cmp dword [ebp - 0x118], 0x10
lea edi, [ebp - 0x12c]
jb 0x1000de54
mov edi, dword [ebp - 0x12c]
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strlen]
push esi
call ebx
pop ecx
inc eax
push eax
push esi
push 1
push 0
push edi
push dword [ebp - 0x148]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x1000deee
push esi
call ebx
jmp 0x1000dee1
cmp eax, 2
jne 0x1000defa
cmp dword [ebp - 0x130], 0x10
lea eax, [ebp - 0x144]
jb 0x1000de95
mov eax, dword [ebp - 0x144]
lea ecx, [ebp - 0x148]
push ecx
push 2
push ebx
push eax
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1000defa
cmp dword [ebp - 0x118], 0x10
lea eax, [ebp - 0x12c]
jb 0x1000dec4
mov eax, dword [ebp - 0x12c]
push eax
push dword [ebp - 0x148]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
jne 0x1000deee
mov esi, 0x1001235f
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strlen]
pop ecx
push eax
push esi
mov ecx, 0x10018700
call fcn.1000248c
push dword [ebp - 0x148]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x12c]
call fcn.100022ca
lea ecx, [ebp - 0x144]
call fcn.100022ca
call fcn.100105d6
ret 8
Function at 0x1000e95c
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
lea eax, [ebp - 4]
mov esi, ecx
push eax
push 0x40
push dword [ebp + 8]
mov ebx, edx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [ebp + 8], 2
jne 0x1000e982
mov word [esi], bx
jmp 0x1000e98a
cmp dword [ebp + 8], 1
jne 0x1000e98a
mov byte [esi], bl
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
pop esi
pop ebx
leave
ret

Function at 0x1000f290
Capabilities:
Create thread

Disassembly:
push esi
mov esi, ecx
mov eax, 0x1000c47d
xor ecx, ecx
push ecx
push ecx
push ecx
push eax
push ecx
push ecx
mov dword [esi], eax
mov dword [esi + 4], ecx
mov byte [esi + 8], cl
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
setne al
mov byte [esi + 8], al
mov eax, esi
pop esi
ret 0xc

Function at 0x1000f2bc
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x10018008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x768c7c]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [0x768c80]
xor ebx, ebx
mov dword [ebp - 0x10], eax
mov eax, dword [0x768c84]
cmp dword [edi + 8], 2
mov esi, dword [edi]
sete bl
mov dword [ebp - 0xc], eax
mov eax, dword [0x768c88]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 8], eax
lea ebx, [ebx*4 + 2]
add esi, ebx
mov dword [ebp - 0x28], ebx
mov ecx, esi
mov dword [ebp - 0x1c], esi
and ecx, 0x80000007
jns 0x1000f31f
dec ecx
or ecx, 0xfffffff8
add ecx, 1
je 0x1000f32b
push 8
pop eax
sub eax, ecx
add esi, eax
mov dword [ebp - 0x1c], esi
mov ecx, dword [edi + 0xc]
mov eax, esi
cdq
add ecx, ebx
and edx, 3
mov dword [ebp - 0x20], ecx
add eax, edx
xor edx, edx
sar eax, 2
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x18], edx
test eax, eax
jle 0x1000f3bf
mov edi, dword [ecx + edx*4]
xor esi, esi
mov ebx, dword [ecx + edx*4 + 4]
push 0x20
pop edx
mov ecx, ebx
mov eax, ebx
shl eax, 4
shr ecx, 5
xor ecx, eax
mov eax, esi
and eax, 3
add ecx, ebx
mov eax, dword [ebp + eax*4 - 0x14]
add eax, esi
sub esi, 0x61c88647
xor ecx, eax
add edi, ecx
mov ecx, edi
mov eax, edi
shl eax, 4
shr ecx, 5
xor ecx, eax
mov eax, esi
shr eax, 0xd
add ecx, edi
and eax, 3
mov eax, dword [ebp + eax*4 - 0x14]
add eax, esi
xor ecx, eax
add ebx, ecx
sub edx, 1
jne 0x1000f356
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
mov dword [ecx + edx*4], edi
mov dword [ecx + edx*4 + 4], ebx
add edx, 2
mov dword [ebp - 0x18], edx
cmp edx, dword [ebp - 0x24]
jl 0x1000f34a
mov esi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x2c]
mov eax, dword [edi + 0xc]
lea ecx, [ebx - 2]
add ecx, esi
mov word [eax], cx
mov ecx, dword [ebp - 4]
mov dword [edi], esi
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.1000f502
leave
ret
Function at 0x1000f3db
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x10018008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x768c7c]
mov dword [ebp - 0x14], eax
mov eax, dword [0x768c80]
mov dword [ebp - 0x10], eax
mov eax, dword [0x768c84]
mov dword [ebp - 0xc], eax
mov eax, dword [0x768c88]
mov dword [ebp - 8], eax
mov eax, edx
cdq
and edx, 3
add eax, edx
xor edx, edx
sar eax, 2
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], edx
push esi
mov esi, ecx
mov dword [ebp - 0x1c], esi
test eax, eax
jle 0x1000f49d
push ebx
push edi
mov edi, dword [esi + edx*4 + 2]
mov ebx, dword [esi + edx*4 + 6]
mov esi, 0xc6ef3720
push 0x20
pop edx
mov ecx, edi
mov eax, edi
shl eax, 4
shr ecx, 5
xor ecx, eax
mov eax, esi
shr eax, 0xd
add ecx, edi
and eax, 3
mov eax, dword [ebp + eax*4 - 0x14]
add eax, esi
add esi, 0x61c88647
xor ecx, eax
sub ebx, ecx
mov ecx, ebx
mov eax, ebx
shl eax, 4
shr ecx, 5
xor ecx, eax
mov eax, esi
and eax, 3
add ecx, ebx
mov eax, dword [ebp + eax*4 - 0x14]
add eax, esi
xor ecx, eax
sub edi, ecx
sub edx, 1
jne 0x1000f43a
mov edx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x1c]
mov dword [esi + edx*4 + 2], edi
mov dword [esi + edx*4 + 6], ebx
add edx, 2
mov dword [ebp - 0x18], edx
cmp edx, dword [ebp - 0x20]
jl 0x1000f42a
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.1000f502
leave
ret

Function at 0x433006
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
call 0x43300c
nop
nop
nop
nop
nop
pop eax
add eax, 0x40a063
nop
nop
sub eax, 0x40a009
nop
nop
nop
nop
mov ebx, dword [eax]
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
jl 0x433030
nop
nop
nop
nop
nop
nop
add eax, 0xc
nop
cmp dword [eax], 0
nop
nop
nop
nop
nop
jne 0x43301e
nop
nop
nop
nop
nop
nop
nop
popal
jmp 0x431219
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x40c058], 1
mov dword [0x40c054], 1
mov dword [0x40c050], 1
jne 0x401056
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010b0
mov dword [0x40c00c], eax
mov eax, dword [0x40c064]
test eax, eax
je 0x4010a0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x40c078]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x40c060]
mov dword [eax], edx
call dbg._setargv
cmp dword [0x403014], 1
je 0x4010e0
xor eax, eax
add esp, 0x1c
ret
mov dword [esp], 1
call sym.___set_app_type
jmp 0x401070
movzx edx, word [ecx + 0x18]
cmp dx, 0x10b
je 0x4010f8
cmp dx, 0x20b
jne 0x401056
cmp dword [ecx + 0x84], 0xe
jbe 0x401056
mov edx, dword [ecx + 0xf8]
xor eax, eax
test edx, edx
setne al
jmp 0x401056
mov dword [esp], dbg._matherr
call dbg.__mingw_setusermatherr
xor eax, eax
add esp, 0x1c
ret
cmp dword [ecx + 0x74], 0xe
jbe 0x401056
mov ecx, dword [ecx + 0xe8]
xor eax, eax
test ecx, ecx
setne al
jmp 0x401056
Function at 0x4017f0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call dbg.__acrt_iob_func
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 sym._fwrite
mov dword [esp], 2
call dbg.__acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x401850
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x40c06c]
test esi, esi
jle 0x401970
mov eax, dword [0x40c070]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x401884
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x401907
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x401870
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x401997
mov eax, dword [0x40c070]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
mov edx, dword [0x40c070]
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 0x401977
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x401900
lea edx, [eax - 0x40]
and edx, 0xffffffbf
jne 0x401910
add dword [0x40c06c], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x40c070]
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 0x401900
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, cs:[esi]
nop
xor esi, esi
jmp 0x40188e
mov eax, dword [0x40c070]
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, cs:[esi]
nop
Function at 0x401ec0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x40c088
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x40c080]
sub esp, 4
test ebx, ebx
je 0x401f15
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
mov esi, eax
sub esp, 4
call edi
test esi, esi
je 0x401f0e
test eax, eax
jne 0x401f0e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401ef0
mov dword [esp], 0x40c088
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x402250
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x402275
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x402280
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x402275
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 si, si
je 0x4022c8
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x4022be
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x4022ca
add ecx, 1
add eax, 0x28
cmp esi, ecx
jne 0x4022b0
xor eax, eax
pop ebx
pop esi
ret
Function at 0x4059d0
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x418
cmp dword [0x40f9c4], edx
push ebx
push esi
push edi
push ebp
jbe 0x405bd7
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x40f9d0
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ecx, dword [esp + 0x18]
shl eax, 3
mov ebx, dword [ecx]
mov ebp, eax
mov dword [esp + 0x1c], eax
mov al, byte [ebx + ebp + 4]
test al, 1
je 0x405bd7
xor esi, esi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], esi
cmp ebp, esi
jne 0x405a39
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
test al, 0x20
je 0x405a4a
push 2
push 0
push edx
call fcn.00405e70
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x405ae6
mov dword [esp + 0x10], 0
mov edi, dword [esp + 0x430]
mov eax, edi
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x405b1f
lea ebx, [esp + 0x24]
mov eax, edi
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x405aad
mov al, byte [edi]
inc edi
cmp al, 0xa
jne 0x405a9b
mov byte [ebx], 0xd
inc esi
inc ebx
mov byte [ebx], al
inc ebx
mov eax, ebx
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x405a82
lea eax, [esp + 0x24]
push 0
sub ebx, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push ebx
push ecx
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x405b15
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, ebx
jge 0x405a6d
jmp 0x405b1f
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x434]
push eax
push ebp
mov ecx, dword [ecx]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x405b15
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x405b1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x405bc6
cmp dword [esp + 0x10], 0
je 0x405b78
cmp dword [esp + 0x10], 5
jne 0x405b5b
mov dword [0x408164], 9
mov eax, dword [esp + 0x10]
pop ebp
pop edi
mov dword [0x408168], eax
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x10]
push eax
call fcn.00405e00
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
test byte [edx + ecx + 4], 0x40
je 0x405ba2
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x405ba2
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x408164], 0x1c
mov dword [0x408168], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, esi
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x408164], 9
mov dword [0x408168], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret