Function at 0x41e720
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xbc
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
sub edx, eax
cmp edx, 7
jle 0x41e810
cmp edx, 0xb
jg 0x41e818
mov esi, dword [eax]
test esi, esi
jne 0x41e822
mov ebx, dword [eax + 4]
test ebx, ebx
jne 0x41e822
mov edx, dword [eax + 8]
lea ebx, [eax + 0xc]
cmp edx, 1
jne 0x41ec53
cmp ebx, dword [ebp + 0xc]
jae 0x41e810
lea esi, [esi]
lea edi, [edi]
mov esi, dword [ebx + 4]
mov edi, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x10]
add edi, esi
mov esi, dword [ebx]
mov dword [ebp - 0xb4], edi
mov edi, dword [esi + ecx]
mov ecx, dword [ebx + 8]
movzx eax, cl
cmp eax, 0x10
je 0x41ea16
ja 0x41ea00
cmp eax, 8
jne 0x41ec29
mov edx, dword [ebp - 0xb4]
movzx eax, byte [edx]
test al, al
mov dword [ebp - 0xa4], eax
mov edx, eax
jns 0x41e7d8
or eax, 0xffffff00
nop
mov dword [ebp - 0xa4], eax
mov edx, eax
mov eax, dword [ebp + 0x10]
add esi, eax
sub edx, esi
movzx eax, cl
lea esi, [edx + edi]
cmp eax, 0x10
mov dword [ebp - 0xa4], esi
je 0x41ea41
ja 0x41e934
cmp eax, 8
je 0x41eae2
add ebx, 0xc
cmp ebx, dword [ebp + 0xc]
jb 0x41e780
nop
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [eax]
test ecx, ecx
je 0x41e8e8
cmp eax, dword [ebp + 0xc]
mov esi, eax
jae 0x41e810
lea edi, [ebp - 0x38]
jmp 0x41e86d
mov dword [esp], ebx
mov edx, 4
lea eax, [ebp - 0x9c]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
call sub.msys_1.0.dll_memcpy
mov ecx, dword [ebp - 0x24]
cmp ecx, 0x40
setne bl
cmp ecx, 4
setne dl
movzx eax, dl
test eax, ebx
jne 0x41e906
add esi, 8
cmp esi, dword [ebp + 0xc]
jae 0x41e810
mov eax, dword [esi + 4]
mov ebx, dword [ebp + 0x10]
mov ecx, dword [esi]
add ebx, eax
mov edx, dword [ebx]
mov eax, 0x1c
mov dword [esp + 8], eax
mov dword [esp + 4], edi
add ecx, edx
mov dword [ebp - 0x9c], ecx
mov dword [esp], ebx
call sub.KERNEL32.dll_VirtualQuery
sub esp, 0xc
test eax, eax
je 0x41ebb0
mov edx, dword [ebp - 0x24]
cmp edx, 0x40
setne cl
cmp edx, 4
setne al
movzx edx, al
test edx, ecx
je 0x41e830
lea ecx, [ebp - 0xa0]
mov eax, dword [ebp - 0x2c]
mov edx, 0x40
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x38]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
jmp 0x41e830
mov edx, dword [eax + 4]
test edx, edx
jne 0x41e746
mov edi, dword [eax + 8]
test edi, edi
jne 0x41e746
add eax, 0xc
jmp 0x41e746
mov eax, dword [ebp - 0xa0]
lea edx, [ebp - 0xa0]
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 0xc], edx
mov ebx, dword [ebp - 0x38]
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], ebx
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
jmp 0x41e865
cmp eax, 0x20
jne 0x41e803
mov ecx, dword [ebp - 0xb4]
mov edx, 0x1c
lea edi, [ebp - 0x98]
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov dword [esp], ecx
call sub.KERNEL32.dll_VirtualQuery
sub esp, 0xc
test eax, eax
je 0x41ec44
mov edi, dword [ebp - 0x84]
cmp edi, 0x40
setne cl
cmp edi, 4
setne dl
movzx eax, dl
test eax, ecx
jne 0x41ebc9
mov edx, dword [ebp - 0xb4]
lea ecx, [ebp - 0xa4]
mov edi, 4
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp], edx
call sub.msys_1.0.dll_memcpy
mov esi, dword [ebp - 0x84]
cmp esi, 0x40
setne cl
cmp esi, 4
setne al
movzx edi, al
test edi, ecx
je 0x41e803
mov eax, dword [ebp - 0x8c]
lea edx, [ebp - 0xb0]
mov esi, dword [ebp - 0xb0]
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x98]
mov dword [esp + 8], esi
mov dword [esp], eax
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
add ebx, 0xc
jmp 0x41e806
cmp eax, 0x20
jne 0x41ec29
mov edx, dword [ebp - 0xb4]
mov eax, dword [edx]
jmp 0x41e7d0
mov edx, dword [ebp - 0xb4]
movzx eax, word [edx]
mov edx, eax
mov dword [ebp - 0xa4], eax
and eax, 0x8000
test ax, ax
je 0x41e7d8
mov eax, edx
or eax, 0xffff0000
jmp 0x41e7d0
mov edx, dword [ebp - 0xb4]
mov ecx, 0x1c
lea edi, [ebp - 0x78]
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
mov dword [esp], edx
call sub.KERNEL32.dll_VirtualQuery
sub esp, 0xc
test eax, eax
je 0x41ec44
mov edi, dword [ebp - 0x64]
cmp edi, 0x40
setne dl
cmp edi, 4
setne al
movzx esi, al
test esi, edx
jne 0x41eb83
mov eax, dword [ebp - 0xb4]
lea ecx, [ebp - 0xa4]
mov edi, 2
mov dword [esp + 8], edi
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msys_1.0.dll_memcpy
mov esi, dword [ebp - 0x64]
cmp esi, 0x40
setne cl
cmp esi, 4
setne dl
movzx edi, dl
test edi, ecx
je 0x41e803
lea eax, [ebp - 0xac]
mov esi, dword [ebp - 0xac]
mov edx, dword [ebp - 0x6c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x78]
mov dword [esp + 8], esi
mov dword [esp + 4], edx
jmp 0x41e9e8
mov ecx, dword [ebp - 0xb4]
lea edx, [ebp - 0x58]
mov edi, 0x1c
mov dword [esp + 8], edi
mov dword [esp + 4], edx
mov dword [esp], ecx
call sub.KERNEL32.dll_VirtualQuery
sub esp, 0xc
test eax, eax
je 0x41ec44
mov edx, dword [ebp - 0x44]
cmp edx, 0x40
setne cl
cmp edx, 4
setne al
movzx esi, al
test esi, ecx
jne 0x41ebfc
mov eax, dword [ebp - 0xb4]
lea edx, [ebp - 0xa4]
mov edi, 1
mov dword [esp + 8], edi
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msys_1.0.dll_memcpy
mov esi, dword [ebp - 0x44]
cmp esi, 0x40
setne dl
cmp esi, 4
setne cl
movzx edi, cl
test edi, edx
je 0x41e803
lea eax, [ebp - 0xa8]
mov esi, dword [ebp - 0xa8]
mov ecx, dword [ebp - 0x4c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
jmp 0x41e9e8
mov edx, dword [ebp - 0x6c]
lea eax, [ebp - 0xac]
mov esi, 0x40
mov dword [esp + 0xc], eax
mov ecx, dword [ebp - 0x78]
mov dword [esp + 8], esi
mov dword [esp + 4], edx
mov dword [esp], ecx
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
jmp 0x41ea84
mov dword [esp + 8], ebx
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov esi, 0x1c
mov dword [esp + 4], esi
call fcn.0041e4c0
mov ecx, dword [ebp - 0x8c]
lea edx, [ebp - 0xb0]
mov eax, 0x40
mov dword [esp + 0xc], edx
mov esi, dword [ebp - 0x98]
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], esi
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
jmp 0x41e986
mov ecx, dword [ebp - 0x4c]
lea eax, [ebp - 0xa8]
mov esi, 0x40
mov dword [esp + 0xc], eax
mov edi, dword [ebp - 0x58]
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
mov dword [esp], edi
call sub.KERNEL32.dll_VirtualProtect
sub esp, 0x10
jmp 0x41eb25
mov dword [esp], str.__Unknown_pseudo_relocation_bit_size__d._n
xor edi, edi
movzx ebx, cl
mov dword [ebp - 0xa4], edi
mov dword [esp + 4], ebx
call fcn.0041e4c0
mov ebx, dword [ebp - 0xb4]
mov dword [esp + 8], ebx
jmp 0x41ebb4
mov dword [esp + 4], edx
mov dword [esp], str.__Unknown_pseudo_relocation_protocol_version__d._n
call fcn.0041e4c0
lea esi, [esi]
lea edi, [edi]