Function at 0x405a4c
Capabilities:
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 8]
push eax
push eax
push edx
and ecx, 0xffffff
push ecx
push 0x5c
sub esp, 0x14
pushal
mov edx, ecx
call fcn.00405750
xor edx, edx
mov ecx, dword [esp + 0x48]
mov dword [ecx], edx
dec edx
mov dword [ecx + 4], edx
lea edx, [ecx + 8]
mov dword [esp + 0x30], edx
lea edx, [ecx + 0xc]
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x30]
call fcn.004057e8
mov eax, dword [esp + 0x2c]
call fcn.004057e8
mov eax, dword [esp + 0x44]
test eax, eax
je 0x405d88
call fcn.00405838
test eax, eax
je 0x405b49
test byte [ebp + 2], 1
jne 0x405ae1
call fcn.00405790
jne 0x405b49
test byte [ebp + 2], 2
jne 0x405b49
test dword [esp + 0x38], 0x80
je 0x405d88
or dword [esp + 0x38], 0x2000000
jmp 0x405b49
or dword [esp + 0x38], 0x20000000
cmp byte [eax], 0
je 0x405af6
or dword [esp + 0x38], 0x10000000
mov dword [esp + 0x40], eax
sub eax, dword [esp + 0x44]
mov edx, eax
mov ebx, eax
mov eax, dword [esp + 0x2c]
test edx, edx
jle 0x405b1d
test dword [esp + 0x38], 0x100
je 0x405b1d
or dword [esp + 0x38], 0x4000000
inc edx
call fcn.004057bc
je 0x405b49
mov esi, dword [esp + 0x44]
mov ecx, ebx
rep movsb byte es:[edi], byte [esi]
test dword [esp + 0x38], 0x4000000
je 0x405b3b
mov al, byte [esp + 0x34]
stosb byte es:[edi], al
test dword [esp + 0x38], 0x10000000
je 0x405d88
mov esi, dword [esp + 0x40]
test dword [esp + 0x38], 0x80
jne 0x405b6a
mov eax, esi
mov edx, dword [esp + 0x38]
call fcn.0040595c
test al, al
je 0x405d88
mov al, byte [esi]
call fcn.0040579c
jne 0x405b7b
or dword [esp + 0x38], 0x80000000
test byte [ebp + 2], 2
jne 0x405b8b
or dword [esp + 0x38], 0x1000000
jmp 0x405ba7
test dword [esp + 0x38], 0xa0000000
jne 0x405ba7
test dword [esp + 0x38], 0x200
je 0x405ba7
or dword [esp + 0x38], 0x1000000
mov eax, dword [esp + 0x40]
mov esi, eax
sub eax, dword [esp + 0x44]
test dword [esp + 0x38], 0x80000000
je 0x405bbc
inc eax
mov dword [esp + 0x28], eax
xor ebx, ebx
mov eax, ebx
cmp byte [esi], 0
je 0x405bd7
call fcn.004057a8
lea ebx, [ebx + 1]
jne 0x405bd7
mov ah, al
jmp 0x405bc4
test al, al
je 0x405be3
or dword [esp + 0x38], 0x8000000
test dword [esp + 0x38], 0x20
je 0x405bfb
test dword [esp + 0x38], 0x8000000
jne 0x405bfb
dec ebx
jge 0x405bfb
inc ebx
test byte [ebp + 2], 2
je 0x405c0c
test dword [esp + 0x38], 0x80000000
je 0x405c0c
dec ebx
mov ecx, dword [esp + 0x48]
mov dword [ecx], ebx
mov dword [esp + 0x24], ebx
mov edx, dword [esp + 0x3c]
cmp edx, 0x7fffffff
jne 0x405c2f
mov edx, ebx
test dword [esp + 0x38], 0x1000000
je 0x405c2f
dec edx
test edx, edx
jge 0x405c42
add ebx, edx
mov edx, ebx
test dword [esp + 0x38], 0x1000000
je 0x405c42
dec edx
mov dword [esp + 0x20], edx
test edx, edx
jl 0x405d88
jg 0x405c71
test dword [esp + 0x38], 0x1000000
jne 0x405c71
test dword [esp + 0x38], 0x40
jne 0x405d88
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x28]
jmp 0x405cb5
cmp edx, dword [esp + 0x24]
jg 0x405d88
jl 0x405c8b
test dword [esp + 0x38], 0x1000000
jne 0x405d88
mov dword [ecx + 4], edx
mov esi, dword [esp + 0x40]
test dword [esp + 0x38], 0x1000000
jne 0x405ca7
test dword [esp + 0x38], 0x80000000
jne 0x405ca7
dec edx
call fcn.004057a8
dec edx
jge 0x405ca7
mov edx, esi
sub edx, dword [esp + 0x44]
mov ebx, edx
mov esi, dword [esp + 0x44]
test dword [esp + 0x38], 0x20000000
jne 0x405d02
test dword [esp + 0x38], 0x80000000
jne 0x405ce4
test dword [esp + 0x38], 0x10
je 0x405d02
inc edx
or dword [esp + 0x38], 0x40000000
jmp 0x405d02
test dword [esp + 0x38], 8
je 0x405d02
cmp dword [esp + 0x20], 0
jne 0x405cff
test dword [esp + 0x38], 0x400
jne 0x405d02
dec edx
inc esi
dec ebx
mov eax, dword [esp + 0x30]
call fcn.004057bc
je 0x405d88
test dword [esp + 0x38], 0x40000000
je 0x405d1c
mov al, byte [esp + 0x34]
stosb byte es:[edi], al
mov ecx, ebx
rep movsb byte es:[edi], byte [esi]
test dword [esp + 0x38], 0x1000000
jne 0x405d4a
cmp dword [esp + 0x20], 0
jne 0x405d4a
mov eax, ebx
dec eax
jg 0x405d88
test dword [esp + 0x38], 2
je 0x405d4a
test dword [esp + 0x38], 0x400
jne 0x405d88
mov edi, dword [esp + 0x30]
mov ah, byte [esp + 0x34]
call fcn.0040596c
je 0x405d88
mov al, byte [esi + ebx - 1]
call fcn.0040579c
jne 0x405d75
test dword [esp + 0x38], 2
je 0x405d88
call fcn.004057e0
jmp 0x405d88
test dword [esp + 0x38], 4
je 0x405d88
call fcn.004057d4
mov byte [edi + ebx - 1], ah
popal
add esp, 0x2c
pop ebp
ret 4