Function at 0x42e460
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x26c
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov eax, ecx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov byte [esp + 0x18], 0
push edi
test esi, esi
je 0x42e6bf
cmp byte [esi], 0
je 0x42e6bf
mov ecx, dword [0x4da488]
mov edi, dword [0x4da49c]
cmp ecx, edi
jl 0x42e53f
cmp ecx, 0xffff
jl 0x42e4d4
push 0x4c3c29
push str.Too_many_includes.
mov ecx, eax
call fcn.0044da60
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
test edi, edi
je 0x42e4e9
add edi, edi
cmp edi, 0xffff
jle 0x42e4ee
mov edi, 0xffff
jmp 0x42e4ee
mov edi, 0x64
lea eax, [edi*4]
push eax
push dword [0x4da484]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov edx, eax
add esp, 8
test edx, edx
jne 0x42e527
mov ecx, dword [esp + 0x10]
push 0x4c3c29
push str.Out_of_memory.
call fcn.0044da60
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [0x4da488]
mov eax, dword [esp + 0x10]
mov dword [0x4da484], edx
mov dword [0x4da49c], edi
jmp 0x42e545
mov edx, dword [0x4da484]
mov edi, dword [ebp + 0x18]
mov ebx, ecx
test edi, edi
je 0x42e5e2
test ebx, ebx
jne 0x42e55b
mov dword [edx + ebx*4], esi
jmp 0x42e5a8
cmp byte [edi], 0
je 0x42e5a0
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42e565
sub ecx, edx
lea eax, [ecx + 1]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, dword [0x4da484]
mov edx, eax
add esp, 4
mov dword [ecx + ebx*4], edx
test edx, edx
je 0x42e50b
nop word [eax + eax]
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x42e590
jmp 0x42e5a8
mov eax, dword [0x4dc0bc]
mov dword [edx + ebx*4], eax
mov dword [esp + 0x14], esi
lea ecx, [esi + 1]
nop
mov al, byte [esi]
inc esi
test al, al
jne 0x42e5b0
push 0
sub esi, ecx
lea eax, [esp + 0x18]
mov ecx, dword [ebp + 8]
push 0xc
push eax
mov dword [esp + 0x24], esi
call fcn.004a94b0
inc dword [0x4da488]
mov eax, 3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
test ebx, ebx
jne 0x42e5f0
mov eax, dword [eax + 0x618]
mov dword [edx], eax
jmp 0x42e638
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x2c]
push eax
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
cmp byte [ebp + 0x10], 0
jne 0x42e632
xor edi, edi
test ebx, ebx
jle 0x42e632
lea eax, [esp + 0x28]
push eax
mov eax, dword [0x4da484]
push dword [eax + edi*4]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x42e82f
inc edi
cmp edi, ebx
jl 0x42e612
mov ecx, dword [0x4da488]
mov edx, dword [0x4d99e4]
test edx, edx
je 0x42e812
test ecx, ecx
jne 0x42e812
mov ecx, dword [0x4da408]
test ecx, ecx
jne 0x42e6a2
push edx
push dword [0x4d99e0]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esp + 0x18], eax
test eax, eax
je 0x42e6aa
push dword [0x4d99e4]
push dword [0x4d99e0]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x42e6aa
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [esp + 0x14], eax
test eax, eax
je 0x42e6aa
mov ecx, dword [0x4da408]
test ecx, ecx
je 0x42e6df
mov edx, dword [0x4d99e4]
test edx, edx
jne 0x42e6ca
mov dword [esp + 0x18], edx
push 0
push esi
xorps xmm3, xmm3
xor edx, edx
mov ecx, str.Could_not_extract_script_from_EXE.
call fcn.004b2410
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [edx + 4]
mov dword [esp + 0x18], eax
test eax, eax
je 0x42e6aa
mov eax, dword [ecx]
add eax, dword [edx]
mov dword [esp + 0x14], eax
je 0x42e6aa
cmp dword [eax], 0x4034b50
jne 0x42e7a4
call fcn.00404820
test al, al
je 0x42e6bf
xor edx, edx
nop word [eax + eax]
mov eax, dword [edx*4 + 0x4d8234]
lea ecx, [edx + 1]
inc edx
mov byte [eax], cl
cmp edx, 0xa
jl 0x42e700
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x24]
push 0x4d8234
push dword [esp + 0x1c]
call fcn.004af6e0
mov esi, eax
add esp, 8
mov dword [esp + 0x20], esi
test esi, esi
je 0x42e7a4
lea edi, [esi + 2]
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [esp + 0x14], eax
mov byte [esp + 0x1c], 1
push esi
mov esi, dword [esp + 0x28]
push esi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x2c]
add esp, 0xc
mov eax, dword [esp + 0x14]
xor edx, edx
push ecx
push edx
push esi
mov word [eax + ecx], dx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov dword [esp + 0x18], edi
call fcn.00404820
test al, al
je 0x42e6bf
mov ecx, dword [0x4d99f4]
call fcn.00427700
mov ecx, dword [0x4d99f0]
call fcn.00427700
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x14]
push 0xfde9
push 0xc
push eax
call fcn.004a94b0
test ebx, ebx
jle 0x42e7fe
lea ecx, [esp + 0x28]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42e7c3
sub ecx, edx
lea eax, [ecx + 1]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, dword [0x4da484]
mov edx, eax
add esp, 4
mov dword [ecx + ebx*4], edx
test edx, edx
je 0x42e50b
lea ecx, [esp + 0x28]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x42e7f0
inc dword [0x4da488]
mov eax, 3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
push dword [0x4d99a8]
mov ecx, dword [ebp + 8]
push 0x30c
push esi
call fcn.004a94b0
test al, al
jne 0x42e7b8
cmp byte [ebp + 0x14], al
je 0x42e83d
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
push esi
mov ecx, str.Script
test ebx, ebx
mov eax, str.Include
cmovle eax, ecx
push eax
push str._s_file___s__cannot_be_opened.
lea eax, [esp + 0x13c]
push 0x144
push eax
call fcn.004abdd0
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x144]
add esp, 0x14
push 0x4c3c29
push eax
call fcn.0044da60
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14